Module: Mesa
Branch: master
Commit: 329b26ab7654263dacd66254d898c02f16c4c77f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=329b26ab7654263dacd66254d898c02f16c4c77f

Author: Erik Faye-Lund <[email protected]>
Date:   Wed Feb 10 18:07:39 2021 +0100

lavapipe: report correct value for minMemoryMapAlignment

The vulkan spec says the following about vkMapMemory:

"ppData is a pointer to a void * variable in which is returned a
 host-accessible pointer to the beginning of the mapped range. This
 pointer minus offset must be aligned to at least
 VkPhysicalDeviceLimits::minMemoryMapAlignment."

So let's report the same value as the gallium-driver reports, otherwise
we'll fail to adhere to the alignment requirement.

This fixes a few Piglit failures for Zink.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4267
Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8965>

---

 .gitlab-ci.yml                              | 2 --
 .gitlab-ci/piglit/zink-quick_gl.txt         | 7 +++----
 src/gallium/frontends/lavapipe/lvp_device.c | 2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e4cb8064d55..98f995f596a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1189,8 +1189,6 @@ zink-piglit-quick_gl:
     LP_NUM_THREADS: 0
     PIGLIT_OPTIONS: >
       -x arb_map_buffer_alignment@arb_map_buffer_alignment-map-invalidate-range
-      -x arb_map_buffer_range@map_invalidate_buffer_bit
-      -x arb_map_buffer_range@map_invalidate_range_bit
       -x ext_timer_query@time-elapsed
       -x glx-make-current
       -x max-texture-size
diff --git a/.gitlab-ci/piglit/zink-quick_gl.txt 
b/.gitlab-ci/piglit/zink-quick_gl.txt
index 7e485b453c2..004754d5623 100644
--- a/.gitlab-ci/piglit/zink-quick_gl.txt
+++ b/.gitlab-ci/piglit/zink-quick_gl.txt
@@ -1005,7 +1005,6 @@ spec/arb_indirect_parameters/tf-count-arrays: skip
 spec/arb_indirect_parameters/tf-count-elements: skip
 spec/arb_internalformat_query/minmax: skip
 spec/arb_internalformat_query/misc. api error checks: skip
-spec/arb_map_buffer_alignment/arb_map_buffer_alignment-sanity_test: fail
 spec/arb_pipeline_statistics_query/arb_pipeline_statistics_query-clip: skip
 spec/arb_pipeline_statistics_query/arb_pipeline_statistics_query-comp: skip
 spec/arb_pipeline_statistics_query/arb_pipeline_statistics_query-extra_prims: 
skip
@@ -3354,8 +3353,8 @@ wgl/wgl-sanity: skip
 summary:
        name:  results
        ----  --------
-       pass:    17906
-       fail:     1174
+       pass:    17913
+       fail:     1173
       crash:      322
        skip:     1829
     timeout:        0
@@ -3366,4 +3365,4 @@ summary:
     changes:        0
       fixes:        0
 regressions:        0
-      total:    21259
+      total:    21265
diff --git a/src/gallium/frontends/lavapipe/lvp_device.c 
b/src/gallium/frontends/lavapipe/lvp_device.c
index 10347ee7526..11bc75b67d9 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -467,7 +467,7 @@ VKAPI_ATTR void VKAPI_CALL 
lvp_GetPhysicalDeviceProperties(VkPhysicalDevice phys
       .maxViewportDimensions                    = { (1 << 14), (1 << 14) },
       .viewportBoundsRange                      = { -32768.0, 32768.0 },
       .viewportSubPixelBits                     = 
pdevice->pscreen->get_param(pdevice->pscreen, PIPE_CAP_VIEWPORT_SUBPIXEL_BITS),
-      .minMemoryMapAlignment                    = 4096, /* A page */
+      .minMemoryMapAlignment                    = 
pdevice->pscreen->get_param(pdevice->pscreen, 
PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT),
       .minTexelBufferOffsetAlignment            = 
pdevice->pscreen->get_param(pdevice->pscreen, 
PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT),
       .minUniformBufferOffsetAlignment          = 
pdevice->pscreen->get_param(pdevice->pscreen, 
PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT),
       .minStorageBufferOffsetAlignment          = 
pdevice->pscreen->get_param(pdevice->pscreen, 
PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT),

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to