/[packages]/cauldron/mesa/current/SOURCES/0019-v3d-Fix-setup-of-the-VCM-cache-size.patch
ViewVC logotype

Contents of /cauldron/mesa/current/SOURCES/0019-v3d-Fix-setup-of-the-VCM-cache-size.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1257897 - (show annotations) (download)
Sat Sep 8 20:31:12 2018 UTC (5 years, 7 months ago) by tmb
File size: 2182 byte(s)
add fixes from staging/18.2 branch
1 From ded225eb9870ef7ab3c60de2876daeb3d0168c41 Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Fri, 24 Aug 2018 15:45:37 -0700
4 Subject: [PATCH 19/20] v3d: Fix setup of the VCM cache size.
5
6 There were two bugs working together to make things mostly work: I wasn't
7 dividing the VPM output size available by the size of a batch (vertex),
8 but I also had the size of the VPM reduced by a factor of 8.
9
10 Fixes dEQP-GLES3.functional.vertex_array_objects.all_attributes and it
11 seems also my intermittent varying failures.
12
13 Fixes: 1561e4984eb0 ("v3d: Emit the VCM_CACHE_SIZE packet.")
14 (cherry picked from commit a91b158bd9e1b6bc08f1d5ac350cd8b68e372042)
15 ---
16 src/broadcom/compiler/vir.c | 3 ++-
17 src/gallium/drivers/v3d/v3d_screen.c | 2 +-
18 2 files changed, 3 insertions(+), 2 deletions(-)
19
20 diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c
21 index 1c8223165c..6b55b0e03b 100644
22 --- a/src/broadcom/compiler/vir.c
23 +++ b/src/broadcom/compiler/vir.c
24 @@ -774,7 +774,8 @@ uint64_t *v3d_compile_vs(const struct v3d_compiler *compiler,
25 int sector_size = 16 * sizeof(uint32_t) * 8;
26 int vpm_size_in_sectors = c->devinfo->vpm_size / sector_size;
27 int half_vpm = vpm_size_in_sectors / 2;
28 - int vpm_output_batches = half_vpm - prog_data->vpm_input_size;
29 + int vpm_output_sectors = half_vpm - prog_data->vpm_input_size;
30 + int vpm_output_batches = vpm_output_sectors / prog_data->vpm_output_size;
31 assert(vpm_output_batches >= 2);
32 prog_data->vcm_cache_size = CLAMP(vpm_output_batches - 1, 2, 4);
33
34 diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
35 index cae6cc3f6e..2f084792e6 100644
36 --- a/src/gallium/drivers/v3d/v3d_screen.c
37 +++ b/src/gallium/drivers/v3d/v3d_screen.c
38 @@ -585,7 +585,7 @@ v3d_get_device_info(struct v3d_screen *screen)
39 uint32_t minor = (ident1.value >> 0) & 0xf;
40 screen->devinfo.ver = major * 10 + minor;
41
42 - screen->devinfo.vpm_size = (ident1.value >> 28 & 0xf) * 1024;
43 + screen->devinfo.vpm_size = (ident1.value >> 28 & 0xf) * 8192;
44
45 switch (screen->devinfo.ver) {
46 case 33:
47 --
48 2.18.0
49

  ViewVC Help
Powered by ViewVC 1.1.30