mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 09:10:12 +01:00
i965/vec4: don't propagate single-precision uniforms into 4-wide instructions
Otherwise we end up producing code that violates the register region restriction that says that when execsize == width and hstride != 0 the vstride can't be 0. Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
6637312847
commit
93eae0d2a4
1 changed files with 11 additions and 0 deletions
|
|
@ -331,6 +331,17 @@ try_copy_propagate(const struct gen_device_info *devinfo,
|
|||
if (devinfo->gen < 8 && inst->size_written > REG_SIZE && is_uniform(value))
|
||||
return false;
|
||||
|
||||
/* There is a regioning restriction such that if execsize == width
|
||||
* and hstride != 0 then the vstride can't be 0. When we split instrutions
|
||||
* that take a single-precision source (like F->DF conversions) we end up
|
||||
* with a 4-wide source on an instruction with an execution size of 4.
|
||||
* If we then copy-propagate the source from a uniform we also end up with a
|
||||
* vstride of 0 and we violate the restriction.
|
||||
*/
|
||||
if (inst->exec_size == 4 && value.file == UNIFORM &&
|
||||
type_sz(value.type) == 4)
|
||||
return false;
|
||||
|
||||
/* If the type of the copy value is different from the type of the
|
||||
* instruction then the swizzles and writemasks involved don't have the same
|
||||
* meaning and simply replacing the source would produce different semantics.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue