summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2019-01-03 16:17:04 +0000
committerLionel Landwerlin <[email protected]>2019-01-04 11:18:54 +0000
commit92b7407090b1f11af49133968b63d583eba9b803 (patch)
tree0cc9fb5a02d3c2c3a4fafe758adb26bc8b88aaa4 /src
parentda634a4acbf096549e24e4b152cd2286172db672 (diff)
i965: include draw_params/derived_draw_params for VF cache workaround
These buffers are using VB slots and should be included in the workaround decision. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Fixes: a363bb2cd0e2a1 ("i965: Allocate VMA in userspace for full-PPGTT systems.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109072
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/genX_state_upload.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index 7f7406a68de..ad8c463d474 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -538,9 +538,8 @@ vf_invalidate_for_vb_48bit_transitions(struct brw_context *brw)
{
#if GEN_GEN >= 8 && GEN_GEN < 11
bool need_invalidate = false;
- unsigned i;
- for (i = 0; i < brw->vb.nr_buffers; i++) {
+ for (unsigned i = 0; i < brw->vb.nr_buffers; i++) {
uint16_t high_bits = pinned_bo_high_bits(brw->vb.buffers[i].bo);
if (high_bits != brw->vb.last_bo_high_bits[i]) {
@@ -549,9 +548,23 @@ vf_invalidate_for_vb_48bit_transitions(struct brw_context *brw)
}
}
- /* Don't bother with draw parameter buffers - those are generated by
- * the driver so we can select a consistent memory zone.
- */
+ if (brw->draw.draw_params_bo) {
+ uint16_t high_bits = pinned_bo_high_bits(brw->draw.draw_params_bo);
+
+ if (brw->vb.last_bo_high_bits[brw->vb.nr_buffers] != high_bits) {
+ need_invalidate = true;
+ brw->vb.last_bo_high_bits[brw->vb.nr_buffers] = high_bits;
+ }
+ }
+
+ if (brw->draw.derived_draw_params_bo) {
+ uint16_t high_bits = pinned_bo_high_bits(brw->draw.derived_draw_params_bo);
+
+ if (brw->vb.last_bo_high_bits[brw->vb.nr_buffers + 1] != high_bits) {
+ need_invalidate = true;
+ brw->vb.last_bo_high_bits[brw->vb.nr_buffers + 1] = high_bits;
+ }
+ }
if (need_invalidate) {
brw_emit_pipe_control_flush(brw, PIPE_CONTROL_VF_CACHE_INVALIDATE);