Skip to content

Commit

Permalink
shader_recompiler: Add more opcodes (#802)
Browse files Browse the repository at this point in the history
* Implement some missing shader opcodes

Implements TBUFFER_STORE_FORMAT_XYZW, IMAGE_SAMPLE_CD, and IMAGE_GATHER4_C_LZ.

These are seen in #496.

* Implement IMAGE_STORE_MIP

Not sure if this is the right way to do this, let me know if this needs changing.

* Revert "Implement IMAGE_STORE_MIP"

This reverts commit cff78b5.
  • Loading branch information
StevenMiller123 authored Sep 6, 2024
1 parent bb29224 commit 09ce12a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/shader_recompiler/frontend/translate/vector_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ void Translator::EmitVectorMemory(const GcnInst& inst) {
case Opcode::IMAGE_SAMPLE_B:
case Opcode::IMAGE_SAMPLE_C_LZ_O:
case Opcode::IMAGE_SAMPLE_D:
case Opcode::IMAGE_SAMPLE_CD:
return IMAGE_SAMPLE(inst);
case Opcode::IMAGE_GATHER4_C:
case Opcode::IMAGE_GATHER4_LZ:
case Opcode::IMAGE_GATHER4_C:
case Opcode::IMAGE_GATHER4_C_LZ:
case Opcode::IMAGE_GATHER4_LZ_O:
return IMAGE_GATHER(inst);
case Opcode::IMAGE_ATOMIC_ADD:
Expand Down Expand Up @@ -98,6 +100,8 @@ void Translator::EmitVectorMemory(const GcnInst& inst) {
return BUFFER_STORE(2, true, inst);
case Opcode::TBUFFER_STORE_FORMAT_XYZ:
return BUFFER_STORE(3, true, inst);
case Opcode::TBUFFER_STORE_FORMAT_XYZW:
return BUFFER_STORE(4, true, inst);

case Opcode::BUFFER_STORE_DWORD:
return BUFFER_STORE(1, false, inst);
Expand Down

0 comments on commit 09ce12a

Please sign in to comment.