summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
diff options
context:
space:
mode:
authorIago Toral Quiroga <itoral@igalia.com>2014-08-01 10:35:20 +0200
committerIago Toral Quiroga <itoral@igalia.com>2014-09-19 15:01:16 +0200
commitc66165ab2b15047792808433b788632a4b9df287 (patch)
treeb3e957415b97e2a37e871ea37ee8726197d0098b /src/mesa/drivers/dri/i965/gen6_gs_visitor.h
parent2614cde9981ee3609b8e22d84596603a1bd42212 (diff)
downloadexternal_mesa3d-c66165ab2b15047792808433b788632a4b9df287.zip
external_mesa3d-c66165ab2b15047792808433b788632a4b9df287.tar.gz
external_mesa3d-c66165ab2b15047792808433b788632a4b9df287.tar.bz2
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 <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
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 d29afdb..28f23c9 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 *);