diff options
| author | 2021-04-22 16:17:59 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:28 -0400 | |
| commit | d10cf55353175b13bed4cf18791e080ecb7fd95b (patch) | |
| tree | 9e26b823d7b48f532914a0511a157c14806debf5 /src/shader_recompiler/frontend | |
| parent | shader: Refactor atomic_operations_global_memory (diff) | |
| download | yuzu-d10cf55353175b13bed4cf18791e080ecb7fd95b.tar.gz yuzu-d10cf55353175b13bed4cf18791e080ecb7fd95b.tar.xz yuzu-d10cf55353175b13bed4cf18791e080ecb7fd95b.zip | |
shader: Implement indexed textures
Diffstat (limited to 'src/shader_recompiler/frontend')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/modifiers.h | 17 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcodes.inc | 24 |
2 files changed, 21 insertions, 20 deletions
diff --git a/src/shader_recompiler/frontend/ir/modifiers.h b/src/shader_recompiler/frontend/ir/modifiers.h index 5d7efa14c..77cda1f8a 100644 --- a/src/shader_recompiler/frontend/ir/modifiers.h +++ b/src/shader_recompiler/frontend/ir/modifiers.h | |||
| @@ -34,14 +34,15 @@ static_assert(sizeof(FpControl) <= sizeof(u32)); | |||
| 34 | 34 | ||
| 35 | union TextureInstInfo { | 35 | union TextureInstInfo { |
| 36 | u32 raw; | 36 | u32 raw; |
| 37 | BitField<0, 8, TextureType> type; | 37 | BitField<0, 16, u32> descriptor_index; |
| 38 | BitField<8, 1, u32> is_depth; | 38 | BitField<16, 3, TextureType> type; |
| 39 | BitField<9, 1, u32> has_bias; | 39 | BitField<19, 1, u32> is_depth; |
| 40 | BitField<10, 1, u32> has_lod_clamp; | 40 | BitField<20, 1, u32> has_bias; |
| 41 | BitField<11, 1, u32> relaxed_precision; | 41 | BitField<21, 1, u32> has_lod_clamp; |
| 42 | BitField<12, 2, u32> gather_component; | 42 | BitField<22, 1, u32> relaxed_precision; |
| 43 | BitField<14, 2, u32> num_derivates; | 43 | BitField<23, 2, u32> gather_component; |
| 44 | BitField<16, 3, ImageFormat> image_format; | 44 | BitField<25, 2, u32> num_derivates; |
| 45 | BitField<27, 3, ImageFormat> image_format; | ||
| 45 | }; | 46 | }; |
| 46 | static_assert(sizeof(TextureInstInfo) <= sizeof(u32)); | 47 | static_assert(sizeof(TextureInstInfo) <= sizeof(u32)); |
| 47 | 48 | ||
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc index b6869d4e4..8f32c9e74 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.inc +++ b/src/shader_recompiler/frontend/ir/opcodes.inc | |||
| @@ -482,18 +482,18 @@ OPCODE(BoundImageGradient, F32x4, U32, | |||
| 482 | OPCODE(BoundImageRead, U32x4, U32, Opaque, ) | 482 | OPCODE(BoundImageRead, U32x4, U32, Opaque, ) |
| 483 | OPCODE(BoundImageWrite, Void, U32, Opaque, U32x4, ) | 483 | OPCODE(BoundImageWrite, Void, U32, Opaque, U32x4, ) |
| 484 | 484 | ||
| 485 | OPCODE(ImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | 485 | OPCODE(ImageSampleImplicitLod, F32x4, Opaque, Opaque, Opaque, Opaque, ) |
| 486 | OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | 486 | OPCODE(ImageSampleExplicitLod, F32x4, Opaque, Opaque, Opaque, Opaque, ) |
| 487 | OPCODE(ImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | 487 | OPCODE(ImageSampleDrefImplicitLod, F32, Opaque, Opaque, F32, Opaque, Opaque, ) |
| 488 | OPCODE(ImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | 488 | OPCODE(ImageSampleDrefExplicitLod, F32, Opaque, Opaque, F32, Opaque, Opaque, ) |
| 489 | OPCODE(ImageGather, F32x4, U32, Opaque, Opaque, Opaque, ) | 489 | OPCODE(ImageGather, F32x4, Opaque, Opaque, Opaque, Opaque, ) |
| 490 | OPCODE(ImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) | 490 | OPCODE(ImageGatherDref, F32x4, Opaque, Opaque, Opaque, Opaque, F32, ) |
| 491 | OPCODE(ImageFetch, F32x4, U32, Opaque, Opaque, U32, Opaque, ) | 491 | OPCODE(ImageFetch, F32x4, Opaque, Opaque, Opaque, U32, Opaque, ) |
| 492 | OPCODE(ImageQueryDimensions, U32x4, U32, U32, ) | 492 | OPCODE(ImageQueryDimensions, U32x4, Opaque, U32, ) |
| 493 | OPCODE(ImageQueryLod, F32x4, U32, Opaque, ) | 493 | OPCODE(ImageQueryLod, F32x4, Opaque, Opaque, ) |
| 494 | OPCODE(ImageGradient, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) | 494 | OPCODE(ImageGradient, F32x4, Opaque, Opaque, Opaque, Opaque, Opaque, ) |
| 495 | OPCODE(ImageRead, U32x4, U32, Opaque, ) | 495 | OPCODE(ImageRead, U32x4, Opaque, Opaque, ) |
| 496 | OPCODE(ImageWrite, Void, U32, Opaque, U32x4, ) | 496 | OPCODE(ImageWrite, Void, Opaque, Opaque, U32x4, ) |
| 497 | 497 | ||
| 498 | // Warp operations | 498 | // Warp operations |
| 499 | OPCODE(LaneId, U32, ) | 499 | OPCODE(LaneId, U32, ) |