Review comments

This commit is contained in:
IndecisiveTurtle 2025-07-13 17:07:17 +03:00
parent 7994ee814f
commit 3d9d274349
3 changed files with 1 additions and 12 deletions

View File

@ -13,7 +13,6 @@
namespace Shader { namespace Shader {
struct VsAttribSpecialization { struct VsAttribSpecialization {
s32 num_components{};
u32 divisor{}; u32 divisor{};
AmdGpu::NumberClass num_class{}; AmdGpu::NumberClass num_class{};
AmdGpu::CompMapping dst_select{}; AmdGpu::CompMapping dst_select{};
@ -96,7 +95,6 @@ struct StageSpecialization {
// Specialize shader on VS input number types to follow spec. // Specialize shader on VS input number types to follow spec.
ForEachSharp(vs_attribs, fetch_shader_data->attributes, ForEachSharp(vs_attribs, fetch_shader_data->attributes,
[&profile_, this](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { [&profile_, this](auto& spec, const auto& desc, AmdGpu::Buffer sharp) {
spec.num_components = AmdGpu::NumComponents(sharp.GetDataFmt());
using InstanceIdType = Shader::Gcn::VertexAttribute::InstanceIdType; using InstanceIdType = Shader::Gcn::VertexAttribute::InstanceIdType;
if (const auto step_rate = desc.GetStepRate(); if (const auto step_rate = desc.GetStepRate();
step_rate != InstanceIdType::None) { step_rate != InstanceIdType::None) {

View File

@ -248,6 +248,7 @@ bool Instance::CreateDevice() {
// Required // Required
ASSERT(add_extension(VK_KHR_SWAPCHAIN_EXTENSION_NAME)); ASSERT(add_extension(VK_KHR_SWAPCHAIN_EXTENSION_NAME));
ASSERT(add_extension(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME)); ASSERT(add_extension(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME));
ASSERT(add_extension(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME));
// Optional // Optional
depth_range_unrestricted = add_extension(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME); depth_range_unrestricted = add_extension(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME);
@ -277,7 +278,6 @@ bool Instance::CreateDevice() {
image_load_store_lod = add_extension(VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME); image_load_store_lod = add_extension(VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME);
amd_gcn_shader = add_extension(VK_AMD_GCN_SHADER_EXTENSION_NAME); amd_gcn_shader = add_extension(VK_AMD_GCN_SHADER_EXTENSION_NAME);
amd_shader_trinary_minmax = add_extension(VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME); amd_shader_trinary_minmax = add_extension(VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME);
vertex_attribute_divisor = add_extension(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME);
shader_atomic_float2 = add_extension(VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME); shader_atomic_float2 = add_extension(VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME);
if (shader_atomic_float2) { if (shader_atomic_float2) {
shader_atomic_float2_features = shader_atomic_float2_features =
@ -502,9 +502,6 @@ bool Instance::CreateDevice() {
if (!legacy_vertex_attributes) { if (!legacy_vertex_attributes) {
device_chain.unlink<vk::PhysicalDeviceLegacyVertexAttributesFeaturesEXT>(); device_chain.unlink<vk::PhysicalDeviceLegacyVertexAttributesFeaturesEXT>();
} }
if (!vertex_attribute_divisor) {
device_chain.unlink<vk::PhysicalDeviceVertexAttributeDivisorFeatures>();
}
if (!shader_atomic_float2) { if (!shader_atomic_float2) {
device_chain.unlink<vk::PhysicalDeviceShaderAtomicFloat2FeaturesEXT>(); device_chain.unlink<vk::PhysicalDeviceShaderAtomicFloat2FeaturesEXT>();
} }

View File

@ -150,11 +150,6 @@ public:
return legacy_vertex_attributes; return legacy_vertex_attributes;
} }
/// Returns true when VK_EXT_vertex_attribute_divisor is supported.
bool IsVertexAttributeDivisorSupported() const {
return vertex_attribute_divisor;
}
/// Returns true when VK_AMD_shader_image_load_store_lod is supported. /// Returns true when VK_AMD_shader_image_load_store_lod is supported.
bool IsImageLoadStoreLodSupported() const { bool IsImageLoadStoreLodSupported() const {
return image_load_store_lod; return image_load_store_lod;
@ -403,7 +398,6 @@ private:
u32 queue_family_index{0}; u32 queue_family_index{0};
bool custom_border_color{}; bool custom_border_color{};
bool fragment_shader_barycentric{}; bool fragment_shader_barycentric{};
bool vertex_attribute_divisor{};
bool depth_clip_control{}; bool depth_clip_control{};
bool depth_range_unrestricted{}; bool depth_range_unrestricted{};
bool dynamic_state_3{}; bool dynamic_state_3{};