diff options
author | George Kyriazis <[email protected]> | 2017-07-21 23:23:04 -0500 |
---|---|---|
committer | George Kyriazis <[email protected]> | 2017-07-27 13:54:19 -0500 |
commit | 194ff5eed18f310bece0899595f678699badd32e (patch) | |
tree | 32250098857c5b15245796f749f2041fd2deda91 /src/gallium/drivers/swr/swr_shader.h | |
parent | e21fc2c625279b29a3c05d3341b8b748655d5cec (diff) |
swr: fix transform feedback logic
The shader that is used to copy vertex data out of the vs/gs shaders to
the user-specified buffer (streamout or SO shader) was not using the
correct offsets.
Adjust the offsets that are used just for the SO shader:
- Make sure that position is handled in the same special way
as in the vs/gs shaders
- Use the correct offset to be passed in the core
- consolidate register slot mapping logic into one function, since it's
been calculated in 2 different places (one for calcuating the slot mask,
and one for the register offsets themselves
Also make room for all attibutes in the backend vertex area.
Fixes:
- all vtk GL2PS tests
- 18 piglit tests (16 ext_transform_feedback tests,
arb-quads-follow-provoking-vertex and primitive-type gl_points
v2:
- take care of more SGV slots in slot mapping logic
- trim feState.vsVertexSize
- fix GS interface and incorporate GS while calculating vsVertexSize
Note that vsVertexSize is used in the core as the one parameter that
controls vertex size between all stages, so it has to be adjusted appropriately
for the whole vs/gs/fs pipeline.
Also note that GS and SO is not fully implemented. This will be addressed
later.
fixes:
- fixes total of 20 piglit tests
CC: 17.2 <[email protected]>
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_shader.h')
-rw-r--r-- | src/gallium/drivers/swr/swr_shader.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_shader.h b/src/gallium/drivers/swr/swr_shader.h index 1ab68460569..6468874dc3f 100644 --- a/src/gallium/drivers/swr/swr_shader.h +++ b/src/gallium/drivers/swr/swr_shader.h @@ -30,6 +30,9 @@ struct swr_jit_fs_key; struct swr_jit_vs_key; struct swr_jit_gs_key; +unsigned swr_so_adjust_attrib(unsigned in_attrib, + swr_vertex_shader *swr_vs); + PFN_VERTEX_FUNC swr_compile_vs(struct swr_context *ctx, swr_jit_vs_key &key); |