r600g: geom shaders: always load texture src regs from inputs
authorDave Airlie <airlied@redhat.com>
Tue, 18 Nov 2014 04:06:36 +0000 (14:06 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 18 Nov 2014 22:21:40 +0000 (08:21 +1000)
Otherwise we seem to lose the split_gs_inputs and try and
pull from an uninitialised register.

fixes 9 texelFetch geom shader tests.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c

index 709fcd744711e99c5eee5919ebd41fb075c92b18..ab2a83871bea6159eb225bcb75c74534cb1fffe1 100644 (file)
@@ -4919,7 +4919,8 @@ static inline boolean tgsi_tex_src_requires_loading(struct r600_shader_ctx *ctx,
        return  (inst->Src[index].Register.File != TGSI_FILE_TEMPORARY &&
                inst->Src[index].Register.File != TGSI_FILE_INPUT &&
                inst->Src[index].Register.File != TGSI_FILE_OUTPUT) ||
-               ctx->src[index].neg || ctx->src[index].abs;
+               ctx->src[index].neg || ctx->src[index].abs ||
+               (inst->Src[index].Register.File == TGSI_FILE_INPUT && ctx->type == TGSI_PROCESSOR_GEOMETRY);
 }
 
 static inline unsigned tgsi_tex_get_src_gpr(struct r600_shader_ctx *ctx,