From: Jason Ekstrand Date: Mon, 7 Jan 2019 16:28:23 +0000 (-0600) Subject: spirv: Sort supported capabilities X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=05d72d6d480ef93bd8e43a47732c608dc5291b95;p=mesa.git spirv: Sort supported capabilities Reviewed-by: Caio Marcelo de Oliveira Filho --- diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index cc4bd1684f8..9ca586486c4 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -221,32 +221,32 @@ radv_shader_compile_to_nir(struct radv_device *device, const struct spirv_to_nir_options spirv_options = { .lower_ubo_ssbo_access_to_offsets = true, .caps = { + .descriptor_array_dynamic_indexing = true, .device_group = true, .draw_parameters = true, .float64 = true, + .gcn_shader = true, + .geometry_streams = true, .image_read_without_format = true, .image_write_without_format = true, - .tessellation = true, - .int64 = true, .int16 = true, + .int64 = 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_ballot = true, .subgroup_basic = true, .subgroup_quad = true, .subgroup_shuffle = true, .subgroup_vote = true, - .variable_pointers = 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, + .tessellation = true, .transform_feedback = true, - .storage_image_ms = true, + .trinary_minmax = true, + .variable_pointers = true, }, .ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2), .ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2), diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index 05f37c8d197..dc47cd7656d 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -33,38 +33,38 @@ extern "C" { #endif struct spirv_supported_capabilities { - bool float64; - bool image_ms_array; - bool tessellation; + bool atomic_storage; + bool descriptor_array_dynamic_indexing; bool device_group; bool draw_parameters; + bool float64; + bool geometry_streams; + bool gcn_shader; + bool image_ms_array; bool image_read_without_format; bool image_write_without_format; + bool int16; bool int64; + bool int64_atomics; bool min_lod; bool multiview; - bool variable_pointers; - bool storage_16bit; - bool int16; + bool post_depth_coverage; + bool runtime_descriptor_array; bool shader_viewport_index_layer; + bool stencil_export; + bool storage_8bit; + bool storage_16bit; + bool storage_image_ms; bool subgroup_arithmetic; bool subgroup_ballot; bool subgroup_basic; bool subgroup_quad; bool subgroup_shuffle; bool subgroup_vote; - bool gcn_shader; - 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 tessellation; bool transform_feedback; - bool geometry_streams; - bool int64_atomics; - bool storage_image_ms; + bool trinary_minmax; + bool variable_pointers; }; typedef struct shader_info { diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 4269e618eba..750e258c2d2 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -136,27 +136,27 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline, struct spirv_to_nir_options spirv_options = { .lower_workgroup_access_to_offsets = true, .caps = { - .float64 = device->instance->physicalDevice.info.gen >= 8, - .int64 = device->instance->physicalDevice.info.gen >= 8, - .tessellation = true, .device_group = true, .draw_parameters = true, + .float64 = device->instance->physicalDevice.info.gen >= 8, .image_write_without_format = true, + .int16 = device->instance->physicalDevice.info.gen >= 8, + .int64 = device->instance->physicalDevice.info.gen >= 8, .min_lod = true, .multiview = true, - .variable_pointers = true, - .storage_16bit = device->instance->physicalDevice.info.gen >= 8, - .int16 = device->instance->physicalDevice.info.gen >= 8, + .post_depth_coverage = device->instance->physicalDevice.info.gen >= 9, .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_basic = true, .subgroup_ballot = true, .subgroup_quad = true, .subgroup_shuffle = true, .subgroup_vote = true, - .stencil_export = device->instance->physicalDevice.info.gen >= 9, - .storage_8bit = device->instance->physicalDevice.info.gen >= 8, - .post_depth_coverage = device->instance->physicalDevice.info.gen >= 9, + .tessellation = true, + .variable_pointers = true, }, .ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2), .ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2), diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 6ba64e4e06d..505da9896b3 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -390,15 +390,15 @@ brw_initialize_spirv_supported_capabilities(struct brw_context *brw) */ 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.geometry_streams = devinfo->gen >= 7; + ctx->Const.SpirVCapabilities.image_write_without_format = true; ctx->Const.SpirVCapabilities.int64 = devinfo->gen >= 8; 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.geometry_streams = devinfo->gen >= 7; + ctx->Const.SpirVCapabilities.variable_pointers = true; } static void