intel/compiler: Document and assert some aspects of 8-bit integer lowering
In the vec4 compiler, 8-bit types should never exist. In the scalar compiler, 8-bit types should only ever be able to exist on Gfx ver 8 and 9. Some instructions are handled in non-obvious ways. Hopefully this will save the next person some time. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025>
This commit is contained in:
@@ -1145,6 +1145,14 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
|
||||
op[i].swizzle = brw_swizzle_for_nir_swizzle(instr->src[i].swizzle);
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
/* On Gen7 and earlier, no functionality is exposed that should allow 8-bit
|
||||
* integer types to ever exist.
|
||||
*/
|
||||
for (unsigned i = 0; i < nir_op_infos[instr->op].num_inputs; i++)
|
||||
assert(type_sz(op[i].type) > 1);
|
||||
#endif
|
||||
|
||||
switch (instr->op) {
|
||||
case nir_op_mov:
|
||||
try_immediate_source(instr, &op[0], true);
|
||||
|
Reference in New Issue
Block a user