/[packages]/cauldron/mesa/current/SOURCES/0051-i965-include-draw_params-derived_draw_params-for-VF-.patch
ViewVC logotype

Contents of /cauldron/mesa/current/SOURCES/0051-i965-include-draw_params-derived_draw_params-for-VF-.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1355920 - (show annotations) (download)
Sun Jan 13 14:22:00 2019 UTC (5 years, 3 months ago) by tmb
File size: 2484 byte(s)
add current fixes from upstream staging/18.3 branch
1 From 2a54a90e51347e3431ebb21faaa747fdc320d9d2 Mon Sep 17 00:00:00 2001
2 From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
3 Date: Thu, 3 Jan 2019 16:17:04 +0000
4 Subject: [PATCH 51/78] i965: include draw_params/derived_draw_params for VF
5 cache workaround
6
7 These buffers are using VB slots and should be included in the
8 workaround decision.
9
10 Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
11 Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
12 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 Fixes: a363bb2cd0e2a1 ("i965: Allocate VMA in userspace for full-PPGTT systems.")
14 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109072
15 (cherry picked from commit 92b7407090b1f11af49133968b63d583eba9b803)
16 ---
17 src/mesa/drivers/dri/i965/genX_state_upload.c | 23 +++++++++++++++----
18 1 file changed, 18 insertions(+), 5 deletions(-)
19
20 diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
21 index 9cd017a5cf..28c60c9edf 100644
22 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c
23 +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
24 @@ -505,9 +505,8 @@ vf_invalidate_for_vb_48bit_transitions(struct brw_context *brw)
25 {
26 #if GEN_GEN >= 8
27 bool need_invalidate = false;
28 - unsigned i;
29
30 - for (i = 0; i < brw->vb.nr_buffers; i++) {
31 + for (unsigned i = 0; i < brw->vb.nr_buffers; i++) {
32 uint16_t high_bits = pinned_bo_high_bits(brw->vb.buffers[i].bo);
33
34 if (high_bits != brw->vb.last_bo_high_bits[i]) {
35 @@ -516,9 +515,23 @@ vf_invalidate_for_vb_48bit_transitions(struct brw_context *brw)
36 }
37 }
38
39 - /* Don't bother with draw parameter buffers - those are generated by
40 - * the driver so we can select a consistent memory zone.
41 - */
42 + if (brw->draw.draw_params_bo) {
43 + uint16_t high_bits = pinned_bo_high_bits(brw->draw.draw_params_bo);
44 +
45 + if (brw->vb.last_bo_high_bits[brw->vb.nr_buffers] != high_bits) {
46 + need_invalidate = true;
47 + brw->vb.last_bo_high_bits[brw->vb.nr_buffers] = high_bits;
48 + }
49 + }
50 +
51 + if (brw->draw.derived_draw_params_bo) {
52 + uint16_t high_bits = pinned_bo_high_bits(brw->draw.derived_draw_params_bo);
53 +
54 + if (brw->vb.last_bo_high_bits[brw->vb.nr_buffers + 1] != high_bits) {
55 + need_invalidate = true;
56 + brw->vb.last_bo_high_bits[brw->vb.nr_buffers + 1] = high_bits;
57 + }
58 + }
59
60 if (need_invalidate) {
61 brw_emit_pipe_control_flush(brw, PIPE_CONTROL_VF_CACHE_INVALIDATE);
62 --
63 2.20.1
64

  ViewVC Help
Powered by ViewVC 1.1.30