-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[HLSL] Fix failing SPIR-V backend tests that specify --target-env vulkan1.3 #136344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
…sts (#136343) When SPIRV-Tools is enabled, tests that specify the target environment `vulkan1.3` in the validation step fail. This is because SPIRV-Tools seems to have [grown some capability checks for vulkan 1.3](KhronosGroup/SPIRV-Tools@7e41c71). The failing tests are: - `CodeGen/SPIRV/hlsl-intrinsics/SV_GroupIndex.ll` - `CodeGen/SPIRV/hlsl-intrinsics/smoothstep.ll` For now, the fix is to XFAIL these tests to unblock the pipeline. Issue #136344 tracks the long-term solution for this.
Sure. However, we need should try to have the API we are trying to target in the spirv-val step. Many details are left to the target environment. The "universal" environment will simply not check these requirements. For example, the
Then you need to know that it is vulkan for the validator to check for API specific requirements: The validator may not check everything yet, but it is good to catch it where we can. |
Resolves #99114. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` - Implement `faceforward` SPIR-V target builtin in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add a SPIR-V fast path in `hlsl_intrinsic_helpers.h` - Add sema checks for `faceforward` to `CheckSPIRVBuiltinFunctionCall` in `clang/lib/Sema/SemaSPIRV.cpp` - Add codegen for SPIR-V `faceforward` builtin to `EmitSPIRVBuiltinExpr` in `SPIR.cpp` - Add HLSL codegen tests to `clang/test/CodeGenHLSL/builtins/faceforward.hlsl` - Add SPIRV builtin codegen tests to `clang/test/CodeGenSPIRV/Builtins/faceforward.c` - Add sema tests to `clang/test/SemaHLSL/BuiltIns/faceforward-errors.hlsl` - Add spirv sema tests to `clang/test/SemaSPIRV/BuiltIns/faceforward-errors.c` - Create the `int_spv_faceforward` intrinsic in `IntrinsicsSPIRV.td` - In `SPIRVInstructionSelector.cpp` create the `faceforward` lowering and map it to `int_spv_faceforward` in `SPIRVInstructionSelector::selectIntrinsic` - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/faceforward.ll` Incomplete tasks: - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/opencl/faceforward.ll` - Not applicable because the OpenCL SPIR-V extended instruction set does not include a `faceforward` function Follow-up tasks: - Implement pattern matching for `faceforward` in `SPIRVCombine.td` and `SPIRVPreLegalizerCombiner.cpp` - In `faceforward.ll`, change `--target-env spv1.4` to `vulkan1.3` and update the test accordingly once [#136344](#136344) has been resolved
An update to the spirv validator is now correctly rejecting vulkan shaders with the linkage capability. We have a couple tests that need updating to remove the capability. Fixes llvm#136344
An update to the spirv validator is now correctly rejecting vulkan shaders with the linkage capability. We have a couple tests that need updating to remove the capability. Fixes #136344
An update to the spirv validator is now correctly rejecting vulkan shaders with the linkage capability. We have a couple tests that need updating to remove the capability. Fixes llvm#136344
Resolves #99114. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` - Implement `faceforward` SPIR-V target builtin in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add a SPIR-V fast path in `hlsl_intrinsic_helpers.h` - Add sema checks for `faceforward` to `CheckSPIRVBuiltinFunctionCall` in `clang/lib/Sema/SemaSPIRV.cpp` - Add codegen for SPIR-V `faceforward` builtin to `EmitSPIRVBuiltinExpr` in `SPIR.cpp` - Add HLSL codegen tests to `clang/test/CodeGenHLSL/builtins/faceforward.hlsl` - Add SPIRV builtin codegen tests to `clang/test/CodeGenSPIRV/Builtins/faceforward.c` - Add sema tests to `clang/test/SemaHLSL/BuiltIns/faceforward-errors.hlsl` - Add spirv sema tests to `clang/test/SemaSPIRV/BuiltIns/faceforward-errors.c` - Create the `int_spv_faceforward` intrinsic in `IntrinsicsSPIRV.td` - In `SPIRVInstructionSelector.cpp` create the `faceforward` lowering and map it to `int_spv_faceforward` in `SPIRVInstructionSelector::selectIntrinsic` - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/faceforward.ll` Incomplete tasks: - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/opencl/faceforward.ll` - Not applicable because the OpenCL SPIR-V extended instruction set does not include a `faceforward` function Follow-up tasks: - Implement pattern matching for `faceforward` in `SPIRVCombine.td` and `SPIRVPreLegalizerCombiner.cpp` - In `faceforward.ll`, change `--target-env spv1.4` to `vulkan1.3` and update the test accordingly once [#136344](llvm/llvm-project#136344) has been resolved
…sts (llvm#136343) When SPIRV-Tools is enabled, tests that specify the target environment `vulkan1.3` in the validation step fail. This is because SPIRV-Tools seems to have [grown some capability checks for vulkan 1.3](KhronosGroup/SPIRV-Tools@7e41c71). The failing tests are: - `CodeGen/SPIRV/hlsl-intrinsics/SV_GroupIndex.ll` - `CodeGen/SPIRV/hlsl-intrinsics/smoothstep.ll` For now, the fix is to XFAIL these tests to unblock the pipeline. Issue llvm#136344 tracks the long-term solution for this.
Resolves llvm#99114. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` - Implement `faceforward` SPIR-V target builtin in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add a SPIR-V fast path in `hlsl_intrinsic_helpers.h` - Add sema checks for `faceforward` to `CheckSPIRVBuiltinFunctionCall` in `clang/lib/Sema/SemaSPIRV.cpp` - Add codegen for SPIR-V `faceforward` builtin to `EmitSPIRVBuiltinExpr` in `SPIR.cpp` - Add HLSL codegen tests to `clang/test/CodeGenHLSL/builtins/faceforward.hlsl` - Add SPIRV builtin codegen tests to `clang/test/CodeGenSPIRV/Builtins/faceforward.c` - Add sema tests to `clang/test/SemaHLSL/BuiltIns/faceforward-errors.hlsl` - Add spirv sema tests to `clang/test/SemaSPIRV/BuiltIns/faceforward-errors.c` - Create the `int_spv_faceforward` intrinsic in `IntrinsicsSPIRV.td` - In `SPIRVInstructionSelector.cpp` create the `faceforward` lowering and map it to `int_spv_faceforward` in `SPIRVInstructionSelector::selectIntrinsic` - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/faceforward.ll` Incomplete tasks: - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/opencl/faceforward.ll` - Not applicable because the OpenCL SPIR-V extended instruction set does not include a `faceforward` function Follow-up tasks: - Implement pattern matching for `faceforward` in `SPIRVCombine.td` and `SPIRVPreLegalizerCombiner.cpp` - In `faceforward.ll`, change `--target-env spv1.4` to `vulkan1.3` and update the test accordingly once [llvm#136344](llvm#136344) has been resolved
An update to the spirv validator is now correctly rejecting vulkan shaders with the linkage capability. We have a couple tests that need updating to remove the capability. Fixes llvm#136344
…sts (llvm#136343) When SPIRV-Tools is enabled, tests that specify the target environment `vulkan1.3` in the validation step fail. This is because SPIRV-Tools seems to have [grown some capability checks for vulkan 1.3](KhronosGroup/SPIRV-Tools@7e41c71). The failing tests are: - `CodeGen/SPIRV/hlsl-intrinsics/SV_GroupIndex.ll` - `CodeGen/SPIRV/hlsl-intrinsics/smoothstep.ll` For now, the fix is to XFAIL these tests to unblock the pipeline. Issue llvm#136344 tracks the long-term solution for this.
Resolves llvm#99114. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` - Implement `faceforward` SPIR-V target builtin in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add a SPIR-V fast path in `hlsl_intrinsic_helpers.h` - Add sema checks for `faceforward` to `CheckSPIRVBuiltinFunctionCall` in `clang/lib/Sema/SemaSPIRV.cpp` - Add codegen for SPIR-V `faceforward` builtin to `EmitSPIRVBuiltinExpr` in `SPIR.cpp` - Add HLSL codegen tests to `clang/test/CodeGenHLSL/builtins/faceforward.hlsl` - Add SPIRV builtin codegen tests to `clang/test/CodeGenSPIRV/Builtins/faceforward.c` - Add sema tests to `clang/test/SemaHLSL/BuiltIns/faceforward-errors.hlsl` - Add spirv sema tests to `clang/test/SemaSPIRV/BuiltIns/faceforward-errors.c` - Create the `int_spv_faceforward` intrinsic in `IntrinsicsSPIRV.td` - In `SPIRVInstructionSelector.cpp` create the `faceforward` lowering and map it to `int_spv_faceforward` in `SPIRVInstructionSelector::selectIntrinsic` - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/faceforward.ll` Incomplete tasks: - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/opencl/faceforward.ll` - Not applicable because the OpenCL SPIR-V extended instruction set does not include a `faceforward` function Follow-up tasks: - Implement pattern matching for `faceforward` in `SPIRVCombine.td` and `SPIRVPreLegalizerCombiner.cpp` - In `faceforward.ll`, change `--target-env spv1.4` to `vulkan1.3` and update the test accordingly once [llvm#136344](llvm#136344) has been resolved
An update to the spirv validator is now correctly rejecting vulkan shaders with the linkage capability. We have a couple tests that need updating to remove the capability. Fixes llvm#136344
…sts (llvm#136343) When SPIRV-Tools is enabled, tests that specify the target environment `vulkan1.3` in the validation step fail. This is because SPIRV-Tools seems to have [grown some capability checks for vulkan 1.3](KhronosGroup/SPIRV-Tools@7e41c71). The failing tests are: - `CodeGen/SPIRV/hlsl-intrinsics/SV_GroupIndex.ll` - `CodeGen/SPIRV/hlsl-intrinsics/smoothstep.ll` For now, the fix is to XFAIL these tests to unblock the pipeline. Issue llvm#136344 tracks the long-term solution for this.
Resolves llvm#99114. Tasks completed: - Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` - Implement `faceforward` SPIR-V target builtin in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add a SPIR-V fast path in `hlsl_intrinsic_helpers.h` - Add sema checks for `faceforward` to `CheckSPIRVBuiltinFunctionCall` in `clang/lib/Sema/SemaSPIRV.cpp` - Add codegen for SPIR-V `faceforward` builtin to `EmitSPIRVBuiltinExpr` in `SPIR.cpp` - Add HLSL codegen tests to `clang/test/CodeGenHLSL/builtins/faceforward.hlsl` - Add SPIRV builtin codegen tests to `clang/test/CodeGenSPIRV/Builtins/faceforward.c` - Add sema tests to `clang/test/SemaHLSL/BuiltIns/faceforward-errors.hlsl` - Add spirv sema tests to `clang/test/SemaSPIRV/BuiltIns/faceforward-errors.c` - Create the `int_spv_faceforward` intrinsic in `IntrinsicsSPIRV.td` - In `SPIRVInstructionSelector.cpp` create the `faceforward` lowering and map it to `int_spv_faceforward` in `SPIRVInstructionSelector::selectIntrinsic` - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/faceforward.ll` Incomplete tasks: - Create SPIR-V backend test case in `llvm/test/CodeGen/SPIRV/opencl/faceforward.ll` - Not applicable because the OpenCL SPIR-V extended instruction set does not include a `faceforward` function Follow-up tasks: - Implement pattern matching for `faceforward` in `SPIRVCombine.td` and `SPIRVPreLegalizerCombiner.cpp` - In `faceforward.ll`, change `--target-env spv1.4` to `vulkan1.3` and update the test accordingly once [llvm#136344](llvm#136344) has been resolved
An update to the spirv validator is now correctly rejecting vulkan shaders with the linkage capability. We have a couple tests that need updating to remove the capability. Fixes llvm#136344
An update to the spirv validator is now correctly rejecting vulkan shaders with the linkage capability. We have a couple tests that need updating to remove the capability. Fixes llvm/llvm-project#136344
An update to the spirv validator is now correctly rejecting vulkan shaders with the linkage capability. We have a couple tests that need updating to remove the capability. Fixes llvm#136344
Problem
When SPIRV-Tools is enabled, tests that specify the target environment
vulkan1.3
in the validation step fail. The tests are:CodeGen/SPIRV/hlsl-intrinsics/SV_GroupIndex.ll
(link)CodeGen/SPIRV/hlsl-intrinsics/smoothstep.ll
(link)Temporary fix
This PR was a stop gap to get the pipeline green again:
#136343
Long term fix
The current suggestion from @s-perron is to change the tests to not have external functions or variables, e.g. making the functions shader entry points. More discussion is likely needed.
The text was updated successfully, but these errors were encountered: