diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_image.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp index 64a4e0e55..945cdb42b 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp | |||
| @@ -321,17 +321,23 @@ void AddOffsetToCoordinates(EmitContext& ctx, const IR::TextureInstInfo& info, I | |||
| 321 | Id result_type{}; | 321 | Id result_type{}; |
| 322 | switch (info.type) { | 322 | switch (info.type) { |
| 323 | case TextureType::Buffer: | 323 | case TextureType::Buffer: |
| 324 | case TextureType::Color1D: | 324 | case TextureType::Color1D: { |
| 325 | case TextureType::ColorArray1D: { | ||
| 326 | result_type = ctx.U32[1]; | 325 | result_type = ctx.U32[1]; |
| 327 | break; | 326 | break; |
| 328 | } | 327 | } |
| 328 | case TextureType::ColorArray1D: | ||
| 329 | offset = ctx.OpCompositeConstruct(ctx.U32[2], offset, ctx.u32_zero_value); | ||
| 330 | [[fallthrough]]; | ||
| 329 | case TextureType::Color2D: | 331 | case TextureType::Color2D: |
| 330 | case TextureType::Color2DRect: | 332 | case TextureType::Color2DRect: { |
| 331 | case TextureType::ColorArray2D: { | ||
| 332 | result_type = ctx.U32[2]; | 333 | result_type = ctx.U32[2]; |
| 333 | break; | 334 | break; |
| 334 | } | 335 | } |
| 336 | case TextureType::ColorArray2D: | ||
| 337 | offset = ctx.OpCompositeConstruct(ctx.U32[3], ctx.OpCompositeExtract(ctx.U32[1], coords, 0), | ||
| 338 | ctx.OpCompositeExtract(ctx.U32[1], coords, 1), | ||
| 339 | ctx.u32_zero_value); | ||
| 340 | [[fallthrough]]; | ||
| 335 | case TextureType::Color3D: { | 341 | case TextureType::Color3D: { |
| 336 | result_type = ctx.U32[3]; | 342 | result_type = ctx.U32[3]; |
| 337 | break; | 343 | break; |