mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-07 23:31:13 +00:00
32-bit compile fixes (mostly for offsets/lengths becoming 64-bit)
This commit is contained in:
@@ -1040,7 +1040,7 @@ void Serialiser::Serialise(const char *name, MeshFormat &el)
|
||||
Serialise("", el.nearPlane);
|
||||
Serialise("", el.farPlane);
|
||||
|
||||
SIZE_CHECK(MeshFormat, 80);
|
||||
SIZE_CHECK(MeshFormat, 88);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@@ -1080,7 +1080,7 @@ uint32_t GLReplay::PickVertex(uint32_t frameID, uint32_t eventID, MeshDisplay cf
|
||||
outidxs = new uint32_t[cfg.position.numVerts];
|
||||
|
||||
gl.glBindBuffer(eGL_COPY_READ_BUFFER, ib);
|
||||
gl.glGetBufferSubData(eGL_COPY_READ_BUFFER, cfg.position.idxoffs, cfg.position.numVerts*cfg.position.idxByteWidth, idxs);
|
||||
gl.glGetBufferSubData(eGL_COPY_READ_BUFFER, (GLintptr)cfg.position.idxoffs, cfg.position.numVerts*cfg.position.idxByteWidth, idxs);
|
||||
|
||||
uint16_t *idxs16 = (uint16_t *)idxs;
|
||||
|
||||
@@ -1147,7 +1147,7 @@ uint32_t GLReplay::PickVertex(uint32_t frameID, uint32_t eventID, MeshDisplay cf
|
||||
gl.glBindBufferBase(eGL_SHADER_STORAGE_BUFFER, 0, DebugData.pickResultBuf);
|
||||
gl.glBindBufferBase(eGL_SHADER_STORAGE_BUFFER, 1, DebugData.pickVBBuf);
|
||||
gl.glBindBufferRange(eGL_SHADER_STORAGE_BUFFER, 2, DebugData.pickIBBuf,
|
||||
cfg.position.idxoffs, cfg.position.idxoffs + cfg.position.idxByteWidth*cfg.position.numVerts);
|
||||
(GLintptr)cfg.position.idxoffs, (GLsizeiptr)(cfg.position.idxoffs + cfg.position.idxByteWidth*cfg.position.numVerts));
|
||||
|
||||
gl.glDispatchCompute(GLuint(cfg.position.numVerts/1024 + 1), 1, 1);
|
||||
gl.glMemoryBarrier(GL_ATOMIC_COUNTER_BARRIER_BIT|GL_SHADER_STORAGE_BARRIER_BIT);
|
||||
@@ -3491,7 +3491,7 @@ void GLReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vector<MeshF
|
||||
if(fmt.buf != ResourceId())
|
||||
{
|
||||
GLuint vb = m_pDriver->GetResourceManager()->GetCurrentResource(fmt.buf).name;
|
||||
gl.glBindVertexBuffer(0, vb, fmt.offset, fmt.stride);
|
||||
gl.glBindVertexBuffer(0, vb, (GLintptr)fmt.offset, fmt.stride);
|
||||
|
||||
GLenum secondarytopo = MakeGLPrimitiveTopology(fmt.topo);
|
||||
|
||||
@@ -3593,7 +3593,7 @@ void GLReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vector<MeshF
|
||||
}
|
||||
|
||||
GLuint vb = m_pDriver->GetResourceManager()->GetCurrentResource(fmts[i]->buf).name;
|
||||
gl.glBindVertexBuffer(i, vb, fmts[i]->offset, fmts[i]->stride);
|
||||
gl.glBindVertexBuffer(i, vb, (GLintptr)fmts[i]->offset, fmts[i]->stride);
|
||||
}
|
||||
|
||||
// enable position attribute
|
||||
|
||||
@@ -342,7 +342,7 @@ vector<byte> GLReplay::GetBufferData(ResourceId buff, uint64_t offset, uint64_t
|
||||
|
||||
if(len == 0) return ret;
|
||||
|
||||
ret.resize(len);
|
||||
ret.resize((size_t)len);
|
||||
|
||||
WrappedOpenGL &gl = *m_pDriver;
|
||||
|
||||
|
||||
@@ -2520,7 +2520,7 @@ vector<byte> VulkanReplay::GetBufferData(ResourceId buff, uint64_t offset, uint6
|
||||
}
|
||||
|
||||
vector<byte> ret;
|
||||
ret.resize(len);
|
||||
ret.resize((size_t)len);
|
||||
|
||||
// VKTODOMED - coarse: wait for all writes to this buffer
|
||||
vt->DeviceWaitIdle(Unwrap(dev));
|
||||
|
||||
@@ -548,7 +548,7 @@ bool WrappedVulkan::Serialise_vkCmdBeginRenderPass(
|
||||
if(atts[0].loadOp == VK_ATTACHMENT_LOAD_OP_DONT_CARE)
|
||||
loadDesc = "Don't Care";
|
||||
|
||||
if(dsAttach >= 0 && dsAttach < atts.size())
|
||||
if(dsAttach >= 0 && dsAttach < (int32_t)atts.size())
|
||||
{
|
||||
if(atts[dsAttach].stencilLoadOp == VK_ATTACHMENT_LOAD_OP_CLEAR)
|
||||
loadDesc += ", Stencil=Clear";
|
||||
@@ -847,7 +847,7 @@ bool WrappedVulkan::Serialise_vkCmdEndRenderPass(
|
||||
if(atts[0].storeOp == VK_ATTACHMENT_STORE_OP_DONT_CARE)
|
||||
storeDesc = "Don't Care";
|
||||
|
||||
if(dsAttach >= 0 && dsAttach < atts.size())
|
||||
if(dsAttach >= 0 && dsAttach < (int32_t)atts.size())
|
||||
{
|
||||
if(atts[dsAttach].stencilStoreOp == VK_ATTACHMENT_STORE_OP_STORE)
|
||||
storeDesc += ", Stencil=Store";
|
||||
|
||||
Reference in New Issue
Block a user