diff options
Diffstat (limited to 'src/shader_recompiler/ir_opt/rescaling_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/rescaling_pass.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/rescaling_pass.cpp b/src/shader_recompiler/ir_opt/rescaling_pass.cpp index 0d5f2e4d8..9198fa5f2 100644 --- a/src/shader_recompiler/ir_opt/rescaling_pass.cpp +++ b/src/shader_recompiler/ir_opt/rescaling_pass.cpp | |||
| @@ -16,6 +16,7 @@ namespace { | |||
| 16 | switch (type) { | 16 | switch (type) { |
| 17 | case TextureType::Color2D: | 17 | case TextureType::Color2D: |
| 18 | case TextureType::ColorArray2D: | 18 | case TextureType::ColorArray2D: |
| 19 | case TextureType::Color2DRect: | ||
| 19 | return true; | 20 | return true; |
| 20 | case TextureType::Color1D: | 21 | case TextureType::Color1D: |
| 21 | case TextureType::ColorArray1D: | 22 | case TextureType::ColorArray1D: |
| @@ -132,7 +133,8 @@ void PatchImageQueryDimensions(IR::Block& block, IR::Inst& inst) { | |||
| 132 | const IR::U1 is_scaled{ir.IsTextureScaled(ir.Imm32(info.descriptor_index))}; | 133 | const IR::U1 is_scaled{ir.IsTextureScaled(ir.Imm32(info.descriptor_index))}; |
| 133 | switch (info.type) { | 134 | switch (info.type) { |
| 134 | case TextureType::Color2D: | 135 | case TextureType::Color2D: |
| 135 | case TextureType::ColorArray2D: { | 136 | case TextureType::ColorArray2D: |
| 137 | case TextureType::Color2DRect: { | ||
| 136 | const IR::Value new_inst{&*block.PrependNewInst(it, inst)}; | 138 | const IR::Value new_inst{&*block.PrependNewInst(it, inst)}; |
| 137 | const IR::U32 width{DownScale(ir, is_scaled, IR::U32{ir.CompositeExtract(new_inst, 0)})}; | 139 | const IR::U32 width{DownScale(ir, is_scaled, IR::U32{ir.CompositeExtract(new_inst, 0)})}; |
| 138 | const IR::U32 height{DownScale(ir, is_scaled, IR::U32{ir.CompositeExtract(new_inst, 1)})}; | 140 | const IR::U32 height{DownScale(ir, is_scaled, IR::U32{ir.CompositeExtract(new_inst, 1)})}; |
| @@ -163,6 +165,7 @@ void ScaleIntegerComposite(IR::IREmitter& ir, IR::Inst& inst, const IR::U1& is_s | |||
| 163 | const IR::U32 y{Scale(ir, is_scaled, IR::U32{ir.CompositeExtract(composite, 1)})}; | 165 | const IR::U32 y{Scale(ir, is_scaled, IR::U32{ir.CompositeExtract(composite, 1)})}; |
| 164 | switch (info.type) { | 166 | switch (info.type) { |
| 165 | case TextureType::Color2D: | 167 | case TextureType::Color2D: |
| 168 | case TextureType::Color2DRect: | ||
| 166 | inst.SetArg(index, ir.CompositeConstruct(x, y)); | 169 | inst.SetArg(index, ir.CompositeConstruct(x, y)); |
| 167 | break; | 170 | break; |
| 168 | case TextureType::ColorArray2D: { | 171 | case TextureType::ColorArray2D: { |
| @@ -193,6 +196,7 @@ void ScaleIntegerOffsetComposite(IR::IREmitter& ir, IR::Inst& inst, const IR::U1 | |||
| 193 | switch (info.type) { | 196 | switch (info.type) { |
| 194 | case TextureType::ColorArray2D: | 197 | case TextureType::ColorArray2D: |
| 195 | case TextureType::Color2D: | 198 | case TextureType::Color2D: |
| 199 | case TextureType::Color2DRect: | ||
| 196 | inst.SetArg(index, ir.CompositeConstruct(x, y)); | 200 | inst.SetArg(index, ir.CompositeConstruct(x, y)); |
| 197 | break; | 201 | break; |
| 198 | case TextureType::Color1D: | 202 | case TextureType::Color1D: |
| @@ -216,6 +220,7 @@ void SubScaleCoord(IR::IREmitter& ir, IR::Inst& inst, const IR::U1& is_scaled) { | |||
| 216 | const IR::U32 scaled_y{SubScale(ir, is_scaled, coord_y, IR::Attribute::PositionY)}; | 220 | const IR::U32 scaled_y{SubScale(ir, is_scaled, coord_y, IR::Attribute::PositionY)}; |
| 217 | switch (info.type) { | 221 | switch (info.type) { |
| 218 | case TextureType::Color2D: | 222 | case TextureType::Color2D: |
| 223 | case TextureType::Color2DRect: | ||
| 219 | inst.SetArg(1, ir.CompositeConstruct(scaled_x, scaled_y)); | 224 | inst.SetArg(1, ir.CompositeConstruct(scaled_x, scaled_y)); |
| 220 | break; | 225 | break; |
| 221 | case TextureType::ColorArray2D: { | 226 | case TextureType::ColorArray2D: { |