mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
microsoft: Use spirv_capabilities for spirv_to_dxil
Note: This change doesn't actually affect dozen a it uses vk_shader_module_to_nir() so caps will be exposed based on Vulkan features rather than the manual table. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Iván Briano <ivan.briano@intel.com> Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28905>
This commit is contained in:
parent
3672702be2
commit
e80d52223e
2 changed files with 56 additions and 34 deletions
|
|
@ -617,6 +617,15 @@ clc_libclc_new(const struct clc_logger *logger, const struct clc_libclc_options
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const struct spirv_capabilities libclc_spirv_caps = {
|
||||
.Addresses = true,
|
||||
.Float64 = true,
|
||||
.Int8 = true,
|
||||
.Int16 = true,
|
||||
.Int64 = true,
|
||||
.Kernel = true,
|
||||
.Linkage = true,
|
||||
};
|
||||
const struct spirv_to_nir_options libclc_spirv_options = {
|
||||
.environment = NIR_SPIRV_OPENCL,
|
||||
.create_library = true,
|
||||
|
|
@ -625,15 +634,7 @@ clc_libclc_new(const struct clc_logger *logger, const struct clc_libclc_options
|
|||
.shared_addr_format = nir_address_format_32bit_offset_as_64bit,
|
||||
.temp_addr_format = nir_address_format_32bit_offset_as_64bit,
|
||||
.float_controls_execution_mode = FLOAT_CONTROLS_DENORM_FLUSH_TO_ZERO_FP32,
|
||||
.caps = {
|
||||
.address = true,
|
||||
.float64 = true,
|
||||
.int8 = true,
|
||||
.int16 = true,
|
||||
.int64 = true,
|
||||
.kernel = true,
|
||||
.linkage = true,
|
||||
},
|
||||
.capabilities = &libclc_spirv_caps,
|
||||
};
|
||||
|
||||
glsl_type_singleton_init_or_ref();
|
||||
|
|
|
|||
|
|
@ -27,39 +27,60 @@
|
|||
#include "dxil_nir_lower_int_cubemaps.h"
|
||||
#include "shader_enums.h"
|
||||
#include "spirv/nir_spirv.h"
|
||||
#include "spirv/spirv_info.h"
|
||||
#include "util/blob.h"
|
||||
#include "dxil_spirv_nir.h"
|
||||
|
||||
#include "git_sha1.h"
|
||||
#include "vulkan/vulkan.h"
|
||||
|
||||
static const struct spirv_capabilities
|
||||
spirv_caps = {
|
||||
.DrawParameters = true,
|
||||
.MultiView = true,
|
||||
.GroupNonUniform = true,
|
||||
.GroupNonUniformBallot = true,
|
||||
.GroupNonUniformVote = true,
|
||||
.GroupNonUniformShuffle = true,
|
||||
.GroupNonUniformQuad = true,
|
||||
.GroupNonUniformArithmetic = true,
|
||||
.InputAttachmentArrayDynamicIndexingEXT = true,
|
||||
.UniformTexelBufferArrayDynamicIndexingEXT = true,
|
||||
.StorageTexelBufferArrayDynamicIndexingEXT = true,
|
||||
.DenormFlushToZero = true,
|
||||
.DenormPreserve = true,
|
||||
.SignedZeroInfNanPreserve = true,
|
||||
.RoundingModeRTE = true,
|
||||
.RoundingModeRTZ = true,
|
||||
.Float16 = true,
|
||||
.Int16 = true,
|
||||
.StorageBuffer8BitAccess = true,
|
||||
.UniformAndStorageBuffer8BitAccess = true,
|
||||
.StoragePushConstant8 = true,
|
||||
.StorageUniformBufferBlock16 = true,
|
||||
.StorageUniform16 = true,
|
||||
.StoragePushConstant16 = true,
|
||||
.StorageInputOutput16 = true,
|
||||
.ShaderNonUniformEXT = true,
|
||||
.RuntimeDescriptorArray = true,
|
||||
.UniformBufferArrayNonUniformIndexingEXT = true,
|
||||
.SampledImageArrayNonUniformIndexingEXT = true,
|
||||
.StorageBufferArrayNonUniformIndexingEXT = true,
|
||||
.StorageImageArrayNonUniformIndexingEXT = true,
|
||||
.InputAttachmentArrayNonUniformIndexingEXT = true,
|
||||
.UniformTexelBufferArrayNonUniformIndexingEXT = true,
|
||||
.StorageTexelBufferArrayNonUniformIndexingEXT = true,
|
||||
.StorageImageReadWithoutFormat = true,
|
||||
.StorageImageWriteWithoutFormat = true,
|
||||
.Int64 = true,
|
||||
.Float64 = true,
|
||||
.Tessellation = true,
|
||||
.PhysicalStorageBufferAddresses = true,
|
||||
};
|
||||
|
||||
static const struct spirv_to_nir_options
|
||||
spirv_to_nir_options = {
|
||||
.caps = {
|
||||
.draw_parameters = true,
|
||||
.multiview = true,
|
||||
.subgroup_basic = true,
|
||||
.subgroup_ballot = true,
|
||||
.subgroup_vote = true,
|
||||
.subgroup_shuffle = true,
|
||||
.subgroup_quad = true,
|
||||
.subgroup_arithmetic = true,
|
||||
.descriptor_array_dynamic_indexing = true,
|
||||
.float_controls = true,
|
||||
.float16 = true,
|
||||
.int16 = true,
|
||||
.storage_16bit = true,
|
||||
.storage_8bit = true,
|
||||
.descriptor_indexing = true,
|
||||
.runtime_descriptor_array = true,
|
||||
.descriptor_array_non_uniform_indexing = true,
|
||||
.image_read_without_format = true,
|
||||
.image_write_without_format = true,
|
||||
.int64 = true,
|
||||
.float64 = true,
|
||||
.tessellation = true,
|
||||
.physical_storage_buffer_address = true,
|
||||
},
|
||||
.capabilities = &spirv_caps,
|
||||
.ubo_addr_format = nir_address_format_32bit_index_offset,
|
||||
.ssbo_addr_format = nir_address_format_32bit_index_offset,
|
||||
.shared_addr_format = nir_address_format_logical,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue