Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2020-04-03 13:26:42 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2020-04-03 18:43:42 +0300
commit941cceedb4f0e6280fc7fa4a71c1ebff8955198a (patch)
treedaa7aabafac8ac059b28c8c9987f2fe5ea267300 /main.cpp
parentb691b7d1e30dacae01f23ae11ee6818439b076be (diff)
Expose a query if samplers or images are comparison resources.
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/main.cpp b/main.cpp
index 83b041de..51090bd0 100644
--- a/main.cpp
+++ b/main.cpp
@@ -277,6 +277,8 @@ static void print_resources(const Compiler &compiler, const char *tag, const Sma
fprintf(stderr, " (Set : %u)", compiler.get_decoration(res.id, DecorationDescriptorSet));
if (mask.get(DecorationBinding))
fprintf(stderr, " (Binding : %u)", compiler.get_decoration(res.id, DecorationBinding));
+ if (static_cast<const CompilerGLSL &>(compiler).variable_is_depth_or_compare(res.id))
+ fprintf(stderr, " (comparison)");
if (mask.get(DecorationInputAttachmentIndex))
fprintf(stderr, " (Attachment : %u)", compiler.get_decoration(res.id, DecorationInputAttachmentIndex));
if (mask.get(DecorationNonReadable))
@@ -1056,14 +1058,6 @@ static string compile_iteration(const CLIArguments &args, std::vector<uint32_t>
}
}
- if (args.dump_resources)
- {
- print_resources(*compiler, res);
- print_push_constant_resources(*compiler, res.push_constant_buffers);
- print_spec_constants(*compiler);
- print_capabilities_and_extensions(*compiler);
- }
-
if (combined_image_samplers)
{
compiler->build_combined_image_samplers();
@@ -1095,7 +1089,17 @@ static string compile_iteration(const CLIArguments &args, std::vector<uint32_t>
static_cast<CompilerHLSL *>(compiler.get())->add_vertex_attribute_remap(remap);
}
- return compiler->compile();
+ auto ret = compiler->compile();
+
+ if (args.dump_resources)
+ {
+ print_resources(*compiler, res);
+ print_push_constant_resources(*compiler, res.push_constant_buffers);
+ print_spec_constants(*compiler);
+ print_capabilities_and_extensions(*compiler);
+ }
+
+ return ret;
}
static int main_inner(int argc, char *argv[])