mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
zink: slightly rework memoryTypeIndex selection to pre-determine heap
should be no functional changes Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22567>
This commit is contained in:
parent
27dd6245d3
commit
3c2be41e1c
2 changed files with 4 additions and 5 deletions
|
|
@ -139,7 +139,7 @@
|
|||
"description": "zink: slightly rework memoryTypeIndex selection to pre-determine heap",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1061,8 +1061,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
alignment = MAX2(alignment, screen->info.props.limits.minMemoryMapAlignment);
|
||||
obj->alignment = alignment;
|
||||
|
||||
mai.memoryTypeIndex = zink_mem_type_idx_from_bits(screen, heap, reqs.memoryTypeBits);
|
||||
if (mai.memoryTypeIndex == UINT32_MAX) {
|
||||
if (zink_mem_type_idx_from_bits(screen, heap, reqs.memoryTypeBits) == UINT32_MAX) {
|
||||
/* not valid based on reqs; demote to more compatible type */
|
||||
switch (heap) {
|
||||
case ZINK_HEAP_DEVICE_LOCAL_VISIBLE:
|
||||
|
|
@ -1074,9 +1073,9 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
default:
|
||||
break;
|
||||
}
|
||||
mai.memoryTypeIndex = zink_mem_type_idx_from_bits(screen, heap, reqs.memoryTypeBits);
|
||||
assert(mai.memoryTypeIndex != UINT32_MAX);
|
||||
assert(zink_mem_type_idx_from_bits(screen, heap, reqs.memoryTypeBits) != UINT32_MAX);
|
||||
}
|
||||
mai.memoryTypeIndex = zink_mem_type_idx_from_bits(screen, heap, reqs.memoryTypeBits);
|
||||
assert(reqs.memoryTypeBits & BITFIELD_BIT(mai.memoryTypeIndex));
|
||||
|
||||
retry:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue