diff options
author | Dave Airlie <[email protected]> | 2016-06-01 14:10:22 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-06-01 15:53:00 +1000 |
commit | ebb81cd6839c5b0f7094e86f846958f10791f9bd (patch) | |
tree | 7564766e546a0fb3486a0f39b032d091089cda98 /src | |
parent | 1fe7bbb911ac708999685c942e971693b688a334 (diff) |
i965/xfb: skip components in correct buffer.
The driver was adding the skip components but always for buffer 0.
This fixes:
GL45-CTS.gtf40.GL3Tests.transform_feedback3.transform_feedback3_skip_multiple_buffers
Reviewed-by: Kenneth Graunke <[email protected]>
Cc: "12.0 11.2" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_sol_state.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c index f7b14438a22..4749cc89eba 100644 --- a/src/mesa/drivers/dri/i965/gen7_sol_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c @@ -123,7 +123,7 @@ gen7_upload_3dstate_so_decl_list(struct brw_context *brw, const unsigned components = linked_xfb_info->Outputs[i].NumComponents; unsigned component_mask = (1 << components) - 1; unsigned stream_id = linked_xfb_info->Outputs[i].StreamId; - + unsigned decl_buffer_slot = buffer << SO_DECL_OUTPUT_BUFFER_SLOT_SHIFT; assert(stream_id < MAX_VERTEX_STREAMS); /* gl_PointSize is stored in VARYING_SLOT_PSIZ.w @@ -145,7 +145,7 @@ gen7_upload_3dstate_so_decl_list(struct brw_context *brw, buffer_mask[stream_id] |= 1 << buffer; - decl |= buffer << SO_DECL_OUTPUT_BUFFER_SLOT_SHIFT; + decl |= decl_buffer_slot; if (varying == VARYING_SLOT_LAYER || varying == VARYING_SLOT_VIEWPORT) { decl |= vue_map->varying_to_slot[VARYING_SLOT_PSIZ] << SO_DECL_REGISTER_INDEX_SHIFT; @@ -172,12 +172,14 @@ gen7_upload_3dstate_so_decl_list(struct brw_context *brw, next_offset[buffer] += skip_components; while (skip_components >= 4) { - so_decl[stream_id][decls[stream_id]++] = SO_DECL_HOLE_FLAG | 0xf; + so_decl[stream_id][decls[stream_id]++] = + SO_DECL_HOLE_FLAG | 0xf | decl_buffer_slot; skip_components -= 4; } if (skip_components > 0) so_decl[stream_id][decls[stream_id]++] = - SO_DECL_HOLE_FLAG | ((1 << skip_components) - 1); + SO_DECL_HOLE_FLAG | ((1 << skip_components) - 1) | + decl_buffer_slot; assert(linked_xfb_info->Outputs[i].DstOffset == next_offset[buffer]); |