From 4de0f1e1c8ba29c354a54464851d859a7e9cb7d7 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 17 Sep 2019 22:38:01 -0300 Subject: shader_bytecode: Add SULD encoding --- src/video_core/engines/shader_bytecode.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/video_core/engines') diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index a6110bd86..12fb8abb7 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -1590,6 +1590,7 @@ public: TMML_B, // Texture Mip Map Level TMML, // Texture Mip Map Level SUST, // Surface Store + SULD, // Surface Load SUATOM, // Surface Atomic Operation EXIT, NOP, @@ -1875,6 +1876,7 @@ private: INST("110111110110----", Id::TMML_B, Type::Texture, "TMML_B"), INST("1101111101011---", Id::TMML, Type::Texture, "TMML"), INST("11101011001-----", Id::SUST, Type::Image, "SUST"), + INST("11101011000-----", Id::SULD, Type::Image, "SULD"), INST("1110101000------", Id::SUATOM, Type::Image, "SUATOM_D"), INST("0101000010110---", Id::NOP, Type::Trivial, "NOP"), INST("11100000--------", Id::IPA, Type::Trivial, "IPA"), -- cgit v1.2.3 From 675f23aedc9a3a99925068e952cbcb3faf88296a Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 18 Sep 2019 01:07:01 -0300 Subject: shader/image: Implement SULD and remove irrelevant code * Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array. --- src/video_core/engines/shader_bytecode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core/engines') diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 12fb8abb7..81dfe33a5 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -1427,7 +1427,7 @@ union Instruction { ASSERT(mode == SurfaceDataMode::D_BA); return store_data_layout; } - } sust; + } suldst; union { BitField<28, 1, u64> is_ba; -- cgit v1.2.3 From 44000971e271e350638611b0265a3fed7bcced2a Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 18 Sep 2019 01:50:40 -0300 Subject: gl_shader_decompiler: Use uint for images and fix SUATOM In the process remove implementation of SUATOM.MIN and SUATOM.MAX as these require a distinction between U32 and S32. These have to be implemented with imageCompSwap loop. --- src/video_core/engines/shader_bytecode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core/engines') diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 81dfe33a5..b46fcf03d 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -544,7 +544,7 @@ enum class VoteOperation : u64 { Eq = 2, // allThreadsEqualNV }; -enum class ImageAtomicSize : u64 { +enum class ImageAtomicOperationType : u64 { U32 = 0, S32 = 1, U64 = 2, @@ -1431,7 +1431,7 @@ union Instruction { union { BitField<28, 1, u64> is_ba; - BitField<51, 3, ImageAtomicSize> size; + BitField<51, 3, ImageAtomicOperationType> operation_type; BitField<33, 3, ImageType> image_type; BitField<29, 4, ImageAtomicOperation> operation; BitField<49, 2, OutOfBoundsStore> out_of_bounds_store; -- cgit v1.2.3