diff options
author | Neil Roberts <neil@linux.intel.com> | 2015-07-13 18:01:13 +0100 |
---|---|---|
committer | Ben Widawsky <benjamin.widawsky@intel.com> | 2015-08-18 18:28:09 -0700 |
commit | c03247bae010dfd81a08572a32067e9ea8637f63 (patch) | |
tree | 64344aedf54ac2350048c4539558cccbe47b661d /src/glsl/lower_const_arrays_to_uniforms.cpp | |
parent | f01bdb0484dd5224b183526d020ee3f2888cac45 (diff) | |
download | external_mesa3d-c03247bae010dfd81a08572a32067e9ea8637f63.zip external_mesa3d-c03247bae010dfd81a08572a32067e9ea8637f63.tar.gz external_mesa3d-c03247bae010dfd81a08572a32067e9ea8637f63.tar.bz2 |
i965/bdw: Fix setting the instancing state for the SGVS element
When gl_VertexID or gl_InstanceID is used a 3DSTATE_VF_SGVS
instruction is sent to create a sort of element to store the generated
values. The last instruction in this chunk of code looks like it was
trying to set the instancing state for the element using the
3DSTATE_VF_INSTANCING instruction. However it was sending
brw->vb.nr_buffers instead of the element index. This instruction is
supposed to take an element index and that is how it is used further
down in the function so the previous code looks wrong. Perhaps
previously the number of buffers coincidentally matched the number of
enabled elements so the value was generally correct anyway. In a
subsequent patch I want to change a bit how it chooses the SGVS
element index so this needs to be fixed.
v2 [by Ben]
Remove stable 10.5 stable tag (it's too late now)
Commit update as follows:
The number of vertex buffers emitted is always <= the number of vertex elements.
To maximize reuse (actually, to minimize relocations - according to the code
comments), a vertex buffer is only emitted once, even when we setup multiple
components (3DSTATE_VERTEX_ELEMENT) from that buffer. This meant that the
previous code would use the wrong indexed element for these reuse cases. This
patch by itself prevents hangs on BSW in the linked bug. It doesn't make the
test pass, the remaining patches are needed for that.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91610
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/glsl/lower_const_arrays_to_uniforms.cpp')
0 files changed, 0 insertions, 0 deletions