Skip to content

CL: Misc fixes part 3

Jesse Natalie requested to merge jenatali/mesa:cl-misc-fixes-3 into msclc-d3d12
  • OpenCL isnormal() function is a core (kernel-specific) opcode that wasn't handled. Add an ALU op for it and handle it in the DXIL backend.
  • Relax NIR validation to allow vector indexing for function_temp. CL generates pointer deref chains which end in vector indexing.
  • Clang can generate under-aligned loads/stores. It annotates them in LLVM with explicit alignment, which propagates to SPIRV but was dropped by NIR. We need to split under-aligned loads/stores so that we can operate within 32bit accesses, so we need that info to propagate.
  • The DXIL validator doesn't like unused variables. Don't emit our "shared" variable unless we're going to use it.
  • nir_lower_bit_size doesn't handle phis, so we end up with 8bit phis. Add a pass to remove them. This assumes that the nir_lower_bit_size means we'll be able to find an appropriate cast type for those phis. Seems to be an okay assumption.

Merge request reports

Loading