spirv: Sort supported capabilities
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
@@ -221,32 +221,32 @@ radv_shader_compile_to_nir(struct radv_device *device,
|
|||||||
const struct spirv_to_nir_options spirv_options = {
|
const struct spirv_to_nir_options spirv_options = {
|
||||||
.lower_ubo_ssbo_access_to_offsets = true,
|
.lower_ubo_ssbo_access_to_offsets = true,
|
||||||
.caps = {
|
.caps = {
|
||||||
|
.descriptor_array_dynamic_indexing = true,
|
||||||
.device_group = true,
|
.device_group = true,
|
||||||
.draw_parameters = true,
|
.draw_parameters = true,
|
||||||
.float64 = true,
|
.float64 = true,
|
||||||
|
.gcn_shader = true,
|
||||||
|
.geometry_streams = true,
|
||||||
.image_read_without_format = true,
|
.image_read_without_format = true,
|
||||||
.image_write_without_format = true,
|
.image_write_without_format = true,
|
||||||
.tessellation = true,
|
|
||||||
.int64 = true,
|
|
||||||
.int16 = true,
|
.int16 = true,
|
||||||
|
.int64 = true,
|
||||||
.multiview = true,
|
.multiview = true,
|
||||||
|
.runtime_descriptor_array = true,
|
||||||
|
.shader_viewport_index_layer = true,
|
||||||
|
.stencil_export = true,
|
||||||
|
.storage_16bit = true,
|
||||||
|
.storage_image_ms = true,
|
||||||
.subgroup_arithmetic = true,
|
.subgroup_arithmetic = true,
|
||||||
.subgroup_ballot = true,
|
.subgroup_ballot = true,
|
||||||
.subgroup_basic = true,
|
.subgroup_basic = true,
|
||||||
.subgroup_quad = true,
|
.subgroup_quad = true,
|
||||||
.subgroup_shuffle = true,
|
.subgroup_shuffle = true,
|
||||||
.subgroup_vote = true,
|
.subgroup_vote = true,
|
||||||
.variable_pointers = true,
|
.tessellation = true,
|
||||||
.gcn_shader = true,
|
|
||||||
.trinary_minmax = true,
|
|
||||||
.shader_viewport_index_layer = true,
|
|
||||||
.descriptor_array_dynamic_indexing = true,
|
|
||||||
.runtime_descriptor_array = true,
|
|
||||||
.stencil_export = true,
|
|
||||||
.storage_16bit = true,
|
|
||||||
.geometry_streams = true,
|
|
||||||
.transform_feedback = true,
|
.transform_feedback = true,
|
||||||
.storage_image_ms = true,
|
.trinary_minmax = true,
|
||||||
|
.variable_pointers = true,
|
||||||
},
|
},
|
||||||
.ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
|
.ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
|
||||||
.ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
|
.ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
|
||||||
|
@@ -33,38 +33,38 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct spirv_supported_capabilities {
|
struct spirv_supported_capabilities {
|
||||||
bool float64;
|
bool atomic_storage;
|
||||||
bool image_ms_array;
|
bool descriptor_array_dynamic_indexing;
|
||||||
bool tessellation;
|
|
||||||
bool device_group;
|
bool device_group;
|
||||||
bool draw_parameters;
|
bool draw_parameters;
|
||||||
|
bool float64;
|
||||||
|
bool geometry_streams;
|
||||||
|
bool gcn_shader;
|
||||||
|
bool image_ms_array;
|
||||||
bool image_read_without_format;
|
bool image_read_without_format;
|
||||||
bool image_write_without_format;
|
bool image_write_without_format;
|
||||||
|
bool int16;
|
||||||
bool int64;
|
bool int64;
|
||||||
|
bool int64_atomics;
|
||||||
bool min_lod;
|
bool min_lod;
|
||||||
bool multiview;
|
bool multiview;
|
||||||
bool variable_pointers;
|
bool post_depth_coverage;
|
||||||
bool storage_16bit;
|
bool runtime_descriptor_array;
|
||||||
bool int16;
|
|
||||||
bool shader_viewport_index_layer;
|
bool shader_viewport_index_layer;
|
||||||
|
bool stencil_export;
|
||||||
|
bool storage_8bit;
|
||||||
|
bool storage_16bit;
|
||||||
|
bool storage_image_ms;
|
||||||
bool subgroup_arithmetic;
|
bool subgroup_arithmetic;
|
||||||
bool subgroup_ballot;
|
bool subgroup_ballot;
|
||||||
bool subgroup_basic;
|
bool subgroup_basic;
|
||||||
bool subgroup_quad;
|
bool subgroup_quad;
|
||||||
bool subgroup_shuffle;
|
bool subgroup_shuffle;
|
||||||
bool subgroup_vote;
|
bool subgroup_vote;
|
||||||
bool gcn_shader;
|
bool tessellation;
|
||||||
bool trinary_minmax;
|
|
||||||
bool descriptor_array_dynamic_indexing;
|
|
||||||
bool runtime_descriptor_array;
|
|
||||||
bool stencil_export;
|
|
||||||
bool atomic_storage;
|
|
||||||
bool storage_8bit;
|
|
||||||
bool post_depth_coverage;
|
|
||||||
bool transform_feedback;
|
bool transform_feedback;
|
||||||
bool geometry_streams;
|
bool trinary_minmax;
|
||||||
bool int64_atomics;
|
bool variable_pointers;
|
||||||
bool storage_image_ms;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct shader_info {
|
typedef struct shader_info {
|
||||||
|
@@ -136,27 +136,27 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
|
|||||||
struct spirv_to_nir_options spirv_options = {
|
struct spirv_to_nir_options spirv_options = {
|
||||||
.lower_workgroup_access_to_offsets = true,
|
.lower_workgroup_access_to_offsets = true,
|
||||||
.caps = {
|
.caps = {
|
||||||
.float64 = device->instance->physicalDevice.info.gen >= 8,
|
|
||||||
.int64 = device->instance->physicalDevice.info.gen >= 8,
|
|
||||||
.tessellation = true,
|
|
||||||
.device_group = true,
|
.device_group = true,
|
||||||
.draw_parameters = true,
|
.draw_parameters = true,
|
||||||
|
.float64 = device->instance->physicalDevice.info.gen >= 8,
|
||||||
.image_write_without_format = true,
|
.image_write_without_format = true,
|
||||||
|
.int16 = device->instance->physicalDevice.info.gen >= 8,
|
||||||
|
.int64 = device->instance->physicalDevice.info.gen >= 8,
|
||||||
.min_lod = true,
|
.min_lod = true,
|
||||||
.multiview = true,
|
.multiview = true,
|
||||||
.variable_pointers = true,
|
.post_depth_coverage = device->instance->physicalDevice.info.gen >= 9,
|
||||||
.storage_16bit = device->instance->physicalDevice.info.gen >= 8,
|
|
||||||
.int16 = device->instance->physicalDevice.info.gen >= 8,
|
|
||||||
.shader_viewport_index_layer = true,
|
.shader_viewport_index_layer = true,
|
||||||
|
.stencil_export = device->instance->physicalDevice.info.gen >= 9,
|
||||||
|
.storage_8bit = device->instance->physicalDevice.info.gen >= 8,
|
||||||
|
.storage_16bit = device->instance->physicalDevice.info.gen >= 8,
|
||||||
.subgroup_arithmetic = true,
|
.subgroup_arithmetic = true,
|
||||||
.subgroup_basic = true,
|
.subgroup_basic = true,
|
||||||
.subgroup_ballot = true,
|
.subgroup_ballot = true,
|
||||||
.subgroup_quad = true,
|
.subgroup_quad = true,
|
||||||
.subgroup_shuffle = true,
|
.subgroup_shuffle = true,
|
||||||
.subgroup_vote = true,
|
.subgroup_vote = true,
|
||||||
.stencil_export = device->instance->physicalDevice.info.gen >= 9,
|
.tessellation = true,
|
||||||
.storage_8bit = device->instance->physicalDevice.info.gen >= 8,
|
.variable_pointers = true,
|
||||||
.post_depth_coverage = device->instance->physicalDevice.info.gen >= 9,
|
|
||||||
},
|
},
|
||||||
.ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
|
.ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
|
||||||
.ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
|
.ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
|
||||||
|
@@ -390,15 +390,15 @@ brw_initialize_spirv_supported_capabilities(struct brw_context *brw)
|
|||||||
*/
|
*/
|
||||||
assert(devinfo->gen >= 7);
|
assert(devinfo->gen >= 7);
|
||||||
|
|
||||||
|
ctx->Const.SpirVCapabilities.atomic_storage = devinfo->gen >= 7;
|
||||||
|
ctx->Const.SpirVCapabilities.draw_parameters = true;
|
||||||
ctx->Const.SpirVCapabilities.float64 = devinfo->gen >= 8;
|
ctx->Const.SpirVCapabilities.float64 = devinfo->gen >= 8;
|
||||||
|
ctx->Const.SpirVCapabilities.geometry_streams = devinfo->gen >= 7;
|
||||||
|
ctx->Const.SpirVCapabilities.image_write_without_format = true;
|
||||||
ctx->Const.SpirVCapabilities.int64 = devinfo->gen >= 8;
|
ctx->Const.SpirVCapabilities.int64 = devinfo->gen >= 8;
|
||||||
ctx->Const.SpirVCapabilities.tessellation = true;
|
ctx->Const.SpirVCapabilities.tessellation = true;
|
||||||
ctx->Const.SpirVCapabilities.draw_parameters = true;
|
|
||||||
ctx->Const.SpirVCapabilities.image_write_without_format = true;
|
|
||||||
ctx->Const.SpirVCapabilities.variable_pointers = true;
|
|
||||||
ctx->Const.SpirVCapabilities.atomic_storage = devinfo->gen >= 7;
|
|
||||||
ctx->Const.SpirVCapabilities.transform_feedback = devinfo->gen >= 7;
|
ctx->Const.SpirVCapabilities.transform_feedback = devinfo->gen >= 7;
|
||||||
ctx->Const.SpirVCapabilities.geometry_streams = devinfo->gen >= 7;
|
ctx->Const.SpirVCapabilities.variable_pointers = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user