diff options
author | Paul Berry <[email protected]> | 2013-03-22 11:26:34 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-04-11 09:25:26 -0700 |
commit | defdb310b76ad30c192a087292e86377f4ea0d83 (patch) | |
tree | bed83bbbf720fc4ed3e050f641c1eb80d078e199 /src/mesa/drivers/dri/i965/brw_vec4.h | |
parent | 444fce6398556118629ef01204a7d8ff7af0bea3 (diff) |
i965/vs: Generalize computation of array strides in preparation for GS.
Geometry shader inputs are arrays, but they use an unusual array
layout: instead of all array elements for a given geometry shader
input being stored consecutively, all geometry shader inputs are
interleaved into one giant array. As a result, the array stride we
use to access geometry shader inputs must be equal to the size of the
input VUE, rather than the size of the array element.
This patch introduces a new virtual function,
vec4_visitor::compute_array_stride(), which will allow geometry shader
compilation to specialize the computation of array stride to account
for the unusual layout of geometry shader input arrays. It also
renames the local variable that the ir_dereference_array visitor uses
to store the stride, to avoid confusion.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 27498590ec2..1f6c5635db2 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -488,6 +488,7 @@ protected: virtual void emit_thread_end() = 0; virtual void emit_urb_write_header(int mrf) = 0; virtual vec4_instruction *emit_urb_write_opcode(bool complete) = 0; + virtual int compute_array_stride(ir_dereference_array *ir); }; class vec4_vs_visitor : public vec4_visitor |