diff --git a/renderdoc/3rdparty/tinyexr/tinyexr.cpp b/renderdoc/3rdparty/tinyexr/tinyexr.cpp index 5589aaf38..ed04b52c4 100644 --- a/renderdoc/3rdparty/tinyexr/tinyexr.cpp +++ b/renderdoc/3rdparty/tinyexr/tinyexr.cpp @@ -43,7 +43,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma warning(disable : 4101) // unreferenced local variable #pragma warning(disable : 4201) // nonstandard extension used: nameless // struct/union -#pragma warning(disable : 4018) // signed/unsigned mismatch #pragma warning(disable : 4267) // argument conversion, possible loss of data #endif @@ -6774,7 +6773,7 @@ void WriteAttribute(FILE *fp, const char *name, const char *type, assert(n == sizeof(int)); n = fwrite(data, 1, len, fp); - assert(n == len); + assert(n == (size_t)len); } typedef struct { @@ -6827,7 +6826,7 @@ void WriteChannelInfo(std::vector &data, size_t sz = 0; // Calculate total size. - for (int c = 0; c < channels.size(); c++) { + for (size_t c = 0; c < channels.size(); c++) { sz += strlen(channels[c].name.c_str()) + 1; // +1 for \0 sz += 16; // 4 * int } @@ -6837,7 +6836,7 @@ void WriteChannelInfo(std::vector &data, unsigned char *p = &data.at(0); - for (int c = 0; c < channels.size(); c++) { + for (size_t c = 0; c < channels.size(); c++) { memcpy(p, channels[c].name.c_str(), strlen(channels[c].name.c_str())); p += strlen(channels[c].name.c_str()); (*p) = '\0'; @@ -7164,7 +7163,7 @@ int LoadEXRFP(float **out_rgba, int *width, int *height, FILE *fp, std::vector image(dataWidth * dataHeight * 4); // 4 = RGBA // Set default alpha value to 1.0 - for (size_t i = 0; i < dataWidth * dataHeight; i++) { + for (int i = 0; i < dataWidth * dataHeight; i++) { image[4 * i + 3] = 1.0f; } @@ -7449,7 +7448,7 @@ int LoadMultiChannelEXR(EXRImage *exrImage, const char *filename, std::vector image(dataWidth * dataHeight * 4); // 4 = RGBA // Set default alpha value to 1.0 - for (size_t i = 0; i < dataWidth * dataHeight; i++) { + for (int i = 0; i < dataWidth * dataHeight; i++) { image[4 * i + 3] = 1.0f; } @@ -8183,7 +8182,7 @@ int LoadDeepEXR(DeepImage *deepImage, const char *filename, const char **err) { DecompressZip(reinterpret_cast(&sampleData.at(0)), dstLen, dataPtr + 28 + packedOffsetTableSize, packedSampleDataSize); - assert(dstLen == unpackedSampleDataSize); + assert(dstLen == (unsigned long)unpackedSampleDataSize); } // decode sample @@ -8208,7 +8207,7 @@ int LoadDeepEXR(DeepImage *deepImage, const char *filename, const char **err) { } assert(sampleSize >= 2); - assert(pixelOffsetTable[dataWidth - 1] * sampleSize == sampleData.size()); + assert(pixelOffsetTable[dataWidth - 1] * sampleSize == (int)sampleData.size()); int samplesPerLine = sampleData.size() / sampleSize; // diff --git a/renderdoc/Makefile b/renderdoc/Makefile index 9a9e341aa..5f3228473 100644 --- a/renderdoc/Makefile +++ b/renderdoc/Makefile @@ -5,8 +5,8 @@ MACROS=-DLINUX \ -DRENDERDOC_PLATFORM=linux \ -DRENDERDOC_EXPORTS \ -DGIT_COMMIT_HASH="\"$(COMMIT)\"" -CFLAGS=-c -Wall -Werror -Wno-unknown-pragmas -fPIC $(MACROS) -I. -I3rdparty/ -CPPFLAGS=-std=c++11 -g -Wno-unused -Wno-unknown-pragmas -Wno-reorder -fvisibility=hidden -fvisibility-inlines-hidden +CFLAGS=-c -Wall -Werror -Wno-unused -Wno-unknown-pragmas -fPIC $(MACROS) -I. -I3rdparty/ +CPPFLAGS=-std=c++11 -g -Wno-reorder -fvisibility=hidden -fvisibility-inlines-hidden LDFLAGS=-lpthread -lrt -shared -ldl -lX11 OBJDIR=.obj OBJECTS=replay/replay_output.o \ diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp index 8f9e1ab90..4a16e886f 100644 --- a/renderdoc/driver/gl/gl_debug.cpp +++ b/renderdoc/driver/gl/gl_debug.cpp @@ -2685,13 +2685,13 @@ void GLReplay::InitPostVSBuffers(uint32_t frameID, uint32_t eventID) if(drawcall->flags & eDraw_Instanced) { gl.glDrawElementsInstancedBaseVertexBaseInstance(drawtopo, drawcall->numIndices, idxType, - (const void *)(drawcall->indexOffset*drawcall->indexByteWidth), drawcall->numInstances, + (const void *)uintptr_t(drawcall->indexOffset*drawcall->indexByteWidth), drawcall->numInstances, drawcall->vertexOffset, drawcall->instanceOffset); } else { gl.glDrawElementsBaseVertex(drawtopo, drawcall->numIndices, idxType, - (const void *)(drawcall->indexOffset*drawcall->indexByteWidth), drawcall->vertexOffset); + (const void *)uintptr_t(drawcall->indexOffset*drawcall->indexByteWidth), drawcall->vertexOffset); } } gl.glEndTransformFeedback(); @@ -3095,7 +3095,7 @@ void GLReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorGetResourceManager()->GetCurrentResource(cfg.position.idxbuf).name; gl.glBindBuffer(eGL_ELEMENT_ARRAY_BUFFER, ib); } - gl.glDrawElements(topo, cfg.position.numVerts, idxtype, (const void *)(cfg.position.idxoffs)); + gl.glDrawElements(topo, cfg.position.numVerts, idxtype, (const void *)uintptr_t(cfg.position.idxoffs)); } else { @@ -3290,7 +3290,7 @@ void GLReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorGetResourceManager()->GetCurrentResource(cfg.position.idxbuf).name; gl.glBindBuffer(eGL_ELEMENT_ARRAY_BUFFER, ib); } - gl.glDrawElements(topo != eGL_PATCHES ? topo : eGL_POINTS, cfg.position.numVerts, idxtype, (const void *)(cfg.position.idxoffs)); + gl.glDrawElements(topo != eGL_PATCHES ? topo : eGL_POINTS, cfg.position.numVerts, idxtype, (const void *)uintptr_t(cfg.position.idxoffs)); } else { @@ -3344,7 +3344,7 @@ void GLReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vector= WRITING) diff --git a/renderdoc/driver/gl/gl_replay.cpp b/renderdoc/driver/gl/gl_replay.cpp index 145d65769..67844ce9f 100644 --- a/renderdoc/driver/gl/gl_replay.cpp +++ b/renderdoc/driver/gl/gl_replay.cpp @@ -2727,6 +2727,8 @@ ResourceId GLReplay::CreateProxyTexture(FetchTexture templateTex) switch(templateTex.resType) { + case eResType_None: + break; case eResType_Buffer: case eResType_Texture1D: {