Cleanups.

This commit is contained in:
Hans-Kristian Arntzen 2017-05-07 13:39:15 +02:00
parent 947f7010c7
commit e897d154ac
2 changed files with 9 additions and 8 deletions

View File

@ -291,13 +291,13 @@ struct SPIRType : IVariant
struct Image
{
uint32_t type = 0;
spv::Dim dim = spv::Dim1D;
bool depth = false;
bool arrayed = false;
bool ms = false;
uint32_t sampled = 0;
spv::ImageFormat format = spv::ImageFormatUnknown;
uint32_t type;
spv::Dim dim;
bool depth;
bool arrayed;
bool ms;
uint32_t sampled;
spv::ImageFormat format;
} image;
// Structs can be declared multiple times if they are used as part of interface blocks.

View File

@ -971,7 +971,8 @@ void CompilerHLSL::emit_function_prototype(SPIRFunction &func, uint64_t return_f
// Manufacture automatic sampler arg for SampledImage texture
decl += ", ";
if (arg_type.basetype == SPIRType::SampledImage)
decl += join(arg_type.image.depth ? "SamplerComparisonState " : "SamplerState ", to_sampler_expression(arg.id));
decl += join(arg_type.image.depth ? "SamplerComparisonState " : "SamplerState ",
to_sampler_expression(arg.id));
}
if (&arg != &func.arguments.back())