Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plume_d3d12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ namespace plume {
D3D12_CPU_DESCRIPTOR_HANDLE D3D12DescriptorHeapAllocator::getCPUHandleAt(uint32_t index) const {
assert(index < heapSize);
assert(cpuDescriptorHandle.ptr > 0);
return { cpuDescriptorHandle.ptr + uint64_t(index) * descriptorHandleIncrement };
return { cpuDescriptorHandle.ptr + SIZE_T(index) * descriptorHandleIncrement };
}

D3D12_GPU_DESCRIPTOR_HANDLE D3D12DescriptorHeapAllocator::getGPUHandleAt(uint32_t index) const {
Expand Down
4 changes: 2 additions & 2 deletions plume_render_interface_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <cfloat>
#include <cstdint>

#if defined(_WIN64)
#if defined(_WIN32)
#include <Windows.h>
#elif defined(__ANDROID__)
#include "android/native_window.h"
Expand All @@ -34,7 +34,7 @@
#endif

namespace plume {
#if defined(_WIN64)
#if defined(_WIN32)
// Native HWND handle to the target window.
typedef HWND RenderWindow;
#elif defined(__ANDROID__)
Expand Down
8 changes: 4 additions & 4 deletions plume_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace plume {
# ifdef VULKAN_OBJECT_NAMES_ENABLED
VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
# endif
# if defined(_WIN64)
# if defined(_WIN32)
VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
# elif defined(__ANDROID__)
VK_KHR_ANDROID_SURFACE_EXTENSION_NAME,
Expand Down Expand Up @@ -1855,7 +1855,7 @@ namespace plume {

this->descriptorSetCount = uint32_t(pipelineLayout->descriptorSetLayouts.size());

VkResult res = vkCreateRayTracingPipelinesKHR(device->vk, nullptr, nullptr, 1, &pipelineInfo, nullptr, &vk);
VkResult res = vkCreateRayTracingPipelinesKHR(device->vk, VK_NULL_HANDLE, VK_NULL_HANDLE, 1, &pipelineInfo, nullptr, &vk);
if (res != VK_SUCCESS) {
fprintf(stderr, "vkCreateRayTracingPipelinesKHR failed with error code 0x%X.\n", res);
return;
Expand Down Expand Up @@ -2082,7 +2082,7 @@ namespace plume {

VkResult res;

# ifdef _WIN64
# if defined(_WIN32)
assert(desc.renderWindow != 0);
VkWin32SurfaceCreateInfoKHR surfaceCreateInfo = {};
surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
Expand Down Expand Up @@ -2458,7 +2458,7 @@ namespace plume {
}

void VulkanSwapChain::getWindowSize(uint32_t &dstWidth, uint32_t &dstHeight) const {
# if defined(_WIN64)
# if defined(_WIN32)
RECT rect;
GetClientRect(desc.renderWindow, &rect);
dstWidth = rect.right - rect.left;
Expand Down
2 changes: 1 addition & 1 deletion plume_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <unordered_map>
#include <unordered_set>

#if defined(_WIN64)
#if defined(_WIN32)
#define VK_USE_PLATFORM_WIN32_KHR
#elif defined(__ANDROID__)
#define VK_USE_PLATFORM_ANDROID_KHR
Expand Down