mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 03:30:22 +01:00
nvk: Drop the union from nvk_buffer_view
The space saved is tiny and not having the union at all makes me way more comfortable about the modifications we're about to do. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
This commit is contained in:
parent
4b1c824b67
commit
7a577d2e3a
2 changed files with 3 additions and 7 deletions
|
|
@ -97,12 +97,11 @@ nvk_DestroyBufferView(VkDevice _device,
|
|||
{
|
||||
VK_FROM_HANDLE(nvk_device, dev, _device);
|
||||
VK_FROM_HANDLE(nvk_buffer_view, view, bufferView);
|
||||
const struct nvk_physical_device *pdev = nvk_device_physical(dev);
|
||||
|
||||
if (!view)
|
||||
return;
|
||||
|
||||
if (!nvk_use_edb_buffer_views(pdev))
|
||||
if (view->desc.image_index)
|
||||
nvk_descriptor_table_remove(dev, &dev->images, view->desc.image_index);
|
||||
|
||||
vk_buffer_view_destroy(&dev->vk, pAllocator, &view->vk);
|
||||
|
|
|
|||
|
|
@ -20,11 +20,8 @@ nvk_get_buffer_format_features(const struct nvk_physical_device *pdev,
|
|||
struct nvk_buffer_view {
|
||||
struct vk_buffer_view vk;
|
||||
|
||||
/* Selected based on nvk_use_edb_buffer_views() */
|
||||
union {
|
||||
struct nvk_buffer_view_descriptor desc;
|
||||
struct nvk_edb_buffer_view_descriptor edb_desc;
|
||||
};
|
||||
struct nvk_buffer_view_descriptor desc;
|
||||
struct nvk_edb_buffer_view_descriptor edb_desc;
|
||||
};
|
||||
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(nvk_buffer_view, vk.base, VkBufferView,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue