Skip to content

intel/compiler: Defeature 8-bit types (some NIR changes too)

Ian Romanick requested to merge idr/mesa:review/defeature-8-bit-types into main

This fixes the Crucible func.shader.shift.int8_t test on Gen8 and Gen9. See crucible!76 (merged).

No changes in fossil-db because there are no shaders in fossil-db that use shaderInt8. :(

In !8730 (closed) (and subsequently !9001 (merged)), I fixed the issue with shift counts by adding some instructions to mask the shift count with 255 when the shifted value was 8-bits. I had waffled about that being the right choice, and @jekstrand had a pretty easy job convincing me otherwise.

Instead, just defeature 8-bit types on all Intel plaforms. This was already done on Gen11+, so why buck the trend? Even on Gen8 and Gen9, there are a bunch of restrictions on 8-bit types, and we don't handle them particularly well. As a result, the code that is generated is... not good. With a handful of optimizations here and from !8872 (merged), I think we now generate better code for 8-bit types by converting them to 16 bits. 🤦 That seems to be the case in the few Vulkan CTS tests that I checked.

Edited by Ian Romanick

Merge request reports