mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
vk_pipeline_cache: Cleanup graphics key refresh (#3449)
* vk_pipeline_cache: Cleanup graphics key refresh * position: Don't assert on None mapping Also check outputs in runtime info so shader is recompiled if they change
This commit is contained in:
@@ -794,6 +794,7 @@ struct Liverpool {
|
||||
ReverseSubtract = 4,
|
||||
};
|
||||
|
||||
u32 raw;
|
||||
BitField<0, 5, BlendFactor> color_src_factor;
|
||||
BitField<5, 3, BlendFunc> color_func;
|
||||
BitField<8, 5, BlendFactor> color_dst_factor;
|
||||
@@ -803,6 +804,10 @@ struct Liverpool {
|
||||
BitField<29, 1, u32> separate_alpha_blend;
|
||||
BitField<30, 1, u32> enable;
|
||||
BitField<31, 1, u32> disable_rop3;
|
||||
|
||||
bool operator==(const BlendControl& other) const {
|
||||
return raw == other.raw;
|
||||
}
|
||||
};
|
||||
|
||||
union ColorControl {
|
||||
@@ -919,7 +924,7 @@ struct Liverpool {
|
||||
INSERT_PADDING_WORDS(2);
|
||||
|
||||
operator bool() const {
|
||||
return info.format != DataFormat::FormatInvalid;
|
||||
return base_address && info.format != DataFormat::FormatInvalid;
|
||||
}
|
||||
|
||||
u32 Pitch() const {
|
||||
|
||||
@@ -85,7 +85,7 @@ enum class NumberClass {
|
||||
Uint,
|
||||
};
|
||||
|
||||
enum class CompSwizzle : u32 {
|
||||
enum class CompSwizzle : u8 {
|
||||
Zero = 0,
|
||||
One = 1,
|
||||
Red = 4,
|
||||
@@ -136,6 +136,12 @@ union CompMapping {
|
||||
return result;
|
||||
}
|
||||
|
||||
[[nodiscard]] u32 Map(u32 comp) const {
|
||||
const u32 swizzled_comp = u32(array[comp]);
|
||||
constexpr u32 min_comp = u32(AmdGpu::CompSwizzle::Red);
|
||||
return swizzled_comp >= min_comp ? swizzled_comp - min_comp : comp;
|
||||
}
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
T ApplySingle(const std::array<T, 4>& data, const CompSwizzle swizzle) const {
|
||||
|
||||
Reference in New Issue
Block a user