mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-10 06:10:33 +01:00
[vulkan] Verify UniformAndStorage capabilities on device
This commit is contained in:
parent
b06b9cc7a2
commit
27a0010b6e
4 changed files with 9 additions and 1 deletions
|
|
@ -1126,7 +1126,7 @@ void EmitContext::DefineConstantBuffers(const Info& info, u32& binding) {
|
||||||
}
|
}
|
||||||
IR::Type types{info.used_constant_buffer_types | info.used_indirect_cbuf_types};
|
IR::Type types{info.used_constant_buffer_types | info.used_indirect_cbuf_types};
|
||||||
if (True(types & IR::Type::U8)) {
|
if (True(types & IR::Type::U8)) {
|
||||||
if (profile.support_int8) {
|
if (profile.support_int8 && profile.support_uniform_and_storage_buffer_8bit) {
|
||||||
DefineConstBuffers(*this, info, &UniformDefinitions::U8, binding, U8, 'u', sizeof(u8));
|
DefineConstBuffers(*this, info, &UniformDefinitions::U8, binding, U8, 'u', sizeof(u8));
|
||||||
DefineConstBuffers(*this, info, &UniformDefinitions::S8, binding, S8, 's', sizeof(s8));
|
DefineConstBuffers(*this, info, &UniformDefinitions::S8, binding, S8, 's', sizeof(s8));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ struct Profile {
|
||||||
bool unified_descriptor_binding{};
|
bool unified_descriptor_binding{};
|
||||||
bool support_descriptor_aliasing{};
|
bool support_descriptor_aliasing{};
|
||||||
bool support_int8{};
|
bool support_int8{};
|
||||||
|
bool support_uniform_and_storage_buffer_8bit{};
|
||||||
bool support_int16{};
|
bool support_int16{};
|
||||||
bool support_int64{};
|
bool support_int64{};
|
||||||
bool support_vertex_instance_id{};
|
bool support_vertex_instance_id{};
|
||||||
|
|
|
||||||
|
|
@ -383,6 +383,8 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_,
|
||||||
.unified_descriptor_binding = true,
|
.unified_descriptor_binding = true,
|
||||||
.support_descriptor_aliasing = device.IsDescriptorAliasingSupported(),
|
.support_descriptor_aliasing = device.IsDescriptorAliasingSupported(),
|
||||||
.support_int8 = device.IsInt8Supported(),
|
.support_int8 = device.IsInt8Supported(),
|
||||||
|
.support_uniform_and_storage_buffer_8bit =
|
||||||
|
device.IsUniformAndStorageBuffer8BitAccessSupported(),
|
||||||
.support_int16 = device.IsShaderInt16Supported(),
|
.support_int16 = device.IsShaderInt16Supported(),
|
||||||
.support_int64 = device.IsShaderInt64Supported(),
|
.support_int64 = device.IsShaderInt64Supported(),
|
||||||
.support_vertex_instance_id = false,
|
.support_vertex_instance_id = false,
|
||||||
|
|
|
||||||
|
|
@ -387,6 +387,11 @@ FN_MAX_LIMIT_LIST
|
||||||
return features.shader_float16_int8.shaderInt8;
|
return features.shader_float16_int8.shaderInt8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if the device allows 8-bit integer members
|
||||||
|
bool IsUniformAndStorageBuffer8BitAccessSupported() const {
|
||||||
|
return features.bit8_storage.uniformAndStorageBuffer8BitAccess;
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns true if the device supports binding multisample images as storage images.
|
/// Returns true if the device supports binding multisample images as storage images.
|
||||||
bool IsStorageImageMultisampleSupported() const {
|
bool IsStorageImageMultisampleSupported() const {
|
||||||
return features.features.shaderStorageImageMultisample;
|
return features.features.shaderStorageImageMultisample;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue