mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 01:40:14 +01:00
zink: fix zink_mem_type_idx_from_bits()
at some point this used to work, but it no longer does what it's supposed to do, which is return a memtype from a heap+flags Fixes:d702a503ad("zink: support multiple heaps per memory type") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21025> (cherry picked from commitd23b3a1394)
This commit is contained in:
parent
d34ff0b916
commit
9c00c2d9ff
2 changed files with 2 additions and 2 deletions
|
|
@ -184,7 +184,7 @@
|
|||
"description": "zink: fix zink_mem_type_idx_from_bits()",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d702a503ad5cc8ca8fddb304a9343490beaf592d"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ static inline unsigned
|
|||
zink_mem_type_idx_from_bits(struct zink_screen *screen, enum zink_heap heap, uint32_t bits)
|
||||
{
|
||||
for (unsigned i = 0; i < screen->heap_count[heap]; i++) {
|
||||
if (bits & BITFIELD_BIT(screen->heap_map[heap][i])) {
|
||||
if (bits & screen->info.mem_props.memoryTypes[screen->heap_map[heap][i]].propertyFlags) {
|
||||
return screen->heap_map[heap][i];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue