diff options
author | Erik Faye-Lund <[email protected]> | 2019-07-23 17:55:51 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-10-28 08:51:48 +0000 |
commit | d8f1cf49465c0e003302f1c4c0595118a35037d4 (patch) | |
tree | bffc0ad325645e0b7bc2581421f6d87d3ecd6860 /src/gallium | |
parent | c7bcb6e5dcf33ed5f5dac676540c4eceb3e71899 (diff) |
zink/spirv: alias var0 on tex0 etc instead
This fixes Quake3, and is more in line with directx semantics.
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 96f1f543321..73b817bf4d4 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -235,7 +235,9 @@ emit_input(struct ntv_context *ctx, struct nir_variable *var) if (ctx->stage == MESA_SHADER_FRAGMENT) { if (var->data.location >= VARYING_SLOT_VAR0) spirv_builder_emit_location(&ctx->builder, var_id, - var->data.location - VARYING_SLOT_VAR0); + var->data.location - + VARYING_SLOT_VAR0 + + VARYING_SLOT_TEX0); else if ((var->data.location >= VARYING_SLOT_COL0 && var->data.location <= VARYING_SLOT_TEX7) || var->data.location == VARYING_SLOT_BFC0 || @@ -291,7 +293,9 @@ emit_output(struct ntv_context *ctx, struct nir_variable *var) if (ctx->stage == MESA_SHADER_VERTEX) { if (var->data.location >= VARYING_SLOT_VAR0) spirv_builder_emit_location(&ctx->builder, var_id, - var->data.location - VARYING_SLOT_VAR0); + var->data.location - + VARYING_SLOT_VAR0 + + VARYING_SLOT_TEX0); else if ((var->data.location >= VARYING_SLOT_COL0 && var->data.location <= VARYING_SLOT_TEX7) || var->data.location == VARYING_SLOT_BFC0 || |