diff options
Diffstat (limited to 'src/shader_recompiler/backend')
5 files changed, 9 insertions, 2 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) { | |||
| 67 | case TextureType::ColorArray1D: | 67 | case TextureType::ColorArray1D: |
| 68 | return "SHADOWARRAY1D"; | 68 | return "SHADOWARRAY1D"; |
| 69 | case TextureType::Color2D: | 69 | case TextureType::Color2D: |
| 70 | case TextureType::Color2DRect: | ||
| 70 | return "SHADOW2D"; | 71 | return "SHADOW2D"; |
| 71 | case TextureType::ColorArray2D: | 72 | case TextureType::ColorArray2D: |
| 72 | return "SHADOWARRAY2D"; | 73 | return "SHADOWARRAY2D"; |
| @@ -86,6 +87,7 @@ std::string_view TextureType(IR::TextureInstInfo info) { | |||
| 86 | case TextureType::ColorArray1D: | 87 | case TextureType::ColorArray1D: |
| 87 | return "ARRAY1D"; | 88 | return "ARRAY1D"; |
| 88 | case TextureType::Color2D: | 89 | case TextureType::Color2D: |
| 90 | case TextureType::Color2DRect: | ||
| 89 | return "2D"; | 91 | return "2D"; |
| 90 | case TextureType::ColorArray2D: | 92 | case TextureType::ColorArray2D: |
| 91 | return "ARRAY2D"; | 93 | 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& | |||
| 466 | case TextureType::ColorArray1D: | 466 | case TextureType::ColorArray1D: |
| 467 | case TextureType::Color2D: | 467 | case TextureType::Color2D: |
| 468 | case TextureType::ColorCube: | 468 | case TextureType::ColorCube: |
| 469 | case TextureType::Color2DRect: | ||
| 469 | return ctx.AddU32x4( | 470 | return ctx.AddU32x4( |
| 470 | "{}=uvec4(uvec2(textureSize({},int({}))),0u,uint(textureQueryLevels({})));", inst, | 471 | "{}=uvec4(uvec2(textureSize({},int({}))),0u,uint(textureQueryLevels({})));", inst, |
| 471 | texture, lod, texture); | 472 | 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) { | |||
| 86 | case TextureType::ColorArray1D: | 86 | case TextureType::ColorArray1D: |
| 87 | return "sampler1DArray"; | 87 | return "sampler1DArray"; |
| 88 | case TextureType::Color2D: | 88 | case TextureType::Color2D: |
| 89 | case TextureType::Color2DRect: | ||
| 89 | return "sampler2D"; | 90 | return "sampler2D"; |
| 90 | case TextureType::ColorArray2D: | 91 | case TextureType::ColorArray2D: |
| 91 | return "sampler2DArray"; | 92 | 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 | |||
| 453 | case TextureType::ColorArray1D: | 453 | case TextureType::ColorArray1D: |
| 454 | case TextureType::Color2D: | 454 | case TextureType::Color2D: |
| 455 | case TextureType::ColorCube: | 455 | case TextureType::ColorCube: |
| 456 | case TextureType::Color2DRect: | ||
| 456 | return ctx.OpCompositeConstruct(ctx.U32[4], ctx.OpImageQuerySizeLod(ctx.U32[2], image, lod), | 457 | return ctx.OpCompositeConstruct(ctx.U32[4], ctx.OpImageQuerySizeLod(ctx.U32[2], image, lod), |
| 457 | zero, mips()); | 458 | zero, mips()); |
| 458 | case TextureType::ColorArray2D: | 459 | 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 d4a49ea99..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) { | |||
| 41 | case TextureType::ColorArray1D: | 41 | case TextureType::ColorArray1D: |
| 42 | return ctx.TypeImage(type, spv::Dim::Dim1D, depth, true, false, 1, format); | 42 | return ctx.TypeImage(type, spv::Dim::Dim1D, depth, true, false, 1, format); |
| 43 | case TextureType::Color2D: | 43 | case TextureType::Color2D: |
| 44 | case TextureType::Color2DRect: | ||
| 44 | return ctx.TypeImage(type, spv::Dim::Dim2D, depth, false, false, 1, format); | 45 | return ctx.TypeImage(type, spv::Dim::Dim2D, depth, false, false, 1, format); |
| 45 | case TextureType::ColorArray2D: | 46 | case TextureType::ColorArray2D: |
| 46 | return ctx.TypeImage(type, spv::Dim::Dim2D, depth, true, false, 1, format); | 47 | return ctx.TypeImage(type, spv::Dim::Dim2D, depth, true, false, 1, format); |
| @@ -1306,7 +1307,7 @@ void EmitContext::DefineInputs(const IR::Program& program) { | |||
| 1306 | subgroup_mask_gt = DefineInput(*this, U32[4], false, spv::BuiltIn::SubgroupGtMaskKHR); | 1307 | subgroup_mask_gt = DefineInput(*this, U32[4], false, spv::BuiltIn::SubgroupGtMaskKHR); |
| 1307 | subgroup_mask_ge = DefineInput(*this, U32[4], false, spv::BuiltIn::SubgroupGeMaskKHR); | 1308 | subgroup_mask_ge = DefineInput(*this, U32[4], false, spv::BuiltIn::SubgroupGeMaskKHR); |
| 1308 | } | 1309 | } |
| 1309 | if (info.uses_subgroup_invocation_id || info.uses_subgroup_shuffles || | 1310 | if (info.uses_fswzadd || info.uses_subgroup_invocation_id || info.uses_subgroup_shuffles || |
| 1310 | (profile.warp_size_potentially_larger_than_guest && | 1311 | (profile.warp_size_potentially_larger_than_guest && |
| 1311 | (info.uses_subgroup_vote || info.uses_subgroup_mask))) { | 1312 | (info.uses_subgroup_vote || info.uses_subgroup_mask))) { |
| 1312 | subgroup_local_invocation_id = | 1313 | subgroup_local_invocation_id = |
| @@ -1411,7 +1412,8 @@ void EmitContext::DefineInputs(const IR::Program& program) { | |||
| 1411 | void EmitContext::DefineOutputs(const IR::Program& program) { | 1412 | void EmitContext::DefineOutputs(const IR::Program& program) { |
| 1412 | const Info& info{program.info}; | 1413 | const Info& info{program.info}; |
| 1413 | const std::optional<u32> invocations{program.invocations}; | 1414 | const std::optional<u32> invocations{program.invocations}; |
| 1414 | if (info.stores.AnyComponent(IR::Attribute::PositionX) || stage == Stage::VertexB) { | 1415 | if (runtime_info.convert_depth_mode || info.stores.AnyComponent(IR::Attribute::PositionX) || |
| 1416 | stage == Stage::VertexB) { | ||
| 1415 | output_position = DefineOutput(*this, F32[4], invocations, spv::BuiltIn::Position); | 1417 | output_position = DefineOutput(*this, F32[4], invocations, spv::BuiltIn::Position); |
| 1416 | } | 1418 | } |
| 1417 | if (info.stores[IR::Attribute::PointSize] || runtime_info.fixed_state_point_size) { | 1419 | if (info.stores[IR::Attribute::PointSize] || runtime_info.fixed_state_point_size) { |