summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorFeng Chen <vonchenplus@gmail.com>2021-09-03 17:52:20 +0200
committerFeng Chen <vonchenplus@gmail.com>2021-09-03 17:52:20 +0200
commita7bbaa489755c9847416c8c96f0eefb9e78a50a0 (patch)
tree341ab621a49becca148157877d6e57e2a31ba770 /src/shader_recompiler/backend
parentFix create GraphicsPipelines crash (diff)
downloadyuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.tar
yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.tar.gz
yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.tar.bz2
yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.tar.lz
yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.tar.xz
yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.tar.zst
yuzu-a7bbaa489755c9847416c8c96f0eefb9e78a50a0.zip
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.cpp4
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.h4
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp10
3 files changed, 9 insertions, 9 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp
index 78ca97d91..3ec5a4570 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_context.cpp
@@ -1209,7 +1209,7 @@ void EmitContext::DefineInputs(const IR::Program& program) {
if (loads.AnyComponent(IR::Attribute::FixedFncTexture0S)) {
const Id id{DefineInput(*this, F32[4], true)};
Decorate(id, spv::Decoration::Location, static_cast<u32>(12));
- input_txt_coord = id;
+ input_fixed_fnc_texture = id;
}
if (loads[IR::Attribute::InstanceId]) {
if (profile.support_vertex_instance_id) {
@@ -1332,7 +1332,7 @@ void EmitContext::DefineOutputs(const IR::Program& program) {
if (info.stores.AnyComponent(IR::Attribute::FixedFncTexture0S)) {
const Id id{DefineOutput(*this, F32[4], invocations)};
Decorate(id, spv::Decoration::Location, static_cast<u32>(12));
- output_txt_coord = id;
+ output_fixed_fnc_texture = id;
}
for (size_t index = 0; index < IR::NUM_GENERICS; ++index) {
diff --git a/src/shader_recompiler/backend/spirv/emit_context.h b/src/shader_recompiler/backend/spirv/emit_context.h
index 1023d0ee4..9a76e1ca9 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.h
+++ b/src/shader_recompiler/backend/spirv/emit_context.h
@@ -269,13 +269,13 @@ public:
Id input_position{};
Id input_front_color{};
- Id input_txt_coord{};
+ Id input_fixed_fnc_texture{};
std::array<Id, 32> input_generics{};
Id output_point_size{};
Id output_position{};
Id output_front_color{};
- Id output_txt_coord;
+ Id output_fixed_fnc_texture;
std::array<std::array<GenericElementInfo, 4>, 32> output_generics{};
Id output_tess_level_outer{};
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
index 0444bbf8f..a546d06a5 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
@@ -75,10 +75,10 @@ std::optional<OutAttr> OutputAttrPointer(EmitContext& ctx, IR::Attribute attr) {
}
}
if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) {
- const u32 index{IR::TxtCoordAttributeIndex(attr)};
- const u32 element{IR::TxtCoordAttributeElement(attr)};
+ const u32 index{IR::FixedFncTextureAttributeIndex(attr)};
+ const u32 element{IR::FixedFncTextureAttributeElement(attr)};
const Id element_id{ctx.Const(element)};
- return OutputAccessChain(ctx, ctx.output_f32, ctx.output_txt_coord, element_id);
+ return OutputAccessChain(ctx, ctx.output_f32, ctx.output_fixed_fnc_texture, element_id);
}
switch (attr) {
case IR::Attribute::PointSize:
@@ -322,8 +322,8 @@ Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, Id vertex) {
return type->needs_cast ? ctx.OpBitcast(ctx.F32[1], value) : value;
}
if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) {
- const u32 index{IR::TxtCoordAttributeIndex(attr)};
- return ctx.OpLoad(ctx.F32[1], AttrPointer(ctx, ctx.input_f32, vertex, ctx.input_txt_coord,
+ const u32 index{IR::FixedFncTextureAttributeIndex(attr)};
+ return ctx.OpLoad(ctx.F32[1], AttrPointer(ctx, ctx.input_f32, vertex, ctx.input_fixed_fnc_texture,
ctx.Const(element)));
}
switch (attr) {