mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
i965/fs: fix FS_OPCODE_CINTERP for unpacked double input varyings
Data starts at suboffet 3 in 32-bit units (12 bytes), so it is not
64-bit aligned and the current implementation fails to read the data
properly. Instead, when there is is a double input varying, read it as
vector of floats with twice the number of components.
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit cb30727648)
This commit is contained in:
parent
fc0a469e4c
commit
4daa331e25
1 changed files with 12 additions and 1 deletions
|
|
@ -1189,7 +1189,18 @@ fs_visitor::emit_general_interpolation(fs_reg *attr, const char *name,
|
|||
* handed us defined values in only the constant offset
|
||||
* field of the setup reg.
|
||||
*/
|
||||
for (unsigned int i = 0; i < type->vector_elements; i++) {
|
||||
unsigned vector_elements = type->vector_elements;
|
||||
|
||||
/* Data starts at suboffet 3 in 32-bit units (12 bytes), so it is not
|
||||
* 64-bit aligned and the current implementation fails to read the
|
||||
* data properly. Instead, when there is is a double input varying,
|
||||
* read it as vector of floats with twice the number of components.
|
||||
*/
|
||||
if (attr->type == BRW_REGISTER_TYPE_DF) {
|
||||
vector_elements *= 2;
|
||||
attr->type = BRW_REGISTER_TYPE_F;
|
||||
}
|
||||
for (unsigned int i = 0; i < vector_elements; i++) {
|
||||
struct brw_reg interp = interp_reg(*location, i);
|
||||
interp = suboffset(interp, 3);
|
||||
interp.type = attr->type;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue