Skip to content

Commit

Permalink
Better handling of input attachments when compiling SPIR-V.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRichards-Code committed Jun 6, 2021
1 parent 1e40a99 commit e53fa38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MIRU_SHADER_COMPILER/shaders/includes/msc_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#define MIRU_COMBINED_IMAGE_SAMPLER_ARRAY(image_type, set_num, bind_num, type, name, count) image_type(set_num, bind_num, type, name##_ImageCIS[count]); MIRU_SAMPLER(set_num, bind_num, name##_SamplerCIS[count])

//Subpass Input Attachments
#if defined MIRU_VULKAN
#if defined MIRU_VULKAN && defined MIRU_FRAGMENT_SHADER
#define MIRU_SUBPASS_INPUT(set_num, bind_num, idx_num, type, name) [[vk::binding(bind_num, set_num)]][[vk::input_attachment_index(idx_num)]] SubpassInput<type> name
#define MIRU_SUBPASS_INPUT_MS(set_num, bind_num, idx_num, type, name) [[vk::binding(bind_num, set_num)]][[vk::input_attachment_index(idx_num)]] SubpassInputMS<type> name
#define MIRU_SUBPASS_LOAD(name, sv_pos) name.SubpassLoad()
Expand Down
2 changes: 2 additions & 0 deletions MIRU_SHADER_COMPILER/src/BuildSPV.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ namespace shader_compiler
for (auto& includeDirectory : includeDirectories)
command += " -I" + includeDirectory;
command += " -DMIRU_VULKAN " + additionCommandlineArgs;
if (shaderStage.find("frag") != std::string::npos)
command += " -DMIRU_FRAGMENT_SHADER";

//Run glslangValidator
MIRU_SHADER_COMPILER_PRINTF("MIRU_SHADER_COMPILER: HLSL -> SPV using GLSLANGVALIDATOR\n");
Expand Down

0 comments on commit e53fa38

Please sign in to comment.