|
|
|
@ -563,6 +563,7 @@ void EmitContext::DefineCommonTypes(const Info& info) { |
|
|
|
|
|
|
|
output_f32 = Name(TypePointer(spv::StorageClass::Output, F32[1]), "output_f32"); |
|
|
|
output_u32 = Name(TypePointer(spv::StorageClass::Output, U32[1]), "output_u32"); |
|
|
|
output_s32 = Name(TypePointer(spv::StorageClass::Output, S32[1]), "output_s32"); |
|
|
|
|
|
|
|
if (info.uses_int8 && profile.support_int8) { |
|
|
|
AddCapability(spv::Capability::Int8); |
|
|
|
@ -1708,6 +1709,22 @@ void EmitContext::DefineOutputs(const IR::Program& program) { |
|
|
|
Decorate(frag_color[index], spv::Decoration::Location, index); |
|
|
|
Name(frag_color[index], fmt::format("frag_color{}", index)); |
|
|
|
} |
|
|
|
#if 0
|
|
|
|
const AttributeType output_type{runtime_info.color_output_types[index]}; |
|
|
|
const Id vec_type = [&, output_type]() -> Id { |
|
|
|
switch (output_type) { |
|
|
|
case AttributeType::SignedInt: |
|
|
|
return S32[4]; |
|
|
|
case AttributeType::UnsignedInt: |
|
|
|
return U32[4]; |
|
|
|
default: |
|
|
|
return F32[4]; |
|
|
|
} |
|
|
|
}(); |
|
|
|
frag_color[index] = DefineOutput(*this, vec_type, std::nullopt); |
|
|
|
Decorate(frag_color[index], spv::Decoration::Location, index); |
|
|
|
Name(frag_color[index], fmt::format("frag_color{}", index)); |
|
|
|
#endif
|
|
|
|
} |
|
|
|
if (info.stores_frag_depth) { |
|
|
|
frag_depth = DefineOutput(*this, F32[1], std::nullopt); |
|
|
|
|