[Vulkan] Optional functionality usage improvements
Functional changes: - Enable only actually used features, as drivers may take more optimal paths when certain features are disabled. - Support VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE. - Fix the separateStencilMaskRef check doing the opposite. - Support shaderRoundingModeRTEFloat32. - Fix vkGetDeviceBufferMemoryRequirements pointer not passed to the Vulkan Memory Allocator. Stylistic changes: - Move all device extensions, properties and features to one structure, especially simplifying portability subset feature checks, and also making it easier to request new extension functionality in the future. - Remove extension suffixes from usage of promoted extensions.
This commit is contained in:
@@ -320,7 +320,8 @@ class SpirvShaderTranslator : public ShaderTranslator {
|
||||
static constexpr uint32_t kSpirvMagicToolId = 26;
|
||||
|
||||
struct Features {
|
||||
explicit Features(const ui::vulkan::VulkanProvider& provider);
|
||||
explicit Features(
|
||||
const ui::vulkan::VulkanProvider::DeviceInfo& device_info);
|
||||
explicit Features(bool all = false);
|
||||
unsigned int spirv_version;
|
||||
uint32_t max_storage_buffer_range;
|
||||
@@ -332,6 +333,7 @@ class SpirvShaderTranslator : public ShaderTranslator {
|
||||
bool image_view_format_swizzle;
|
||||
bool signed_zero_inf_nan_preserve_float32;
|
||||
bool denorm_flush_to_zero_float32;
|
||||
bool rounding_mode_rte_float32;
|
||||
};
|
||||
|
||||
SpirvShaderTranslator(const Features& features,
|
||||
|
||||
Reference in New Issue
Block a user