Skip to content
Snippets Groups Projects
Commit eb06d2b6 authored by Alejandro Piñeiro's avatar Alejandro Piñeiro Committed by Emil Velikov
Browse files

i965/vec4: fill src_reg type using the constructor type parameter


The src_reg constructor that received the glsl_type was using it
only to build the swizzle, but not to fill this->type as dst_reg
is doing.

This caused some type mismatch between movs and alu operations
on the NIR path, so copy propagation optimization was not applied
to remove unneeded movs if negate modifier was involved. This was
first detected on minus (negate+add) operations.

Shader DB results (taking into account only vec4):

total instructions in shared programs: 20019 -> 19934 (-0.42%)
instructions in affected programs:     2918 -> 2833 (-2.91%)
helped:                                79
HURT:                                  0
GAINED:                                0
LOST:                                  0

Reviewed-by: default avatarMatt Turner <mattst88@gmail.com>
(cherry picked from commit 4de86e13)
Nominated-by: default avatarChristoph Brill <egore911@egore911.de>
parent 0fe894db
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment