OSDN Git Service

swr/rast: Support dynamically sized vertex layout
authorTim Rowley <timothy.o.rowley@intel.com>
Mon, 12 Jun 2017 23:43:49 +0000 (18:43 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Fri, 30 Jun 2017 18:26:19 +0000 (13:26 -0500)
commitf87ff64850b1cc755d8450fec2b77148262dd526
treefb9aa5dcc87e1c0297fd9aef20f6b888adad874b
parentcae53b24d7a739647193711e9a16c7face7ec72a
swr/rast: Support dynamically sized vertex layout

Each shader stage state (VS, TS, GS, SO, BE/CLIP) now has a
vertexAttribOffset to specify the offset to the start of the
general attribute section of the incoming verts for that stage.
It is up to the driver to set this up correctly based on the
active stages. All the shader stages use this value instead of
VERTEX_ATTRIB_START_SLOT to offset to the incoming attributes.

Only the vertex shader stage supports dynamic layout output
currently. The other stages continue to expect the output to be
the fixed layout slots as before. Will be enabling GS next.

Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
src/gallium/drivers/swr/rasterizer/core/binner.cpp
src/gallium/drivers/swr/rasterizer/core/clip.h
src/gallium/drivers/swr/rasterizer/core/frontend.cpp
src/gallium/drivers/swr/rasterizer/core/state.h
src/gallium/drivers/swr/swr_shader.cpp
src/gallium/drivers/swr/swr_state.cpp