summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-11-30 10:31:44 -0800
committerJason Ekstrand <[email protected]>2015-11-30 10:58:02 -0800
commit3db43e8f3e60f8dc746eb4ab2e86f6b1b32d248a (patch)
treeda7417bde92a03475d090f621a43310e00ed8c57 /src
parent5cb57806b2fe45bbd902bb4e21d7ea216e65834e (diff)
vk/0.210.0: Switch to the new-style handle declarations
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/anv_descriptor_set.c4
-rw-r--r--src/vulkan/anv_device.c2
-rw-r--r--src/vulkan/anv_meta.c4
-rw-r--r--src/vulkan/anv_pipeline.c2
-rw-r--r--src/vulkan/anv_private.h4
5 files changed, 8 insertions, 8 deletions
diff --git a/src/vulkan/anv_descriptor_set.c b/src/vulkan/anv_descriptor_set.c
index d518dfa34ba..22041b540d6 100644
--- a/src/vulkan/anv_descriptor_set.c
+++ b/src/vulkan/anv_descriptor_set.c
@@ -286,7 +286,7 @@ VkResult anv_CreateDescriptorPool(
VkDescriptorPool* pDescriptorPool)
{
anv_finishme("VkDescriptorPool is a stub");
- pDescriptorPool->handle = 1;
+ *pDescriptorPool = (VkDescriptorPool)1;
return VK_SUCCESS;
}
@@ -466,7 +466,7 @@ void anv_UpdateDescriptorSets(
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
for (uint32_t j = 0; j < write->count; j++) {
- assert(write->pDescriptors[j].bufferInfo.buffer.handle);
+ assert(write->pDescriptors[j].bufferInfo.buffer);
ANV_FROM_HANDLE(anv_buffer, buffer,
write->pDescriptors[j].bufferInfo.buffer);
assert(buffer);
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c
index 94bc4f11f27..aca082ac1b5 100644
--- a/src/vulkan/anv_device.c
+++ b/src/vulkan/anv_device.c
@@ -1336,7 +1336,7 @@ VkResult anv_CreateSemaphore(
const VkSemaphoreCreateInfo* pCreateInfo,
VkSemaphore* pSemaphore)
{
- pSemaphore->handle = 1;
+ *pSemaphore = (VkSemaphore)1;
stub_return(VK_SUCCESS);
}
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c
index c9e46a9286e..96792e9d6da 100644
--- a/src/vulkan/anv_meta.c
+++ b/src/vulkan/anv_meta.c
@@ -335,7 +335,7 @@ anv_device_init_meta_blit_state(struct anv_device *device)
}, {
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
.stage = VK_SHADER_STAGE_FRAGMENT,
- .shader = {0}, /* TEMPLATE VALUE! FILL ME IN! */
+ .shader = VK_NULL_HANDLE, /* TEMPLATE VALUE! FILL ME IN! */
.pSpecializationInfo = NULL
},
};
@@ -452,7 +452,7 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
VkTexFilter blit_filter)
{
struct anv_device *device = cmd_buffer->device;
- VkDescriptorPool dummy_desc_pool = { .handle = 1 };
+ VkDescriptorPool dummy_desc_pool = (VkDescriptorPool)1;
struct blit_vb_data {
float pos[2];
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index cf4bf9f87a0..a0606adaea6 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -189,7 +189,7 @@ VkResult anv_CreatePipelineCache(
const VkPipelineCacheCreateInfo* pCreateInfo,
VkPipelineCache* pPipelineCache)
{
- pPipelineCache->handle = 1;
+ *pPipelineCache = (VkPipelineCache)1;
stub_return(VK_SUCCESS);
}
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h
index d208b2d74a0..c99d4e0a59e 100644
--- a/src/vulkan/anv_private.h
+++ b/src/vulkan/anv_private.h
@@ -1537,13 +1537,13 @@ void anv_dump_image_to_ppm(struct anv_device *device,
static inline struct __anv_type * \
__anv_type ## _from_handle(__VkType _handle) \
{ \
- return (struct __anv_type *) _handle.handle; \
+ return (struct __anv_type *)(uintptr_t) _handle; \
} \
\
static inline __VkType \
__anv_type ## _to_handle(struct __anv_type *_obj) \
{ \
- return (__VkType) { .handle = (uint64_t) _obj }; \
+ return (__VkType)(uintptr_t) _obj; \
}
#define ANV_FROM_HANDLE(__anv_type, __name, __handle) \