Fixed couple of Vulkan 1.0 features and added JakeJayLee123's float bugfix
This commit is contained in:
@@ -245,11 +245,7 @@ bool VKDevice::Create() {
|
||||
bit16_storage.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR;
|
||||
bit16_storage.pNext = nullptr;
|
||||
bit16_storage.storageBuffer16BitAccess = false;
|
||||
#ifdef __APPLE__
|
||||
bit16_storage.uniformAndStorageBuffer16BitAccess = false;
|
||||
#else
|
||||
bit16_storage.uniformAndStorageBuffer16BitAccess = true;
|
||||
#endif
|
||||
bit16_storage.storagePushConstant16 = false;
|
||||
bit16_storage.storageInputOutput16 = false;
|
||||
SetNext(next, bit16_storage);
|
||||
|
||||
@@ -595,8 +595,11 @@ void RasterizerVulkan::WaitForIdle() {
|
||||
VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT |
|
||||
VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT |
|
||||
VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT |
|
||||
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT |
|
||||
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT |
|
||||
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT;
|
||||
#ifndef __APPLE__
|
||||
flags = flags | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT;
|
||||
#endif
|
||||
if (device.IsExtTransformFeedbackSupported()) {
|
||||
flags |= VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT;
|
||||
}
|
||||
|
||||
@@ -295,18 +295,19 @@ public:
|
||||
AddCapability(spv::Capability::ImageGatherExtended);
|
||||
AddCapability(spv::Capability::SampledBuffer);
|
||||
AddCapability(spv::Capability::StorageImageWriteWithoutFormat);
|
||||
// Not sure why Draw Parameters not supported when it should be
|
||||
AddCapability(spv::Capability::DrawParameters);
|
||||
AddCapability(spv::Capability::UniformAndStorageBuffer16BitAccess);
|
||||
#ifndef __APPLE__
|
||||
// These can be added back when MoltenVK finally supports vk 1.1
|
||||
AddCapability(spv::Capability::SubgroupBallotKHR);
|
||||
AddCapability(spv::Capability::SubgroupVoteKHR);
|
||||
AddCapability(spv::Capability::UniformAndStorageBuffer16BitAccess);
|
||||
AddExtension("SPV_KHR_shader_ballot");
|
||||
AddExtension("SPV_KHR_subgroup_vote");
|
||||
#endif
|
||||
AddExtension("SPV_KHR_shader_draw_parameters");
|
||||
AddExtension("SPV_KHR_storage_buffer_storage_class");
|
||||
// Uniform 16bit Storage should only be added if version < 1.1
|
||||
AddExtension(VK_KHR_16BIT_STORAGE_EXTENSION_NAME);
|
||||
AddExtension(VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME);
|
||||
AddExtension(VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME);
|
||||
AddExtension("SPV_KHR_variable_pointers");
|
||||
|
||||
if (!transform_feedback.empty()) {
|
||||
@@ -645,7 +646,7 @@ private:
|
||||
void DeclareRegisters() {
|
||||
for (const u32 gpr : ir.GetRegisters()) {
|
||||
#ifdef __APPLE__
|
||||
const Id id = OpVariable(t_prv_bool, spv::StorageClass::Private);
|
||||
const Id id = OpVariable(t_prv_float, spv::StorageClass::Private);
|
||||
#else
|
||||
const Id id = OpVariable(t_prv_float, spv::StorageClass::Private, v_float_zero);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user