yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

spirv: Fix code emission when descriptor aliasing is unsupported

Fixes OpenGL.
This commit is contained in:
ReinUsesLisp 2021-06-25 04:38:55 -03:00 committed by ameerj
parent fb9b1787f8
commit 5b2b0634a1
1 changed files with 2 additions and 1 deletions

View File

@ -911,14 +911,15 @@ void EmitContext::DefineConstantBuffers(const Info& info, u32& binding) {
if (info.constant_buffer_descriptors.empty()) {
return;
}
IR::Type types{info.used_constant_buffer_types};
if (!profile.support_descriptor_aliasing) {
DefineConstBuffers(*this, info, &UniformDefinitions::U32x4, binding, U32[4], 'u',
sizeof(u32[4]));
for (const ConstantBufferDescriptor& desc : info.constant_buffer_descriptors) {
binding += desc.count;
}
return;
}
IR::Type types{info.used_constant_buffer_types};
if (True(types & IR::Type::U8)) {
if (profile.support_int8) {
DefineConstBuffers(*this, info, &UniformDefinitions::U8, binding, U8, 'u', sizeof(u8));