Mesa (master): freedreno: Fix attempts to push UBO contents past the constlen on pre-a6xx.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 14 01:54:02 UTC 2020
Module: Mesa
Branch: master
Commit: 3111cee2f627d7e681e1695e1e4b1b5b126d5c7d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3111cee2f627d7e681e1695e1e4b1b5b126d5c7d
Author: Eric Anholt <eric at anholt.net>
Date: Wed May 13 10:34:25 2020 -0700
freedreno: Fix attempts to push UBO contents past the constlen on pre-a6xx.
The binning variant likely won't have any UBO load code in it, so we were
writing past constlen (and sometimes asserting about it) when loading more
than one ubo block.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5027>
---
.gitlab-ci/deqp-freedreno-a307-fails.txt | 1 -
.gitlab-ci/deqp-freedreno-a530-fails.txt | 6 ------
src/gallium/drivers/freedreno/ir3/ir3_const.h | 6 ++++++
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/.gitlab-ci/deqp-freedreno-a307-fails.txt b/.gitlab-ci/deqp-freedreno-a307-fails.txt
index 7cf581dc204..c0e53542372 100644
--- a/.gitlab-ci/deqp-freedreno-a307-fails.txt
+++ b/.gitlab-ci/deqp-freedreno-a307-fails.txt
@@ -2466,7 +2466,6 @@ dEQP-GLES3.functional.ubo.random.nested_structs_arrays.16
dEQP-GLES3.functional.ubo.random.nested_structs_arrays.17
dEQP-GLES3.functional.ubo.random.nested_structs_arrays.18
dEQP-GLES3.functional.ubo.random.nested_structs_arrays.19
-dEQP-GLES3.functional.ubo.random.nested_structs_arrays.2
dEQP-GLES3.functional.ubo.random.nested_structs_arrays.20
dEQP-GLES3.functional.ubo.random.nested_structs_arrays.21
dEQP-GLES3.functional.ubo.random.nested_structs_arrays.22
diff --git a/.gitlab-ci/deqp-freedreno-a530-fails.txt b/.gitlab-ci/deqp-freedreno-a530-fails.txt
index 6eedfc5587e..9a56f168dd3 100644
--- a/.gitlab-ci/deqp-freedreno-a530-fails.txt
+++ b/.gitlab-ci/deqp-freedreno-a530-fails.txt
@@ -1510,7 +1510,6 @@ dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.column_major_mat3x4_b
dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.column_major_mat3x4_vertex
dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.column_major_mat4_both
dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.column_major_mat4_vertex
-dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.column_major_mat4x2_both
dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.column_major_mat4x2_vertex
dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.column_major_mat4x3_both
dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.column_major_mat4x3_vertex
@@ -1695,7 +1694,6 @@ dEQP-GLES3.functional.ubo.random.all_shared_buffer.23
dEQP-GLES3.functional.ubo.random.all_shared_buffer.24
dEQP-GLES3.functional.ubo.random.all_shared_buffer.25
dEQP-GLES3.functional.ubo.random.all_shared_buffer.26
-dEQP-GLES3.functional.ubo.random.all_shared_buffer.27
dEQP-GLES3.functional.ubo.random.all_shared_buffer.28
dEQP-GLES3.functional.ubo.random.all_shared_buffer.29
dEQP-GLES3.functional.ubo.random.all_shared_buffer.2
@@ -1768,7 +1766,6 @@ dEQP-GLES3.functional.ubo.random.basic_instance_arrays.21
dEQP-GLES3.functional.ubo.random.basic_instance_arrays.22
dEQP-GLES3.functional.ubo.random.basic_instance_arrays.23
dEQP-GLES3.functional.ubo.random.basic_instance_arrays.24
-dEQP-GLES3.functional.ubo.random.basic_instance_arrays.2
dEQP-GLES3.functional.ubo.random.basic_instance_arrays.3
dEQP-GLES3.functional.ubo.random.basic_instance_arrays.4
dEQP-GLES3.functional.ubo.random.basic_instance_arrays.5
@@ -1868,7 +1865,6 @@ dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.21
dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.22
dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.23
dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.24
-dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.2
dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.3
dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.4
dEQP-GLES3.functional.ubo.random.nested_structs_arrays_instance_arrays.5
@@ -1918,7 +1914,6 @@ dEQP-GLES3.functional.ubo.random.scalar_types.21
dEQP-GLES3.functional.ubo.random.scalar_types.22
dEQP-GLES3.functional.ubo.random.scalar_types.23
dEQP-GLES3.functional.ubo.random.scalar_types.24
-dEQP-GLES3.functional.ubo.random.scalar_types.2
dEQP-GLES3.functional.ubo.random.scalar_types.3
dEQP-GLES3.functional.ubo.random.scalar_types.4
dEQP-GLES3.functional.ubo.random.scalar_types.5
@@ -1997,4 +1992,3 @@ dEQP-GLES31.functional.image_load_store.cube.load_store.rgba32i_single_layer
dEQP-GLES31.functional.separate_shader.random.99
dEQP-GLES31.functional.texture.texture_buffer.render.as_index_array_as_fragment_texture.offset_7_alignments
dEQP-GLES31.functional.ubo.random.all_per_block_buffers.21
-dEQP-GLES31.functional.ubo.random.all_shared_buffer.22
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_const.h b/src/gallium/drivers/freedreno/ir3/ir3_const.h
index 157bc273bde..a0076991b86 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_const.h
+++ b/src/gallium/drivers/freedreno/ir3/ir3_const.h
@@ -106,6 +106,12 @@ ir3_emit_user_consts(struct fd_screen *screen, const struct ir3_shader_variant *
uint32_t size = state->range[i].end - state->range[i].start;
uint32_t offset = cb->buffer_offset + state->range[i].start;
+ /* Pre-a6xx, we might have ranges enabled in the shader that aren't
+ * used in the binning variant.
+ */
+ if (16 * v->constlen <= state->range[i].offset)
+ continue;
+
/* and even if the start of the const buffer is before
* first_immediate, the end may not be:
*/
More information about the mesa-commit
mailing list