diff options
author | Kenneth Graunke <[email protected]> | 2015-10-01 00:46:19 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-10-04 14:00:01 -0700 |
commit | 5d7f8cb5a511977e256e773716fac3415d01443e (patch) | |
tree | 8f9a63c314cb8e9ca5880a044534eb803b695512 /src/mapi/es1api/.gitignore | |
parent | f2a4b40cf15cbc5eaab1776ad275ed8eead3322f (diff) |
nir: Introduce new nir_intrinsic_load_per_vertex_input intrinsics.
Geometry and tessellation shaders process multiple vertices; their
inputs are arrays indexed by the vertex number. While GLSL makes
this look like a normal array, it can be very different behind the
scenes.
On Intel hardware, all inputs for a particular vertex are stored
together - as if they were grouped into a single struct. This means
that consecutive elements of these top-level arrays are not contiguous.
In fact, they may sometimes be in completely disjoint memory segments.
NIR's existing load_input intrinsics are awkward for this case, as they
distill everything down to a single offset. We'd much rather keep the
vertex ID separate, but build up an offset as normal beyond that.
This patch introduces new nir_intrinsic_load_per_vertex_input
intrinsics to handle this case. They work like ordinary load_input
intrinsics, but have an extra source (src[0]) which represents the
outermost array index.
v2: Rebase on earlier refactors.
v3: Use ssa defs instead of nir_srcs, rebase on earlier refactors.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mapi/es1api/.gitignore')
0 files changed, 0 insertions, 0 deletions