================
@@ -3099,6 +3101,66 @@ bool SPIRVInstructionSelector::wrapIntoSpecConstantOp(
return Result;
}
+bool SPIRVInstructionSelector::selectDpdCoarse(Register ResVReg,
+ const SPIRVType *ResType,
+ MachineInstr &I,
+ const unsigned DPdOpCode) const
{
+ if (!STI.isShader()) {
+ std::string DiagMsg;
+ raw_string_ostream OS(DiagMsg);
+ I.print(OS, true, false, false, false);
+ DiagMsg += " is only supported in shaders.\n";
+ report_fatal_error(DiagMsg.c_str(), false);
+ }
----------------
farzonl wrote:
Should this be a helper? I feel like shader checks are going to be needed for
more than this one set of opcodes.
Second this actually a bit more restrictive than just shader. the [spec says
](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpDPdxCoarse)
> This instruction is only valid in the Fragment [Execution
> Model](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Execution_Model).
https://github.com/llvm/llvm-project/pull/164831
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits