From 3185245845f7487c3b832035b0c19fdc4f1a8262 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 6 Apr 2020 02:24:47 -0300 Subject: shader/memory: Implement RED.E.ADD Implements a reduction operation. It's an atomic operation that doesn't return a value. This commit introduces another primitive because some shading languages might have a primitive for reduction operations. --- src/video_core/engines/shader_bytecode.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/video_core/engines/shader_bytecode.h') diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 930b605af..a31947ef3 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -988,6 +988,12 @@ union Instruction { BitField<46, 2, u64> cache_mode; } stg; + union { + BitField<23, 3, AtomicOp> operation; + BitField<48, 1, u64> extended; + BitField<20, 3, GlobalAtomicType> type; + } red; + union { BitField<52, 4, AtomicOp> operation; BitField<49, 3, GlobalAtomicType> type; @@ -1733,6 +1739,7 @@ public: ST_S, ST, // Store in generic memory STG, // Store in global memory + RED, // Reduction operation ATOM, // Atomic operation on global memory ATOMS, // Atomic operation on shared memory AL2P, // Transforms attribute memory into physical memory @@ -2039,6 +2046,7 @@ private: INST("1110111101010---", Id::ST_L, Type::Memory, "ST_L"), INST("101-------------", Id::ST, Type::Memory, "ST"), INST("1110111011011---", Id::STG, Type::Memory, "STG"), + INST("1110101111111---", Id::RED, Type::Memory, "RED"), INST("11101101--------", Id::ATOM, Type::Memory, "ATOM"), INST("11101100--------", Id::ATOMS, Type::Memory, "ATOMS"), INST("1110111110100---", Id::AL2P, Type::Memory, "AL2P"), -- cgit v1.2.3