mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix a couple of gcc 8 fall-through warnings
This commit is contained in:
@@ -103,7 +103,9 @@ set_source_files_properties(${glslang_sources}
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-ignored-qualifiers -Wno-strict-aliasing")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
set_source_files_properties(${glslang_dir}/glslang/MachineIndependent/reflection.cpp
|
||||
set_source_files_properties(
|
||||
${glslang_dir}/glslang/MachineIndependent/reflection.cpp
|
||||
${glslang_dir}/glslang/MachineIndependent/Intermediate.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-implicit-fallthrough -Wno-ignored-qualifiers")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -352,17 +352,15 @@ void glslangGetProgramResourceiv(glslang::TProgram *program, ReflectionInterface
|
||||
break;
|
||||
}
|
||||
case ReflectionProperty::Internal_Binding:
|
||||
case ReflectionProperty::AtomicCounterBufferIndex:
|
||||
{
|
||||
if(programInterface == ReflectionInterface::UniformBlock)
|
||||
if(props[i] == ReflectionProperty::Internal_Binding &&
|
||||
programInterface == ReflectionInterface::UniformBlock)
|
||||
{
|
||||
params[i] = program->getUniformBlock(index).getType()->getQualifier().layoutBinding;
|
||||
break;
|
||||
}
|
||||
|
||||
// deliberate fall-through
|
||||
}
|
||||
case ReflectionProperty::AtomicCounterBufferIndex:
|
||||
{
|
||||
if(programInterface == ReflectionInterface::Uniform)
|
||||
params[i] = program->getUniform(index).getType()->getQualifier().layoutBinding;
|
||||
else if(programInterface == ReflectionInterface::AtomicCounterBuffer)
|
||||
|
||||
@@ -1490,11 +1490,18 @@ BlockShape GetBlockShape(VkFormat Format, uint32_t plane)
|
||||
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
|
||||
case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:
|
||||
if(plane == 0)
|
||||
{
|
||||
return {1, 1, 1};
|
||||
}
|
||||
else if(plane == 1)
|
||||
{
|
||||
return {1, 1, 2};
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Invalid plane %d in 2-plane format", plane);
|
||||
return {1, 1, 1};
|
||||
}
|
||||
case VK_FORMAT_R10X6_UNORM_PACK16:
|
||||
case VK_FORMAT_R12X4_UNORM_PACK16:
|
||||
// basically just 16-bit format with only top 10-bits used
|
||||
@@ -1535,11 +1542,18 @@ BlockShape GetBlockShape(VkFormat Format, uint32_t plane)
|
||||
case VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:
|
||||
case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:
|
||||
if(plane == 0)
|
||||
{
|
||||
return {1, 1, 2};
|
||||
}
|
||||
else if(plane == 1)
|
||||
{
|
||||
return {1, 1, 4};
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Invalid plane %d in 2-plane format", plane);
|
||||
return {1, 1, 2};
|
||||
}
|
||||
default: RDCERR("Unrecognised Vulkan Format: %d", Format);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user