mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 07:40:11 +01:00
anv: fix how NULL buffer_view is handled in anv_descriptor_set_write_buffer_view
CID: 1531855 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24109>
This commit is contained in:
parent
127999989a
commit
fb070b1dfd
1 changed files with 7 additions and 8 deletions
|
|
@ -1783,7 +1783,10 @@ anv_descriptor_set_write_buffer_view(struct anv_device *device,
|
|||
element * bind_layout->descriptor_stride;
|
||||
|
||||
if (buffer_view == NULL) {
|
||||
memset(desc_map, 0, bind_layout->descriptor_stride);
|
||||
if (data & ANV_DESCRIPTOR_SURFACE)
|
||||
memcpy(desc_map, device->null_surface_state.map, ANV_SURFACE_STATE_SIZE);
|
||||
else
|
||||
memset(desc_map, 0, bind_layout->descriptor_stride);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1804,13 +1807,9 @@ anv_descriptor_set_write_buffer_view(struct anv_device *device,
|
|||
}
|
||||
|
||||
if (data & ANV_DESCRIPTOR_SURFACE) {
|
||||
if (buffer_view != NULL) {
|
||||
memcpy(desc_map,
|
||||
anv_buffer_view_surface_data(buffer_view, type),
|
||||
ANV_SURFACE_STATE_SIZE);
|
||||
} else {
|
||||
memcpy(desc_map, device->null_surface_state.map, ANV_SURFACE_STATE_SIZE);
|
||||
}
|
||||
memcpy(desc_map,
|
||||
anv_buffer_view_surface_data(buffer_view, type),
|
||||
ANV_SURFACE_STATE_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue