Skip to content

Commit

Permalink
Linux compile fixes (some apply to bad code on windows too)
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Feb 10, 2016
1 parent 6de03e5 commit 85fd83f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion renderdoc/driver/shaders/spirv/spirv_disassemble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ struct SPVInstruction
// can't gracefully handle unknown arguments here
if(op->arguments[0]->opcode == spv::OpUnknown || op->arguments[0]->opcode == spv::OpUnknown || vec1type == NULL || vec2type == NULL)
{
ret += StringFormat::Fmt("VectorShuffle(%s, %s)", op->arguments[0]->Disassemble(ids, true), op->arguments[1]->Disassemble(ids, true));
ret += StringFormat::Fmt("VectorShuffle(%s, %s)", op->arguments[0]->Disassemble(ids, true).c_str(), op->arguments[1]->Disassemble(ids, true).c_str());
return ret;
}

Expand Down
6 changes: 2 additions & 4 deletions renderdoc/driver/vulkan/vk_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1509,8 +1509,7 @@ class WrappedVulkan : public IFrameCapturer
#if defined(VK_USE_PLATFORM_XCB_KHR)
VkResult vkCreateXcbSurfaceKHR(
VkInstance instance,
xcb_connection_t* connection,
xcb_window_t window,
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);

Expand All @@ -1524,8 +1523,7 @@ class WrappedVulkan : public IFrameCapturer
#if defined(VK_USE_PLATFORM_XLIB_KHR)
VkResult vkCreateXlibSurfaceKHR(
VkInstance instance,
Display* dpy,
Window window,
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);

Expand Down
2 changes: 2 additions & 0 deletions renderdoc/driver/vulkan/vk_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

#include "data/spv/debuguniforms.h"

#include <float.h>

const VkDeviceSize STAGE_BUFFER_BYTE_SIZE = 16*1024*1024ULL;

void VulkanDebugManager::GPUBuffer::Create(WrappedVulkan *driver, VkDevice dev, VkDeviceSize size, uint32_t ringSize, uint32_t flags)
Expand Down
8 changes: 5 additions & 3 deletions renderdoc/driver/vulkan/vk_replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#include "data/spv/debuguniforms.h"

#include <float.h>

VulkanReplay::OutputWindow::OutputWindow() : wnd(NULL_WND_HANDLE), width(0), height(0),
dsimg(VK_NULL_HANDLE), dsmem(VK_NULL_HANDLE)
{
Expand Down Expand Up @@ -2458,7 +2460,7 @@ bool VulkanReplay::CheckResizeOutputWindow(uint64_t id)
int32_t w, h;
GetOutputWindowDimensions(id, w, h);

if(w != outw.width || h != outw.height)
if((uint32_t)w != outw.width || (uint32_t)h != outw.height)
{
outw.width = w;
outw.height = h;
Expand Down Expand Up @@ -3467,7 +3469,7 @@ bool VulkanReplay::GetMinMax(ResourceId texid, uint32_t sliceFace, uint32_t mip,
imdesc.imageView = Unwrap(liveImView);
imdesc.sampler = Unwrap(GetDebugManager()->m_PointSampler);

int descSetBinding = 0;
uint32_t descSetBinding = 0;
uint32_t intTypeIndex = 0;

if(IsUIntFormat(iminfo.format))
Expand Down Expand Up @@ -3703,7 +3705,7 @@ bool VulkanReplay::GetHistogram(ResourceId texid, uint32_t sliceFace, uint32_t m

CreateTexImageView(aspectFlags, liveIm, iminfo);

int descSetBinding = 0;
uint32_t descSetBinding = 0;
uint32_t intTypeIndex = 0;

if(IsUIntFormat(iminfo.format))
Expand Down
4 changes: 4 additions & 0 deletions renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,10 @@ static VkResourceRecord *GetObjRecord(VkDebugReportObjectTypeEXT objType, uint64
return GetRecord((VkSwapchainKHR)object);
case VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT:
return GetRecord((VkCommandPool)object);
case VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT:
return NULL;
case VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT:
return NULL;
}
return NULL;
}
Expand Down
1 change: 1 addition & 0 deletions renderdoc/replay/replay_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@ bool ReplayRenderer::PixelHistory(ResourceId target, uint32_t x, uint32_t y, uin
case eUsage_GS_Resource:
case eUsage_PS_Resource:
case eUsage_CS_Resource:
case eUsage_InputTarget:
case eUsage_CopySrc:
case eUsage_ResolveSrc:
// read-only, not a valid pixel history event
Expand Down

0 comments on commit 85fd83f

Please sign in to comment.