mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 17:36:36 +00:00
Compile fixes
This commit is contained in:
@@ -333,6 +333,26 @@ elseif(UNIX)
|
||||
os/posix/posix_specific.h)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
list(APPEND sources
|
||||
3rdparty/compressonator/BC1_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC2_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC3_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC4_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC5_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC6_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC7_Encode_kernel.cpp)
|
||||
|
||||
set_source_files_properties(3rdparty/compressonator/BC1_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC2_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC3_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC4_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC5_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC6_Encode_kernel.cpp
|
||||
3rdparty/compressonator/BC7_Encode_kernel.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-D_LINUX -Wno-newline-eof -Wno-missing-braces -Wno-char-subscripts -Wno-sign-compare -Wno-unused-value")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set_source_files_properties(3rdparty/tinyfiledialogs/tinyfiledialogs.c
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-format-overflow")
|
||||
|
||||
@@ -1873,7 +1873,7 @@ bool WrappedOpenGL::Serialise_glInvalidateBufferData(SerialiserType &ser, GLuint
|
||||
|
||||
if(m_ReplayOptions.optimisation != ReplayOptimisationLevel::Fastest)
|
||||
{
|
||||
GLsizeiptr size = m_Buffers[id].size;
|
||||
GLsizeiptr size = (GLsizeiptr)m_Buffers[id].size;
|
||||
|
||||
bytebuf pattern;
|
||||
pattern.resize(AlignUp4(size));
|
||||
@@ -1955,14 +1955,14 @@ bool WrappedOpenGL::Serialise_glInvalidateBufferSubData(SerialiserType &ser, GLu
|
||||
if(m_ReplayOptions.optimisation != ReplayOptimisationLevel::Fastest)
|
||||
{
|
||||
bytebuf pattern;
|
||||
pattern.resize(AlignUp4(length));
|
||||
pattern.resize(AlignUp4((size_t)length));
|
||||
|
||||
uint32_t value = 0xD15CAD3D;
|
||||
|
||||
for(size_t i = 0; i < pattern.size(); i += 4)
|
||||
memcpy(&pattern[i], &value, sizeof(uint32_t));
|
||||
|
||||
GL.glNamedBufferSubDataEXT(buffer.name, offset, length, pattern.data());
|
||||
GL.glNamedBufferSubDataEXT(buffer.name, (GLintptr)offset, (GLsizeiptr)length, pattern.data());
|
||||
}
|
||||
|
||||
if(IsLoading(m_State))
|
||||
|
||||
@@ -1250,10 +1250,10 @@ bytebuf GetDiscardPattern(DiscardType type, const ResourceFormat &fmt, uint32_t
|
||||
ret.resize(rowPitch * DiscardPatternHeight);
|
||||
byte *out = ret.data();
|
||||
|
||||
for(int yi = 0; yi < DiscardPatternHeight; yi++)
|
||||
for(int yi = 0; yi < (int)DiscardPatternHeight; yi++)
|
||||
{
|
||||
int y = invert ? DiscardPatternHeight - 1 - yi : yi;
|
||||
for(int x = 0; x < DiscardPatternWidth; x++)
|
||||
for(int x = 0; x < (int)DiscardPatternWidth; x++)
|
||||
{
|
||||
char c = pattern.c_str()[y * DiscardPatternWidth + x];
|
||||
for(uint8_t i = 0; i < fmt.compCount; i++)
|
||||
@@ -1276,10 +1276,10 @@ bytebuf GetDiscardPattern(DiscardType type, const ResourceFormat &fmt, uint32_t
|
||||
ret.resize(rowPitch * DiscardPatternHeight);
|
||||
uint32_t *out = (uint32_t *)ret.data();
|
||||
|
||||
for(int yi = 0; yi < DiscardPatternHeight; yi++)
|
||||
for(int yi = 0; yi < (int)DiscardPatternHeight; yi++)
|
||||
{
|
||||
int y = invert ? DiscardPatternHeight - 1 - yi : yi;
|
||||
for(int x = 0; x < DiscardPatternWidth; x++)
|
||||
for(int x = 0; x < (int)DiscardPatternWidth; x++)
|
||||
{
|
||||
char c = pattern.c_str()[y * DiscardPatternWidth + x];
|
||||
*(out++) = (c == '#') ? 0xffffffff : 0x00000000;
|
||||
@@ -1296,10 +1296,10 @@ bytebuf GetDiscardPattern(DiscardType type, const ResourceFormat &fmt, uint32_t
|
||||
ret.resize(rowPitch * DiscardPatternHeight);
|
||||
uint16_t *out = (uint16_t *)ret.data();
|
||||
|
||||
for(int yi = 0; yi < DiscardPatternHeight; yi++)
|
||||
for(int yi = 0; yi < (int)DiscardPatternHeight; yi++)
|
||||
{
|
||||
int y = invert ? DiscardPatternHeight - 1 - yi : yi;
|
||||
for(int x = 0; x < DiscardPatternWidth; x++)
|
||||
for(int x = 0; x < (int)DiscardPatternWidth; x++)
|
||||
{
|
||||
char c = pattern.c_str()[y * DiscardPatternWidth + x];
|
||||
*(out++) = (c == '#') ? 0xffff : 0x0000;
|
||||
@@ -1315,10 +1315,10 @@ bytebuf GetDiscardPattern(DiscardType type, const ResourceFormat &fmt, uint32_t
|
||||
ret.resize(rowPitch * DiscardPatternHeight);
|
||||
byte *out = ret.data();
|
||||
|
||||
for(int yi = 0; yi < DiscardPatternHeight; yi++)
|
||||
for(int yi = 0; yi < (int)DiscardPatternHeight; yi++)
|
||||
{
|
||||
int y = invert ? DiscardPatternHeight - 1 - yi : yi;
|
||||
for(int x = 0; x < DiscardPatternWidth; x++)
|
||||
for(int x = 0; x < (int)DiscardPatternWidth; x++)
|
||||
{
|
||||
char c = pattern.c_str()[y * DiscardPatternWidth + x];
|
||||
*(out++) = (c == '#') ? 0xff : 0x00;
|
||||
@@ -1337,10 +1337,10 @@ bytebuf GetDiscardPattern(DiscardType type, const ResourceFormat &fmt, uint32_t
|
||||
ret.resize(rowPitch * DiscardPatternHeight);
|
||||
uint32_t *out = (uint32_t *)ret.data();
|
||||
|
||||
for(int yi = 0; yi < DiscardPatternHeight; yi++)
|
||||
for(int yi = 0; yi < (int)DiscardPatternHeight; yi++)
|
||||
{
|
||||
int y = invert ? DiscardPatternHeight - 1 - yi : yi;
|
||||
for(int x = 0; x < DiscardPatternWidth; x++)
|
||||
for(int x = 0; x < (int)DiscardPatternWidth; x++)
|
||||
{
|
||||
char c = pattern.c_str()[y * DiscardPatternWidth + x];
|
||||
*(out++) = (c == '#') ? white : black;
|
||||
@@ -1359,10 +1359,10 @@ bytebuf GetDiscardPattern(DiscardType type, const ResourceFormat &fmt, uint32_t
|
||||
ret.resize(rowPitch * DiscardPatternHeight);
|
||||
uint32_t *out = (uint32_t *)ret.data();
|
||||
|
||||
for(int yi = 0; yi < DiscardPatternHeight; yi++)
|
||||
for(int yi = 0; yi < (int)DiscardPatternHeight; yi++)
|
||||
{
|
||||
int y = invert ? DiscardPatternHeight - 1 - yi : yi;
|
||||
for(int x = 0; x < DiscardPatternWidth; x++)
|
||||
for(int x = 0; x < (int)DiscardPatternWidth; x++)
|
||||
{
|
||||
char c = pattern.c_str()[y * DiscardPatternWidth + x];
|
||||
*(out++) = (c == '#') ? white : black;
|
||||
@@ -1401,10 +1401,10 @@ bytebuf GetDiscardPattern(DiscardType type, const ResourceFormat &fmt, uint32_t
|
||||
byte *depthOut = ret.data();
|
||||
byte *stencilOut = depthOut + rowPitch * DiscardPatternHeight;
|
||||
|
||||
for(int yi = 0; yi < DiscardPatternHeight; yi++)
|
||||
for(int yi = 0; yi < (int)DiscardPatternHeight; yi++)
|
||||
{
|
||||
int y = invert ? DiscardPatternHeight - 1 - yi : yi;
|
||||
for(int x = 0; x < DiscardPatternWidth; x++)
|
||||
for(int x = 0; x < (int)DiscardPatternWidth; x++)
|
||||
{
|
||||
char c = pattern.c_str()[y * DiscardPatternWidth + x];
|
||||
if(c == '#')
|
||||
|
||||
Reference in New Issue
Block a user