mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 12:40:23 +01:00
zink: return 256 for PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT
this isn't the minimum allowed by the driver, but zink doesn't return the minimum allowed by the driver anyway and hasn't in a very long time instead, it suballocates using a minimum alignment of 256 bytes, so use that instead fixes (in caselists): KHR-GL46.map_buffer_alignment.functional Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14720>
This commit is contained in:
parent
a7ae3bcdf8
commit
8bca29dcf0
3 changed files with 3 additions and 2 deletions
|
|
@ -1184,7 +1184,7 @@ zink_bo_init(struct zink_screen *screen)
|
|||
total_mem / 8, screen,
|
||||
(void*)bo_destroy, (void*)bo_can_reclaim);
|
||||
|
||||
unsigned min_slab_order = 8; /* 256 bytes */
|
||||
unsigned min_slab_order = MIN_SLAB_ORDER; /* 256 bytes */
|
||||
unsigned max_slab_order = 20; /* 1 MB (slab size = 2 MB) */
|
||||
unsigned num_slab_orders_per_allocator = (max_slab_order - min_slab_order) /
|
||||
NUM_SLAB_ALLOCATORS;
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
screen->timestamp_valid_bits > 0;
|
||||
|
||||
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
|
||||
return screen->info.props.limits.minMemoryMapAlignment;
|
||||
return 1 << MIN_SLAB_ORDER;
|
||||
|
||||
case PIPE_CAP_CUBE_MAP_ARRAY:
|
||||
return screen->info.feats.features.imageCubeArray;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ enum zink_descriptor_type;
|
|||
#define ZINK_DEBUG_VALIDATION 0x8
|
||||
|
||||
#define NUM_SLAB_ALLOCATORS 3
|
||||
#define MIN_SLAB_ORDER 8
|
||||
|
||||
enum zink_descriptor_mode {
|
||||
ZINK_DESCRIPTOR_MODE_AUTO,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue