diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/sc.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -474,10 +474,12 @@ struct Desc { ss << attr.name << ";\n"; } } - ss << "layout (location = 0) out _Interpolator {\n"; - for (const auto& i : interp) - ss << i.tname << " " << i.name << ";\n"; - ss << "} interpolator;\n"; + if (interp.size()) { + ss << "layout (location = 0) out _Interpolator {\n"; + for (const auto& i : interp) + ss << i.tname << " " << i.name << ";\n"; + ss << "} interpolator;\n"; + } add_textures(ss, shader_type_vertex); add_cbuffers(ss, shader_type_vertex); return ss.str(); @@ -492,10 +494,12 @@ struct Desc { ss << attr.tname << " "; ss << attr.name << ";\n"; } - ss << "layout (location = 0) in _Interpolator {\n"; - for (const auto& i : interp) - ss << i.tname << " " << i.name << ";\n"; - ss << "} interpolator;\n"; + if (interp.size()) { + ss << "layout (location = 0) in _Interpolator {\n"; + for (const auto& i : interp) + ss << i.tname << " " << i.name << ";\n"; + ss << "} interpolator;\n"; + } add_textures(ss, shader_type_fragment); add_cbuffers(ss, shader_type_fragment); return ss.str(); |