diff options
author | Rafael Antognolli <[email protected]> | 2018-03-27 15:51:21 -0700 |
---|---|---|
committer | Rafael Antognolli <[email protected]> | 2018-04-05 07:42:45 -0700 |
commit | 94675edcfda93dab29f2ed8a1f218d6491dbb085 (patch) | |
tree | 6854439bd5a396bcfe34c06b29dad79ca9366601 /src/intel/blorp | |
parent | f77789a3f0bfd094f8d36dd50f65b5f948745eb1 (diff) |
intel: Use Clear Color struct size.
The size of the clear color struct (expected by the hardware) is 8
dwords (isl_dev.ss.clear_value_state_size here). But we still need to
track the size of the clear color, used when memcopying it to/from the
state buffer. For that we keep isl_dev.ss.clear_value_size.
v4:
- Add struct to gen11 too (Jason, Jordan)
- Add field for Converted Clear Color to gen11 (Jason)
- Add clear_color_state_offset to differentiate from
clear_value_offset.
- Fix all the places where clear_value_size was used.
v5 (Jason):
- Split genxml changes to another commit.
- Remove unnecessary gen checks.
- Bring back missing offset increment to init_fast_clear_color().
v6 (Jason):
- On init_fast_clear_color, change:
addr.offset += 4 => sdi.Address.offset += i * 4
- Use GEN_GEN instead of GEN_VERSIONx10.
[[email protected]: isl_device_init changes]
Signed-off-by: Rafael Antognolli <[email protected]>
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/blorp')
-rw-r--r-- | src/intel/blorp/blorp_genX_exec.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index 992bc9959a1..f3a96fbd58c 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -310,10 +310,11 @@ blorp_emit_vertex_buffers(struct blorp_batch *batch, uint32_t num_vbs = 2; if (params->dst_clear_color_as_input) { + const unsigned clear_color_size = + GEN_GEN < 10 ? batch->blorp->isl_dev->ss.clear_value_size : 4 * 4; blorp_fill_vertex_buffer_state(batch, vb, num_vbs++, params->dst.clear_color_addr, - batch->blorp->isl_dev->ss.clear_value_size, - 0); + clear_color_size, 0); } const unsigned num_dwords = 1 + num_vbs * GENX(VERTEX_BUFFER_STATE_length); |