aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2014-08-01 10:35:20 +0200
committerIago Toral Quiroga <[email protected]>2014-09-19 15:01:16 +0200
commitc66165ab2b15047792808433b788632a4b9df287 (patch)
treeb3e957415b97e2a37e871ea37ee8726197d0098b /src/mesa/drivers/dri/i965/gen6_gs_visitor.h
parent2614cde9981ee3609b8e22d84596603a1bd42212 (diff)
i965/gen6/gs: Fix binding table clash between TF surfaces and textures.
For gen6 geometry shaders we use the first BRW_MAX_SOL_BINDINGS entries of the binding table for transform feedback surfaces. However, vec4_visitor will setup the binding table so that textures use the same space in the binding table. This is done when calling assign_common_binding_table_offsets(0) as part if its run() method. To fix this clash we add a virtual method to the vec4_visitor hierarchy to assign the binding table offsets, so that we can change this behavior specifically for gen6 geometry shaders by mapping textures right after the first BRW_MAX_SOL_BINDINGS entries. Also, when there is no user-provided geometry shader, we only need to upload the binding table if we have transform feedback, however, in the case of a user-provided geometry shader, we can't only look into transform feedback to make that decision. This fixes multiple piglit tests for textureSize() and texelFetch() when these functions are called from a geometry shader in gen6, like these: bin/textureSize gs sampler2D -fbo -auto bin/texelFetch gs usampler2D -fbo -auto Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_gs_visitor.h')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_gs_visitor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_visitor.h b/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
index d29afdb3f11..28f23c9e4f7 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
+++ b/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
@@ -43,6 +43,7 @@ public:
vec4_gs_visitor(brw, c, prog, mem_ctx, no_spills) {}
protected:
+ virtual void assign_binding_table_offsets();
virtual void emit_prolog();
virtual void emit_thread_end();
virtual void visit(ir_emit_vertex *);