Module: Mesa
Branch: main
Commit: 5b31659650335986fdf9421a101a43cb34faf846
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b31659650335986fdf9421a101a43cb34faf846

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Feb 10 15:02:29 2023 -0500

zink: rename a struct member for clarity

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21246>

---

 src/gallium/drivers/zink/zink_descriptors.c | 10 +++++-----
 src/gallium/drivers/zink/zink_types.h       |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_descriptors.c 
b/src/gallium/drivers/zink/zink_descriptors.c
index 4a3cd6ee6f5..ea8a60511af 100644
--- a/src/gallium/drivers/zink/zink_descriptors.c
+++ b/src/gallium/drivers/zink/zink_descriptors.c
@@ -1648,7 +1648,7 @@ zink_descriptors_init_bindless(struct zink_context *ctx)
       for (unsigned i = 0; i < 4; i++) {
          VkDeviceSize offset;
          VKSCR(GetDescriptorSetLayoutBindingOffsetEXT)(screen->dev, 
screen->bindless_layout, i, &offset);
-         ctx->dd.db.db_offsets[i] = offset;
+         ctx->dd.db.bindless_db_offsets[i] = offset;
       }
    } else {
       VkDescriptorPoolCreateInfo dpci = {0};
@@ -1712,13 +1712,13 @@ zink_descriptors_update_bindless(struct zink_context 
*ctx)
                size_t size = i ? 
screen->info.db_props.robustStorageTexelBufferDescriptorSize : 
screen->info.db_props.robustUniformTexelBufferDescriptorSize;
                info.type = i ? VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER : 
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER;
                info.data.pSampler = 
(void*)&ctx->di.bindless[i].db.buffer_infos[handle];
-               VKSCR(GetDescriptorEXT)(screen->dev, &info, size, 
ctx->dd.db.bindless_db_map + ctx->dd.db.db_offsets[binding] + handle * size);
+               VKSCR(GetDescriptorEXT)(screen->dev, &info, size, 
ctx->dd.db.bindless_db_map + ctx->dd.db.bindless_db_offsets[binding] + handle * 
size);
             } else {
                info.type = i ? VK_DESCRIPTOR_TYPE_STORAGE_IMAGE : 
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
                if 
(screen->info.db_props.combinedImageSamplerDescriptorSingleArray || i) {
                   size_t size = i ? 
screen->info.db_props.storageImageDescriptorSize : 
screen->info.db_props.combinedImageSamplerDescriptorSize;
                   info.data.pSampler = 
(void*)&ctx->di.bindless[i].img_infos[handle];
-                  VKSCR(GetDescriptorEXT)(screen->dev, &info, size, 
ctx->dd.db.bindless_db_map + ctx->dd.db.db_offsets[binding] + handle * size);
+                  VKSCR(GetDescriptorEXT)(screen->dev, &info, size, 
ctx->dd.db.bindless_db_map + ctx->dd.db.bindless_db_offsets[binding] + handle * 
size);
                } else {
                   /* drivers that don't support 
combinedImageSamplerDescriptorSingleArray must have sampler arrays written in 
memory as
                    *
@@ -1730,10 +1730,10 @@ zink_descriptors_update_bindless(struct zink_context 
*ctx)
                   size_t size = 
screen->info.db_props.combinedImageSamplerDescriptorSize;
                   info.data.pSampler = 
(void*)&ctx->di.bindless[i].img_infos[handle];
                   VKSCR(GetDescriptorEXT)(screen->dev, &info, size, buf);
-                  memcpy(ctx->dd.db.bindless_db_map + 
ctx->dd.db.db_offsets[binding] + handle * 
screen->info.db_props.samplerDescriptorSize, buf, 
screen->info.db_props.samplerDescriptorSize);
+                  memcpy(ctx->dd.db.bindless_db_map + 
ctx->dd.db.bindless_db_offsets[binding] + handle * 
screen->info.db_props.samplerDescriptorSize, buf, 
screen->info.db_props.samplerDescriptorSize);
                   size_t offset = screen->info.db_props.samplerDescriptorSize 
* ZINK_MAX_BINDLESS_HANDLES;
                   offset += handle * 
screen->info.db_props.sampledImageDescriptorSize;
-                  memcpy(ctx->dd.db.bindless_db_map + 
ctx->dd.db.db_offsets[binding] + offset, 
&buf[screen->info.db_props.samplerDescriptorSize], 
screen->info.db_props.sampledImageDescriptorSize);
+                  memcpy(ctx->dd.db.bindless_db_map + 
ctx->dd.db.bindless_db_offsets[binding] + offset, 
&buf[screen->info.db_props.samplerDescriptorSize], 
screen->info.db_props.sampledImageDescriptorSize);
                }
             }
          } else {
diff --git a/src/gallium/drivers/zink/zink_types.h 
b/src/gallium/drivers/zink/zink_types.h
index 81eae050cae..19c8154a6d2 100644
--- a/src/gallium/drivers/zink/zink_types.h
+++ b/src/gallium/drivers/zink/zink_types.h
@@ -405,7 +405,7 @@ struct zink_descriptor_data {
          struct zink_resource *bindless_db;
          uint8_t *bindless_db_map;
          struct pipe_transfer *bindless_db_xfer;
-         uint32_t db_offsets[4];
+         uint32_t bindless_db_offsets[4];
       } db;
    };
 

Reply via email to