summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorFengChen <vonchenplus@gmail.com>2022-08-10 04:10:32 +0200
committerFengChen <vonchenplus@gmail.com>2022-08-25 06:45:58 +0200
commitb2a6dde4380a5526e9d936f92a9e3d6ad9393bfa (patch)
tree0606caece955ac68899b71325b769a174af2f9f4 /src/shader_recompiler/backend
parentMerge pull request #8734 from liamwhite/bors-is-my-best-friend (diff)
downloadyuzu-b2a6dde4380a5526e9d936f92a9e3d6ad9393bfa.tar
yuzu-b2a6dde4380a5526e9d936f92a9e3d6ad9393bfa.tar.gz
yuzu-b2a6dde4380a5526e9d936f92a9e3d6ad9393bfa.tar.bz2
yuzu-b2a6dde4380a5526e9d936f92a9e3d6ad9393bfa.tar.lz
yuzu-b2a6dde4380a5526e9d936f92a9e3d6ad9393bfa.tar.xz
yuzu-b2a6dde4380a5526e9d936f92a9e3d6ad9393bfa.tar.zst
yuzu-b2a6dde4380a5526e9d936f92a9e3d6ad9393bfa.zip
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_image.cpp2
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_image.cpp1
-rw-r--r--src/shader_recompiler/backend/glsl/glsl_emit_context.cpp1
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_image.cpp1
-rw-r--r--src/shader_recompiler/backend/spirv/spirv_emit_context.cpp1
5 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
index a97b143e4..e67e80fac 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
@@ -67,6 +67,7 @@ std::string_view TextureType(IR::TextureInstInfo info) {
case TextureType::ColorArray1D:
return "SHADOWARRAY1D";
case TextureType::Color2D:
+ case TextureType::Color2DRect:
return "SHADOW2D";
case TextureType::ColorArray2D:
return "SHADOWARRAY2D";
@@ -86,6 +87,7 @@ std::string_view TextureType(IR::TextureInstInfo info) {
case TextureType::ColorArray1D:
return "ARRAY1D";
case TextureType::Color2D:
+ case TextureType::Color2DRect:
return "2D";
case TextureType::ColorArray2D:
return "ARRAY2D";
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
index 6af7e3fe6..cecdbb9d6 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
@@ -466,6 +466,7 @@ void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst& inst, const IR::Value&
case TextureType::ColorArray1D:
case TextureType::Color2D:
case TextureType::ColorCube:
+ case TextureType::Color2DRect:
return ctx.AddU32x4(
"{}=uvec4(uvec2(textureSize({},int({}))),0u,uint(textureQueryLevels({})));", inst,
texture, lod, texture);
diff --git a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp
index 221b06328..c767a9dc3 100644
--- a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp
+++ b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp
@@ -86,6 +86,7 @@ std::string_view SamplerType(TextureType type, bool is_depth) {
case TextureType::ColorArray1D:
return "sampler1DArray";
case TextureType::Color2D:
+ case TextureType::Color2DRect:
return "sampler2D";
case TextureType::ColorArray2D:
return "sampler2DArray";
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
index d8d86c91a..fb5799c42 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
@@ -453,6 +453,7 @@ Id EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& i
case TextureType::ColorArray1D:
case TextureType::Color2D:
case TextureType::ColorCube:
+ case TextureType::Color2DRect:
return ctx.OpCompositeConstruct(ctx.U32[4], ctx.OpImageQuerySizeLod(ctx.U32[2], image, lod),
zero, mips());
case TextureType::ColorArray2D:
diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp
index 98dd9035a..aecc4c612 100644
--- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp
@@ -41,6 +41,7 @@ Id ImageType(EmitContext& ctx, const TextureDescriptor& desc) {
case TextureType::ColorArray1D:
return ctx.TypeImage(type, spv::Dim::Dim1D, depth, true, false, 1, format);
case TextureType::Color2D:
+ case TextureType::Color2DRect:
return ctx.TypeImage(type, spv::Dim::Dim2D, depth, false, false, 1, format);
case TextureType::ColorArray2D:
return ctx.TypeImage(type, spv::Dim::Dim2D, depth, true, false, 1, format);