r600g: don't enable SB for geom shaders
authorDave Airlie <airlied@redhat.com>
Thu, 28 Nov 2013 23:38:35 +0000 (23:38 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 5 Feb 2014 00:49:37 +0000 (10:49 +1000)
SB needs fixes for three GS instructions it seems to raise
them outside loops etc despite my best efforts.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600_shader.c

index 73b290979fb40101a737810a570a90aeb4c2f7a4..59fda7b7e54251b918e18ea6069bbbf97343d8fe 100644 (file)
@@ -158,6 +158,9 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
                return r;
        }
 
+       /* disable SB for geom shaders - it can't handle the CF_EMIT instructions */
+       use_sb &= (shader->shader.processor_type != TGSI_PROCESSOR_GEOMETRY);
+
        /* Check if the bytecode has already been built.  When using the llvm
         * backend, r600_shader_from_tgsi() will take care of building the
         * bytecode.