Updated spirv-tools.
This commit is contained in:
parent
379300facd
commit
b3cfedc79e
@ -1 +1 @@
|
||||
"v2023.2", "SPIRV-Tools v2023.2 v2022.4-143-g3a7146da"
|
||||
"v2023.2", "SPIRV-Tools v2023.2 v2022.4-165-g574d9da4"
|
||||
|
@ -95,17 +95,12 @@ static const spv::Capability pygen_variable_caps_SampleMaskOverrideCoverageNV[]
|
||||
static const spv::Capability pygen_variable_caps_SampleMaskPostDepthCoverage[] = {spv::Capability::SampleMaskPostDepthCoverage};
|
||||
static const spv::Capability pygen_variable_caps_SampleRateShading[] = {spv::Capability::SampleRateShading};
|
||||
static const spv::Capability pygen_variable_caps_Sampled1D[] = {spv::Capability::Sampled1D};
|
||||
static const spv::Capability pygen_variable_caps_Sampled1DImage1D[] = {spv::Capability::Sampled1D, spv::Capability::Image1D};
|
||||
static const spv::Capability pygen_variable_caps_SampledBuffer[] = {spv::Capability::SampledBuffer};
|
||||
static const spv::Capability pygen_variable_caps_SampledBufferImageBuffer[] = {spv::Capability::SampledBuffer, spv::Capability::ImageBuffer};
|
||||
static const spv::Capability pygen_variable_caps_SampledBufferShaderNonUniform[] = {spv::Capability::SampledBuffer, spv::Capability::ShaderNonUniform};
|
||||
static const spv::Capability pygen_variable_caps_SampledCubeArray[] = {spv::Capability::SampledCubeArray};
|
||||
static const spv::Capability pygen_variable_caps_SampledRect[] = {spv::Capability::SampledRect};
|
||||
static const spv::Capability pygen_variable_caps_SampledRectImageRect[] = {spv::Capability::SampledRect, spv::Capability::ImageRect};
|
||||
static const spv::Capability pygen_variable_caps_Shader[] = {spv::Capability::Shader};
|
||||
static const spv::Capability pygen_variable_caps_ShaderImageCubeArray[] = {spv::Capability::Shader, spv::Capability::ImageCubeArray};
|
||||
static const spv::Capability pygen_variable_caps_ShaderKernel[] = {spv::Capability::Shader, spv::Capability::Kernel};
|
||||
static const spv::Capability pygen_variable_caps_ShaderKernelImageMSArray[] = {spv::Capability::Shader, spv::Capability::Kernel, spv::Capability::ImageMSArray};
|
||||
static const spv::Capability pygen_variable_caps_ShaderUniformDecoration[] = {spv::Capability::Shader, spv::Capability::UniformDecoration};
|
||||
static const spv::Capability pygen_variable_caps_ShaderVectorComputeINTEL[] = {spv::Capability::Shader, spv::Capability::VectorComputeINTEL};
|
||||
static const spv::Capability pygen_variable_caps_ShaderInvocationReorderNV[] = {spv::Capability::ShaderInvocationReorderNV};
|
||||
@ -553,12 +548,12 @@ static const spv_operand_desc_t pygen_variable_StorageClassEntries[] = {
|
||||
};
|
||||
|
||||
static const spv_operand_desc_t pygen_variable_DimEntries[] = {
|
||||
{"1D", 0, 2, pygen_variable_caps_Sampled1DImage1D, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"2D", 1, 3, pygen_variable_caps_ShaderKernelImageMSArray, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"1D", 0, 1, pygen_variable_caps_Sampled1D, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"2D", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"3D", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"Cube", 3, 2, pygen_variable_caps_ShaderImageCubeArray, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"Rect", 4, 2, pygen_variable_caps_SampledRectImageRect, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"Buffer", 5, 2, pygen_variable_caps_SampledBufferImageBuffer, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"Cube", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"Rect", 4, 1, pygen_variable_caps_SampledRect, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"Buffer", 5, 1, pygen_variable_caps_SampledBuffer, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu},
|
||||
{"SubpassData", 6, 1, pygen_variable_caps_InputAttachment, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}
|
||||
};
|
||||
|
||||
|
@ -21,10 +21,8 @@
|
||||
#include <stack>
|
||||
|
||||
#include "source/cfa.h"
|
||||
#include "source/latest_version_glsl_std_450_header.h"
|
||||
#include "source/opt/eliminate_dead_functions_util.h"
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/opt/iterator.h"
|
||||
#include "source/opt/reflect.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/util/string_utils.h"
|
||||
|
@ -16,9 +16,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "source/opt/function.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/module.h"
|
||||
#include "source/opt/reflect.h"
|
||||
#include "source/util/make_unique.h"
|
||||
|
||||
|
@ -16,11 +16,8 @@
|
||||
|
||||
#include "source/opt/block_merge_pass.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/block_merge_util.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/iterator.h"
|
||||
|
||||
namespace spvtools {
|
||||
namespace opt {
|
||||
|
1
3rdparty/spirv-tools/source/opt/ccp_pass.cpp
vendored
1
3rdparty/spirv-tools/source/opt/ccp_pass.cpp
vendored
@ -24,7 +24,6 @@
|
||||
|
||||
#include "source/opt/fold.h"
|
||||
#include "source/opt/function.h"
|
||||
#include "source/opt/module.h"
|
||||
#include "source/opt/propagator.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -16,13 +16,9 @@
|
||||
// constructs (e.g., unreachable basic blocks, empty control flow structures,
|
||||
// etc)
|
||||
|
||||
#include <queue>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "source/opt/cfg_cleanup_pass.h"
|
||||
|
||||
#include "source/opt/function.h"
|
||||
#include "source/opt/module.h"
|
||||
|
||||
namespace spvtools {
|
||||
namespace opt {
|
||||
|
@ -14,11 +14,9 @@
|
||||
|
||||
#include "code_sink.h"
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/instruction.h"
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/util/bit_vector.h"
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/opt/constants.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/ir_context.h"
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/basic_block.h"
|
||||
#include "source/opt/cfg.h"
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <tuple>
|
||||
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/util/make_unique.h"
|
||||
|
1
3rdparty/spirv-tools/source/opt/dataflow.cpp
vendored
1
3rdparty/spirv-tools/source/opt/dataflow.cpp
vendored
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/opt/dataflow.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include "source/cfa.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/iterator.h"
|
||||
#include "source/opt/struct_cfg_analysis.h"
|
||||
#include "source/util/make_unique.h"
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/def_use_manager.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/log.h"
|
||||
#include "source/opt/reflect.h"
|
||||
|
||||
|
@ -15,11 +15,9 @@
|
||||
|
||||
#include "source/opt/eliminate_dead_io_components_pass.h"
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/instruction.h"
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/util/bit_vector.h"
|
||||
|
||||
|
@ -219,7 +219,7 @@ Pass::Status EliminateDeadOutputStoresPass::DoDeadOutputStoreElimination() {
|
||||
var_id, [this, &var, is_builtin](Instruction* user) {
|
||||
auto op = user->opcode();
|
||||
if (op == spv::Op::OpEntryPoint || op == spv::Op::OpName ||
|
||||
op == spv::Op::OpDecorate)
|
||||
op == spv::Op::OpDecorate || user->IsNonSemanticInstruction())
|
||||
return;
|
||||
if (is_builtin)
|
||||
KillAllDeadStoresOfBuiltinRef(user, &var);
|
||||
|
@ -50,15 +50,9 @@ class EliminateDeadOutputStoresPass : public Pass {
|
||||
// Initialize elimination
|
||||
void InitializeElimination();
|
||||
|
||||
// Do dead output store analysis
|
||||
Status DoDeadOutputStoreAnalysis();
|
||||
|
||||
// Do dead output store analysis
|
||||
Status DoDeadOutputStoreElimination();
|
||||
|
||||
// Mark all locations live
|
||||
void MarkAllLocsLive();
|
||||
|
||||
// Kill all stores resulting from |ref|.
|
||||
void KillAllStoresOfRef(Instruction* ref);
|
||||
|
||||
|
@ -14,8 +14,6 @@
|
||||
|
||||
#include "source/opt/feature_manager.h"
|
||||
|
||||
#include <queue>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
|
||||
#include "source/enum_string_mapping.h"
|
||||
|
1
3rdparty/spirv-tools/source/opt/fold.cpp
vendored
1
3rdparty/spirv-tools/source/opt/fold.cpp
vendored
@ -21,7 +21,6 @@
|
||||
#include "source/opt/const_folding_rules.h"
|
||||
#include "source/opt/def_use_manager.h"
|
||||
#include "source/opt/folding_rules.h"
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -15,12 +15,9 @@
|
||||
#include "source/opt/fold_spec_constant_op_and_composite_pass.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <initializer_list>
|
||||
#include <tuple>
|
||||
|
||||
#include "source/opt/constants.h"
|
||||
#include "source/opt/fold.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/util/make_unique.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/opt/folding_rules.h"
|
||||
|
||||
#include <climits>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
2
3rdparty/spirv-tools/source/opt/function.cpp
vendored
2
3rdparty/spirv-tools/source/opt/function.cpp
vendored
@ -15,9 +15,7 @@
|
||||
#include "source/opt/function.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "function.h"
|
||||
#include "ir_context.h"
|
||||
#include "source/util/bit_vector.h"
|
||||
|
||||
|
@ -141,18 +141,12 @@
|
||||
|
||||
#include "graphics_robust_access_pass.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <initializer_list>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
#include "constants.h"
|
||||
#include "def_use_manager.h"
|
||||
#include "function.h"
|
||||
#include "ir_context.h"
|
||||
#include "module.h"
|
||||
#include "pass.h"
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/util/make_unique.h"
|
||||
|
@ -90,10 +90,6 @@ class InterfaceVariableScalarReplacement : public Pass {
|
||||
// |component|. Returns true whether the component exists or not.
|
||||
bool GetVariableComponent(Instruction* var, uint32_t* component);
|
||||
|
||||
// Returns the interface variable instruction whose result id is
|
||||
// |interface_var_id|.
|
||||
Instruction* GetInterfaceVariable(uint32_t interface_var_id);
|
||||
|
||||
// Returns the type of |var| as an instruction.
|
||||
Instruction* GetTypeOfVariable(Instruction* var);
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "ir_builder.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "type_manager.h"
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "OpenCLDebugInfo100.h"
|
||||
#include "source/latest_version_glsl_std_450_header.h"
|
||||
#include "source/opt/log.h"
|
||||
#include "source/opt/mem_pass.h"
|
||||
#include "source/opt/reflect.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
11
3rdparty/spirv-tools/source/opt/ir_context.h
vendored
11
3rdparty/spirv-tools/source/opt/ir_context.h
vendored
@ -645,6 +645,17 @@ class IRContext {
|
||||
// all have the same stage.
|
||||
spv::ExecutionModel GetStage();
|
||||
|
||||
// Returns true of the current target environment is at least that of the
|
||||
// given environment.
|
||||
bool IsTargetEnvAtLeast(spv_target_env env) {
|
||||
// A bit of a hack. We assume that the target environments are appended to
|
||||
// the enum, so that there is an appropriate order.
|
||||
return syntax_context_->target_env >= env;
|
||||
}
|
||||
|
||||
// Return the target environment for the current context.
|
||||
spv_target_env GetTargetEnv() const { return syntax_context_->target_env; }
|
||||
|
||||
private:
|
||||
// Builds the def-use manager from scratch, even if it was already valid.
|
||||
void BuildDefUseManager() {
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "source/opt/licm_pass.h"
|
||||
|
||||
#include <queue>
|
||||
#include <utility>
|
||||
|
||||
#include "source/opt/module.h"
|
||||
#include "source/opt/pass.h"
|
||||
|
2
3rdparty/spirv-tools/source/opt/liveness.cpp
vendored
2
3rdparty/spirv-tools/source/opt/liveness.cpp
vendored
@ -309,7 +309,7 @@ void LivenessManager::ComputeLiveness() {
|
||||
def_use_mgr->ForEachUser(var_id, [this, &var](Instruction* user) {
|
||||
auto op = user->opcode();
|
||||
if (op == spv::Op::OpEntryPoint || op == spv::Op::OpName ||
|
||||
op == spv::Op::OpDecorate) {
|
||||
op == spv::Op::OpDecorate || user->IsNonSemanticInstruction()) {
|
||||
return;
|
||||
}
|
||||
MarkRefLive(user, &var);
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include "source/opt/local_access_chain_convert_pass.h"
|
||||
|
||||
#include "ir_builder.h"
|
||||
#include "ir_context.h"
|
||||
#include "iterator.h"
|
||||
#include "source/util/string_utils.h"
|
||||
@ -398,60 +397,36 @@ Pass::Status LocalAccessChainConvertPass::Process() {
|
||||
|
||||
void LocalAccessChainConvertPass::InitExtensions() {
|
||||
extensions_allowlist_.clear();
|
||||
extensions_allowlist_.insert({
|
||||
"SPV_AMD_shader_explicit_vertex_parameter",
|
||||
"SPV_AMD_shader_trinary_minmax",
|
||||
"SPV_AMD_gcn_shader",
|
||||
"SPV_KHR_shader_ballot",
|
||||
"SPV_AMD_shader_ballot",
|
||||
"SPV_AMD_gpu_shader_half_float",
|
||||
"SPV_KHR_shader_draw_parameters",
|
||||
"SPV_KHR_subgroup_vote",
|
||||
"SPV_KHR_8bit_storage",
|
||||
"SPV_KHR_16bit_storage",
|
||||
"SPV_KHR_device_group",
|
||||
"SPV_KHR_multiview",
|
||||
"SPV_NVX_multiview_per_view_attributes",
|
||||
"SPV_NV_viewport_array2",
|
||||
"SPV_NV_stereo_view_rendering",
|
||||
"SPV_NV_sample_mask_override_coverage",
|
||||
"SPV_NV_geometry_shader_passthrough",
|
||||
"SPV_AMD_texture_gather_bias_lod",
|
||||
extensions_allowlist_.insert(
|
||||
{"SPV_AMD_shader_explicit_vertex_parameter",
|
||||
"SPV_AMD_shader_trinary_minmax", "SPV_AMD_gcn_shader",
|
||||
"SPV_KHR_shader_ballot", "SPV_AMD_shader_ballot",
|
||||
"SPV_AMD_gpu_shader_half_float", "SPV_KHR_shader_draw_parameters",
|
||||
"SPV_KHR_subgroup_vote", "SPV_KHR_8bit_storage", "SPV_KHR_16bit_storage",
|
||||
"SPV_KHR_device_group", "SPV_KHR_multiview",
|
||||
"SPV_NVX_multiview_per_view_attributes", "SPV_NV_viewport_array2",
|
||||
"SPV_NV_stereo_view_rendering", "SPV_NV_sample_mask_override_coverage",
|
||||
"SPV_NV_geometry_shader_passthrough", "SPV_AMD_texture_gather_bias_lod",
|
||||
"SPV_KHR_storage_buffer_storage_class",
|
||||
// SPV_KHR_variable_pointers
|
||||
// Currently do not support extended pointer expressions
|
||||
"SPV_AMD_gpu_shader_int16",
|
||||
"SPV_KHR_post_depth_coverage",
|
||||
"SPV_KHR_shader_atomic_counter_ops",
|
||||
"SPV_EXT_shader_stencil_export",
|
||||
"SPV_AMD_gpu_shader_int16", "SPV_KHR_post_depth_coverage",
|
||||
"SPV_KHR_shader_atomic_counter_ops", "SPV_EXT_shader_stencil_export",
|
||||
"SPV_EXT_shader_viewport_index_layer",
|
||||
"SPV_AMD_shader_image_load_store_lod",
|
||||
"SPV_AMD_shader_fragment_mask",
|
||||
"SPV_EXT_fragment_fully_covered",
|
||||
"SPV_AMD_gpu_shader_half_float_fetch",
|
||||
"SPV_GOOGLE_decorate_string",
|
||||
"SPV_GOOGLE_hlsl_functionality1",
|
||||
"SPV_GOOGLE_user_type",
|
||||
"SPV_NV_shader_subgroup_partitioned",
|
||||
"SPV_EXT_demote_to_helper_invocation",
|
||||
"SPV_EXT_descriptor_indexing",
|
||||
"SPV_AMD_shader_image_load_store_lod", "SPV_AMD_shader_fragment_mask",
|
||||
"SPV_EXT_fragment_fully_covered", "SPV_AMD_gpu_shader_half_float_fetch",
|
||||
"SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1",
|
||||
"SPV_GOOGLE_user_type", "SPV_NV_shader_subgroup_partitioned",
|
||||
"SPV_EXT_demote_to_helper_invocation", "SPV_EXT_descriptor_indexing",
|
||||
"SPV_NV_fragment_shader_barycentric",
|
||||
"SPV_NV_compute_shader_derivatives",
|
||||
"SPV_NV_shader_image_footprint",
|
||||
"SPV_NV_shading_rate",
|
||||
"SPV_NV_mesh_shader",
|
||||
"SPV_NV_ray_tracing",
|
||||
"SPV_KHR_ray_tracing",
|
||||
"SPV_KHR_ray_query",
|
||||
"SPV_EXT_fragment_invocation_density",
|
||||
"SPV_KHR_terminate_invocation",
|
||||
"SPV_KHR_subgroup_uniform_control_flow",
|
||||
"SPV_KHR_integer_dot_product",
|
||||
"SPV_EXT_shader_image_int64",
|
||||
"SPV_KHR_non_semantic_info",
|
||||
"SPV_NV_compute_shader_derivatives", "SPV_NV_shader_image_footprint",
|
||||
"SPV_NV_shading_rate", "SPV_NV_mesh_shader", "SPV_NV_ray_tracing",
|
||||
"SPV_KHR_ray_tracing", "SPV_KHR_ray_query",
|
||||
"SPV_EXT_fragment_invocation_density", "SPV_KHR_terminate_invocation",
|
||||
"SPV_KHR_subgroup_uniform_control_flow", "SPV_KHR_integer_dot_product",
|
||||
"SPV_EXT_shader_image_int64", "SPV_KHR_non_semantic_info",
|
||||
"SPV_KHR_uniform_group_instructions",
|
||||
"SPV_KHR_fragment_shader_barycentric",
|
||||
});
|
||||
"SPV_KHR_fragment_shader_barycentric", "SPV_KHR_vulkan_memory_model"});
|
||||
}
|
||||
|
||||
bool LocalAccessChainConvertPass::AnyIndexIsOutOfBounds(
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/iterator.h"
|
||||
#include "source/util/string_utils.h"
|
||||
|
||||
namespace spvtools {
|
||||
@ -234,8 +233,7 @@ Pass::Status LocalSingleBlockLoadStoreElimPass::Process() {
|
||||
|
||||
void LocalSingleBlockLoadStoreElimPass::InitExtensions() {
|
||||
extensions_allowlist_.clear();
|
||||
extensions_allowlist_.insert({
|
||||
"SPV_AMD_shader_explicit_vertex_parameter",
|
||||
extensions_allowlist_.insert({"SPV_AMD_shader_explicit_vertex_parameter",
|
||||
"SPV_AMD_shader_trinary_minmax",
|
||||
"SPV_AMD_gcn_shader",
|
||||
"SPV_KHR_shader_ballot",
|
||||
@ -287,7 +285,7 @@ void LocalSingleBlockLoadStoreElimPass::InitExtensions() {
|
||||
"SPV_KHR_non_semantic_info",
|
||||
"SPV_KHR_uniform_group_instructions",
|
||||
"SPV_KHR_fragment_shader_barycentric",
|
||||
});
|
||||
"SPV_KHR_vulkan_memory_model"});
|
||||
}
|
||||
|
||||
} // namespace opt
|
||||
|
@ -17,8 +17,6 @@
|
||||
#include "source/opt/local_single_store_elim_pass.h"
|
||||
|
||||
#include "source/cfa.h"
|
||||
#include "source/latest_version_glsl_std_450_header.h"
|
||||
#include "source/opt/iterator.h"
|
||||
#include "source/util/string_utils.h"
|
||||
|
||||
namespace spvtools {
|
||||
@ -88,8 +86,7 @@ Pass::Status LocalSingleStoreElimPass::Process() {
|
||||
}
|
||||
|
||||
void LocalSingleStoreElimPass::InitExtensionAllowList() {
|
||||
extensions_allowlist_.insert({
|
||||
"SPV_AMD_shader_explicit_vertex_parameter",
|
||||
extensions_allowlist_.insert({"SPV_AMD_shader_explicit_vertex_parameter",
|
||||
"SPV_AMD_shader_trinary_minmax",
|
||||
"SPV_AMD_gcn_shader",
|
||||
"SPV_KHR_shader_ballot",
|
||||
@ -138,7 +135,7 @@ void LocalSingleStoreElimPass::InitExtensionAllowList() {
|
||||
"SPV_KHR_non_semantic_info",
|
||||
"SPV_KHR_uniform_group_instructions",
|
||||
"SPV_KHR_fragment_shader_barycentric",
|
||||
});
|
||||
"SPV_KHR_vulkan_memory_model"});
|
||||
}
|
||||
bool LocalSingleStoreElimPass::ProcessVariable(Instruction* var_inst) {
|
||||
std::vector<Instruction*> users;
|
||||
|
@ -15,14 +15,12 @@
|
||||
#include "source/opt/loop_dependence.h"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/instruction.h"
|
||||
#include "source/opt/scalar_analysis.h"
|
||||
#include "source/opt/scalar_analysis_nodes.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -12,8 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "source/opt/loop_dependence.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <set>
|
||||
#include <string>
|
||||
@ -23,7 +21,7 @@
|
||||
|
||||
#include "source/opt/basic_block.h"
|
||||
#include "source/opt/instruction.h"
|
||||
#include "source/opt/scalar_analysis.h"
|
||||
#include "source/opt/loop_dependence.h"
|
||||
#include "source/opt/scalar_analysis_nodes.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -15,17 +15,14 @@
|
||||
#include "source/opt/loop_descriptor.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <stack>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/cfg.h"
|
||||
#include "source/opt/constants.h"
|
||||
#include "source/opt/dominator_tree.h"
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/iterator.h"
|
||||
#include "source/opt/tree_iterator.h"
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/opt/loop_fusion_pass.h"
|
||||
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/loop_descriptor.h"
|
||||
#include "source/opt/loop_fusion.h"
|
||||
#include "source/opt/register_pressure.h"
|
||||
|
@ -12,17 +12,16 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include <algorithm>
|
||||
#include "source/opt/loop_peeling.h"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/loop_descriptor.h"
|
||||
#include "source/opt/loop_peeling.h"
|
||||
#include "source/opt/loop_utils.h"
|
||||
#include "source/opt/scalar_analysis.h"
|
||||
#include "source/opt/scalar_analysis_nodes.h"
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "source/opt/loop_unroller.h"
|
||||
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
@ -31,7 +30,6 @@
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/loop_descriptor.h"
|
||||
|
||||
#include "source/opt/loop_utils.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
2
3rdparty/spirv-tools/source/opt/mem_pass.cpp
vendored
2
3rdparty/spirv-tools/source/opt/mem_pass.cpp
vendored
@ -22,9 +22,7 @@
|
||||
|
||||
#include "source/cfa.h"
|
||||
#include "source/opt/basic_block.h"
|
||||
#include "source/opt/dominator_analysis.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/iterator.h"
|
||||
|
||||
namespace spvtools {
|
||||
namespace opt {
|
||||
|
@ -15,8 +15,6 @@
|
||||
#include "source/opt/remove_duplicates_pass.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
@ -25,7 +23,6 @@
|
||||
#include "source/opcode.h"
|
||||
#include "source/opt/decoration_manager.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/reflect.h"
|
||||
|
||||
namespace spvtools {
|
||||
namespace opt {
|
||||
|
@ -12,6 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef SOURCE_OPT_REMOVE_UNUSED_INTERFACE_VARIABLES_PASS_H_
|
||||
#define SOURCE_OPT_REMOVE_UNUSED_INTERFACE_VARIABLES_PASS_H_
|
||||
|
||||
#include "source/opt/pass.h"
|
||||
namespace spvtools {
|
||||
namespace opt {
|
||||
@ -24,3 +27,5 @@ class RemoveUnusedInterfaceVariablesPass : public Pass {
|
||||
};
|
||||
} // namespace opt
|
||||
} // namespace spvtools
|
||||
|
||||
#endif // SOURCE_OPT_REMOVE_UNUSED_INTERFACE_VARIABLES_PASS_H_
|
@ -86,7 +86,8 @@ bool ReplaceInvalidOpcodePass::RewriteFunction(Function* function,
|
||||
}
|
||||
|
||||
if (model != spv::ExecutionModel::TessellationControl &&
|
||||
model != spv::ExecutionModel::GLCompute) {
|
||||
model != spv::ExecutionModel::GLCompute &&
|
||||
!context()->IsTargetEnvAtLeast(SPV_ENV_UNIVERSAL_1_3)) {
|
||||
if (inst->opcode() == spv::Op::OpControlBarrier) {
|
||||
assert(model != spv::ExecutionModel::Kernel &&
|
||||
"Expecting to be working on a shader module.");
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/opt/scalar_analysis.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
@ -12,16 +12,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "source/opt/scalar_analysis.h"
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/scalar_analysis.h"
|
||||
|
||||
// Simplifies scalar analysis DAGs.
|
||||
//
|
||||
// 1. Given a node passed to SimplifyExpression we first simplify the graph by
|
||||
|
@ -19,12 +19,10 @@
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
#include "source/enum_string_mapping.h"
|
||||
#include "source/extensions.h"
|
||||
#include "source/opt/reflect.h"
|
||||
#include "source/opt/types.h"
|
||||
#include "source/util/make_unique.h"
|
||||
#include "types.h"
|
||||
|
||||
namespace spvtools {
|
||||
namespace opt {
|
||||
|
@ -21,8 +21,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/def_use_manager.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/opt/type_manager.h"
|
||||
#include "source/opt/types.h"
|
||||
#include "source/util/make_unique.h"
|
||||
#include "source/util/parse_number.h"
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/opt/simplification_pass.h"
|
||||
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "source/opt/spread_volatile_semantics.h"
|
||||
|
||||
#include "source/opt/decoration_manager.h"
|
||||
#include "source/opt/ir_builder.h"
|
||||
#include "source/spirv_constant.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -48,7 +48,6 @@
|
||||
#include "source/opt/cfg.h"
|
||||
#include "source/opt/mem_pass.h"
|
||||
#include "source/opt/types.h"
|
||||
#include "source/util/make_unique.h"
|
||||
|
||||
// Debug logging (0: Off, 1-N: Verbosity level). Replace this with the
|
||||
// implementation done for
|
||||
|
@ -14,12 +14,8 @@
|
||||
|
||||
#include "source/opt/strength_reduction_pass.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/opt/strip_nonsemantic_info_pass.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/instruction.h"
|
||||
|
1
3rdparty/spirv-tools/source/opt/types.cpp
vendored
1
3rdparty/spirv-tools/source/opt/types.cpp
vendored
@ -16,7 +16,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
#include <cstdint>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "source/opt/def_use_manager.h"
|
||||
#include "source/opt/ir_context.h"
|
||||
#include "source/util/make_unique.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "source/val/basic_block.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "source/val/function.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
1
3rdparty/spirv-tools/source/val/function.cpp
vendored
1
3rdparty/spirv-tools/source/val/function.cpp
vendored
@ -18,7 +18,6 @@
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
#include "source/cfa.h"
|
||||
|
8
3rdparty/spirv-tools/source/val/validate.cpp
vendored
8
3rdparty/spirv-tools/source/val/validate.cpp
vendored
@ -14,13 +14,9 @@
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -28,15 +24,11 @@
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/enum_string_mapping.h"
|
||||
#include "source/extensions.h"
|
||||
#include "source/instruction.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/operand.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_endian.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/spirv_validator_options.h"
|
||||
#include "source/val/construct.h"
|
||||
#include "source/val/function.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validation_state.h"
|
||||
#include "spirv-tools/libspirv.h"
|
||||
|
5
3rdparty/spirv-tools/source/val/validate.h
vendored
5
3rdparty/spirv-tools/source/val/validate.h
vendored
@ -31,11 +31,6 @@ class ValidationState_t;
|
||||
class BasicBlock;
|
||||
class Instruction;
|
||||
|
||||
/// A function that returns a vector of BasicBlocks given a BasicBlock. Used to
|
||||
/// get the successor and predecessor nodes of a CFG block
|
||||
using get_blocks_func =
|
||||
std::function<const std::vector<BasicBlock*>*(const BasicBlock*)>;
|
||||
|
||||
/// @brief Performs the Control Flow Graph checks
|
||||
///
|
||||
/// @param[in] _ the validation state of the module
|
||||
|
@ -15,13 +15,10 @@
|
||||
// Validates correctness of the intra-block preconditions of SPIR-V
|
||||
// instructions.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -14,13 +14,11 @@
|
||||
|
||||
// Performs validation of arithmetic instructions.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -16,13 +16,11 @@
|
||||
|
||||
// Validates correctness of atomic SPIR-V instructions.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/util/bitutils.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validate_memory_semantics.h"
|
||||
#include "source/val/validate_scopes.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
@ -16,11 +16,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/util/bitutils.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validate_memory_semantics.h"
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
// Validates correctness of bitwise instructions.
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/val/instruction.h"
|
||||
|
@ -24,10 +24,8 @@
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/util/bitutils.h"
|
||||
|
@ -16,9 +16,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
|
@ -12,11 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
@ -28,7 +26,6 @@
|
||||
#include "source/cfa.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/spirv_validator_options.h"
|
||||
#include "source/val/basic_block.h"
|
||||
#include "source/val/construct.h"
|
||||
|
@ -14,12 +14,10 @@
|
||||
|
||||
// Validates correctness of composite SPIR-V instructions.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
// Validates correctness of conversion instructions.
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
|
@ -12,11 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "source/binary.h"
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_constant.h"
|
||||
@ -48,13 +47,6 @@ struct PairHash {
|
||||
}
|
||||
};
|
||||
|
||||
// A functor for hashing decoration types.
|
||||
struct SpvDecorationHash {
|
||||
std::size_t operator()(spv::Decoration dec) const {
|
||||
return static_cast<std::size_t>(dec);
|
||||
}
|
||||
};
|
||||
|
||||
// Struct member layout attributes that are inherited through arrays.
|
||||
struct LayoutConstraints {
|
||||
explicit LayoutConstraints(
|
||||
|
@ -14,13 +14,11 @@
|
||||
|
||||
// Validates correctness of derivative SPIR-V instructions.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -13,8 +13,6 @@
|
||||
// limitations under the License.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include "source/val/function.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -18,22 +18,18 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "spirv/unified1/NonSemanticClspvReflection.h"
|
||||
|
||||
#include "NonSemanticShaderDebugInfo100.h"
|
||||
#include "OpenCLDebugInfo100.h"
|
||||
#include "source/common_debug_info.h"
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/enum_string_mapping.h"
|
||||
#include "source/extensions.h"
|
||||
#include "source/latest_version_glsl_std_450_header.h"
|
||||
#include "source/latest_version_opencl_std_header.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
#include "spirv/unified1/NonSemanticClspvReflection.h"
|
||||
|
||||
namespace spvtools {
|
||||
namespace val {
|
||||
|
13
3rdparty/spirv-tools/source/val/validate_id.cpp
vendored
13
3rdparty/spirv-tools/source/val/validate_id.cpp
vendored
@ -12,25 +12,14 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/instruction.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/operand.h"
|
||||
#include "source/spirv_validator_options.h"
|
||||
#include "source/val/function.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
#include "spirv-tools/libspirv.h"
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
@ -1996,11 +1995,11 @@ spv_result_t ValidateImageQueryLod(ValidationState_t& _,
|
||||
<< " components, but given only " << actual_coord_size;
|
||||
}
|
||||
|
||||
// The operad is a sampled image.
|
||||
// The operand is a sampled image.
|
||||
// The sampled image type is already checked to be parameterized by an image
|
||||
// type with Sampled=0 or Sampled=1. Vulkan bans Sampled=0, and so we have
|
||||
// Sampled=1. So the validator already enforces Vulkan VUID 4659:
|
||||
// OpImageQuerySizeLod must only consume an “Image” operand whose type has
|
||||
// OpImageQuerySizeLod must only consume an "Image" operand whose type has
|
||||
// its "Sampled" operand set to 1
|
||||
return SPV_SUCCESS;
|
||||
}
|
||||
|
@ -14,26 +14,20 @@
|
||||
|
||||
// Performs validation on instructions that appear inside of a SPIR-V block.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "source/binary.h"
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/enum_set.h"
|
||||
#include "source/enum_string_mapping.h"
|
||||
#include "source/extensions.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/operand.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_definition.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/spirv_validator_options.h"
|
||||
#include "source/util/string_utils.h"
|
||||
#include "source/val/function.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/val/function.h"
|
||||
|
@ -14,12 +14,9 @@
|
||||
|
||||
// Source code for logical layout validation as described in section 2.4
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "DebugInfo.h"
|
||||
#include "NonSemanticShaderDebugInfo100.h"
|
||||
#include "OpenCLDebugInfo100.h"
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/operand.h"
|
||||
#include "source/val/function.h"
|
||||
|
@ -14,13 +14,10 @@
|
||||
|
||||
// Validates literal numbers.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -14,11 +14,9 @@
|
||||
|
||||
// Validates correctness of logical SPIR-V instructions.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/val/validate_memory_semantics.h"
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/util/bitutils.h"
|
||||
#include "source/val/instruction.h"
|
||||
|
@ -14,14 +14,11 @@
|
||||
|
||||
// Validates correctness of barrier SPIR-V instructions.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/spirv_constant.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/util/bitutils.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validate_scopes.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
|
@ -14,13 +14,11 @@
|
||||
|
||||
// Validates correctness of primitive SPIR-V instructions.
|
||||
|
||||
#include "source/val/validate.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/opcode.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validate.h"
|
||||
#include "source/val/validation_state.h"
|
||||
|
||||
namespace spvtools {
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "source/val/validate_scopes.h"
|
||||
|
||||
#include "source/diagnostic.h"
|
||||
#include "source/spirv_target_env.h"
|
||||
#include "source/val/instruction.h"
|
||||
#include "source/val/validation_state.h"
|
||||
@ -240,7 +239,7 @@ spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst,
|
||||
!_.HasCapability(spv::Capability::SubgroupBallotKHR) &&
|
||||
!_.HasCapability(spv::Capability::SubgroupVoteKHR)) {
|
||||
return _.diag(SPV_ERROR_INVALID_DATA, inst)
|
||||
<< _.VkErrorID(6997) << spvOpcodeString(opcode)
|
||||
<< _.VkErrorID(7951) << spvOpcodeString(opcode)
|
||||
<< ": in Vulkan 1.0 environment Memory Scope is can not be "
|
||||
"Subgroup without SubgroupBallotKHR or SubgroupVoteKHR "
|
||||
"declared";
|
||||
|
@ -2163,8 +2163,6 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-PushConstant-06808);
|
||||
case 6925:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-Uniform-06925);
|
||||
case 6997:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-SubgroupVoteKHR-06997);
|
||||
case 7102:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-MeshEXT-07102);
|
||||
case 7320:
|
||||
@ -2179,6 +2177,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id,
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-Base-07652);
|
||||
case 7703:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-Component-07703);
|
||||
case 7951:
|
||||
return VUID_WRAP(VUID-StandaloneSpirv-SubgroupVoteKHR-07951);
|
||||
default:
|
||||
return ""; // unknown id
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user