[PATCH vkd3d 09/12] vkd3d: Prefer uint64_t to UINT64.

Józef Kucia joseph.kucia at gmail.com
Tue Jun 11 03:13:35 CDT 2019


From: Józef Kucia <jkucia at codeweavers.com>

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 libs/vkd3d/command.c       |  4 ++--
 libs/vkd3d/device.c        | 10 +++++-----
 libs/vkd3d/resource.c      |  6 +++---
 libs/vkd3d/vkd3d_private.h |  6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index f4ad829063dc..97cc7de1c59e 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -944,7 +944,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_fence_GetDevice(ID3D12Fence *iface, REFII
 static UINT64 STDMETHODCALLTYPE d3d12_fence_GetCompletedValue(ID3D12Fence *iface)
 {
     struct d3d12_fence *fence = impl_from_ID3D12Fence(iface);
-    UINT64 completed_value;
+    uint64_t completed_value;
     int rc;
 
     TRACE("iface %p.\n", iface);
@@ -1086,7 +1086,7 @@ static HRESULT d3d12_fence_init(struct d3d12_fence *fence, struct d3d12_device *
 }
 
 HRESULT d3d12_fence_create(struct d3d12_device *device,
-        UINT64 initial_value, D3D12_FENCE_FLAGS flags, struct d3d12_fence **fence)
+        uint64_t initial_value, D3D12_FENCE_FLAGS flags, struct d3d12_fence **fence)
 {
     struct d3d12_fence *object;
 
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index 870b88af8282..4df2462eed12 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -2623,8 +2623,8 @@ static D3D12_RESOURCE_ALLOCATION_INFO * STDMETHODCALLTYPE d3d12_device_GetResour
     struct d3d12_device *device = impl_from_ID3D12Device(iface);
     const struct vkd3d_format *format;
     const D3D12_RESOURCE_DESC *desc;
-    UINT64 requested_alignment;
-    UINT64 estimated_size;
+    uint64_t requested_alignment;
+    uint64_t estimated_size;
 
     TRACE("iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p.\n",
             iface, info, visible_mask, count, resource_descs);
@@ -2694,7 +2694,7 @@ static D3D12_RESOURCE_ALLOCATION_INFO * STDMETHODCALLTYPE d3d12_device_GetResour
     return info;
 
 invalid:
-    info->SizeInBytes = ~(UINT64)0;
+    info->SizeInBytes = ~(uint64_t)0;
 
     /* FIXME: Should we support D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT for small MSSA resources? */
     if (desc->SampleDesc.Count != 1)
@@ -2890,7 +2890,7 @@ static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device *i
     unsigned int i, sub_resource_idx, miplevel_idx, row_count, row_size, row_pitch;
     unsigned int width, height, depth, array_size;
     const struct vkd3d_format *format;
-    UINT64 offset, size, total;
+    uint64_t offset, size, total;
 
     TRACE("iface %p, desc %p, first_sub_resource %u, sub_resource_count %u, base_offset %#"PRIx64", "
             "layouts %p, row_counts %p, row_sizes %p, total_bytes %p.\n",
@@ -2904,7 +2904,7 @@ static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device *i
     if (row_sizes)
         memset(row_sizes, 0xff, sizeof(*row_sizes) * sub_resource_count);
     if (total_bytes)
-        *total_bytes = ~(UINT64)0;
+        *total_bytes = ~(uint64_t)0;
 
     if (desc->Dimension == D3D12_RESOURCE_DIMENSION_BUFFER)
     {
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index 6bbd5afa2eea..d005fa8865aa 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -265,7 +265,7 @@ struct d3d12_heap *unsafe_impl_from_ID3D12Heap(ID3D12Heap *iface)
     return impl_from_ID3D12Heap(iface);
 }
 
-static HRESULT d3d12_heap_map(struct d3d12_heap *heap, UINT64 offset, void **data)
+static HRESULT d3d12_heap_map(struct d3d12_heap *heap, uint64_t offset, void **data)
 {
     struct d3d12_device *device = heap->device;
     HRESULT hr = S_OK;
@@ -1540,7 +1540,7 @@ allocate_memory:
     return vkd3d_allocate_resource_memory(device, resource, &heap->desc.Properties, heap->desc.Flags);
 }
 
-HRESULT d3d12_placed_resource_create(struct d3d12_device *device, struct d3d12_heap *heap, UINT64 heap_offset,
+HRESULT d3d12_placed_resource_create(struct d3d12_device *device, struct d3d12_heap *heap, uint64_t heap_offset,
         const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
         const D3D12_CLEAR_VALUE *optimized_clear_value, struct d3d12_resource **resource)
 {
@@ -3036,7 +3036,7 @@ static D3D12_GPU_DESCRIPTOR_HANDLE * STDMETHODCALLTYPE d3d12_descriptor_heap_Get
 
     TRACE("iface %p, descriptor %p.\n", iface, descriptor);
 
-    descriptor->ptr = (UINT64)(intptr_t)heap->descriptors;
+    descriptor->ptr = (uint64_t)(intptr_t)heap->descriptors;
 
     return descriptor;
 }
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index e01e00503081..9191ae258956 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -319,7 +319,7 @@ struct d3d12_fence
 };
 
 HRESULT d3d12_fence_create(struct d3d12_device *device,
-        UINT64 initial_value, D3D12_FENCE_FLAGS flags, struct d3d12_fence **fence) DECLSPEC_HIDDEN;
+        uint64_t initial_value, D3D12_FENCE_FLAGS flags, struct d3d12_fence **fence) DECLSPEC_HIDDEN;
 
 /* ID3D12Heap */
 struct d3d12_heap
@@ -371,7 +371,7 @@ struct d3d12_resource
     void *map_ptr;
 
     struct d3d12_heap *heap;
-    UINT64 heap_offset;
+    uint64_t heap_offset;
 
     D3D12_HEAP_PROPERTIES heap_properties;
     D3D12_HEAP_FLAGS heap_flags;
@@ -399,7 +399,7 @@ HRESULT d3d12_committed_resource_create(struct d3d12_device *device,
         const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
         const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
         const D3D12_CLEAR_VALUE *optimized_clear_value, struct d3d12_resource **resource) DECLSPEC_HIDDEN;
-HRESULT d3d12_placed_resource_create(struct d3d12_device *device, struct d3d12_heap *heap, UINT64 heap_offset,
+HRESULT d3d12_placed_resource_create(struct d3d12_device *device, struct d3d12_heap *heap, uint64_t heap_offset,
         const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
         const D3D12_CLEAR_VALUE *optimized_clear_value, struct d3d12_resource **resource) DECLSPEC_HIDDEN;
 HRESULT d3d12_reserved_resource_create(struct d3d12_device *device,
-- 
2.21.0




More information about the wine-devel mailing list