agx: Allow some 8-bit sources
8-bit sources are useful for int8->float32 conversions, which we can do in a single hardware instruction. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>
This commit is contained in:

committed by
Marge Bot

parent
ba209fe493
commit
8127737c1e
@@ -852,7 +852,7 @@ agx_alu_src_index(agx_builder *b, nir_alu_src src)
|
|||||||
unsigned comps = nir_src_num_components(src.src);
|
unsigned comps = nir_src_num_components(src.src);
|
||||||
unsigned channel = src.swizzle[0];
|
unsigned channel = src.swizzle[0];
|
||||||
|
|
||||||
assert(bitsize == 1 || bitsize == 16 || bitsize == 32 || bitsize == 64);
|
assert(bitsize == 1 || bitsize == 8 || bitsize == 16 || bitsize == 32 || bitsize == 64);
|
||||||
assert(!(src.negate || src.abs));
|
assert(!(src.negate || src.abs));
|
||||||
assert(channel < comps);
|
assert(channel < comps);
|
||||||
|
|
||||||
|
@@ -442,6 +442,7 @@ agx_size_for_bits(unsigned bits)
|
|||||||
{
|
{
|
||||||
switch (bits) {
|
switch (bits) {
|
||||||
case 1:
|
case 1:
|
||||||
|
case 8:
|
||||||
case 16: return AGX_SIZE_16;
|
case 16: return AGX_SIZE_16;
|
||||||
case 32: return AGX_SIZE_32;
|
case 32: return AGX_SIZE_32;
|
||||||
case 64: return AGX_SIZE_64;
|
case 64: return AGX_SIZE_64;
|
||||||
|
Reference in New Issue
Block a user