summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-06-08 00:28:42 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:37 +0200
commitfb839061fbe23593455ac0c9e83c0a08831fd5db (patch)
tree27620ad1b0633b40b909aa9fc2ba4d7f423166d5
parentglsl: Allow dynamic tracking of variable allocation (diff)
downloadyuzu-fb839061fbe23593455ac0c9e83c0a08831fd5db.tar
yuzu-fb839061fbe23593455ac0c9e83c0a08831fd5db.tar.gz
yuzu-fb839061fbe23593455ac0c9e83c0a08831fd5db.tar.bz2
yuzu-fb839061fbe23593455ac0c9e83c0a08831fd5db.tar.lz
yuzu-fb839061fbe23593455ac0c9e83c0a08831fd5db.tar.xz
yuzu-fb839061fbe23593455ac0c9e83c0a08831fd5db.tar.zst
yuzu-fb839061fbe23593455ac0c9e83c0a08831fd5db.zip
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
index 4d35be152..cfcdd45a2 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
@@ -30,10 +30,8 @@ std::string InputVertexIndex(EmitContext& ctx, std::string_view vertex) {
return IsInputArray(ctx.stage) ? fmt::format("[{}]", vertex) : "";
}
-std::string OutputVertexIndex(EmitContext& ctx, std::string_view vertex) {
+std::string OutputVertexIndex(EmitContext& ctx) {
switch (ctx.stage) {
- case Stage::Geometry:
- return fmt::format("[{}]", vertex);
case Stage::TessellationControl:
return "[gl_InvocationID]";
default:
@@ -252,12 +250,12 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr,
}
void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value,
- std::string_view vertex) {
+ [[maybe_unused]] std::string_view vertex) {
if (IR::IsGeneric(attr)) {
const u32 index{IR::GenericAttributeIndex(attr)};
const u32 element{IR::GenericAttributeElement(attr)};
const GenericElementInfo& info{ctx.output_generics.at(index).at(element)};
- const auto output_decorator{OutputVertexIndex(ctx, vertex)};
+ const auto output_decorator{OutputVertexIndex(ctx)};
if (info.num_components == 1) {
ctx.Add("{}{}={};", info.name, output_decorator, value);
} else {