Mesa (master): r600/shader: reserve first register of vertex shader.
Dave Airlie
airlied at kemper.freedesktop.org
Mon Nov 13 20:16:13 UTC 2017
Module: Mesa
Branch: master
Commit: 50330d7115f0d5050ec3cfe6bca2b0136222e097
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50330d7115f0d5050ec3cfe6bca2b0136222e097
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Nov 13 13:05:25 2017 +1000
r600/shader: reserve first register of vertex shader.
r0 in input into vertex shaders contains things like vertexid,
we need to reserve it even if we have no inputs.
This fixes a bunch of tessellation piglits.
Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/gallium/drivers/r600/r600_shader.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index af866c4bdd..c6e445744e 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -3051,9 +3051,11 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
ctx.file_offset[i] = 0;
}
- if (ctx.type == PIPE_SHADER_VERTEX && ctx.info.num_inputs) {
+ if (ctx.type == PIPE_SHADER_VERTEX) {
+
ctx.file_offset[TGSI_FILE_INPUT] = 1;
- r600_bytecode_add_cfinst(ctx.bc, CF_OP_CALL_FS);
+ if (ctx.info.num_inputs)
+ r600_bytecode_add_cfinst(ctx.bc, CF_OP_CALL_FS);
}
if (ctx.type == PIPE_SHADER_FRAGMENT) {
if (ctx.bc->chip_class >= EVERGREEN)
More information about the mesa-commit
mailing list