Mesa (master): i965: fix varying output setup
Timothy Arceri
tarceri at kemper.freedesktop.org
Fri Jul 22 14:04:19 UTC 2016
Module: Mesa
Branch: master
Commit: a2b3c146d2017a626be66dcf43753d545e902c52
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2b3c146d2017a626be66dcf43753d545e902c52
Author: Timothy Arceri <timothy.arceri at collabora.com>
Date: Fri Jul 22 23:19:09 2016 +1000
i965: fix varying output setup
Since 7f53fead5c we treat every location as using all
four components so we only need special handling for
doubles when they cross multiple locations.
This fixes a crash in GL45-CTS.enhanced_layouts.varying_locations
where the outputs array would overflow when a dmat2 was stored at
the max varying location i.e 30.
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
---
src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 48cb4bd..5236d0e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -68,7 +68,7 @@ fs_visitor::nir_setup_single_output_varying(fs_reg *reg,
} else {
assert(type->is_scalar() || type->is_vector());
unsigned num_iter = 1;
- if (type->is_double())
+ if (type->is_dual_slot())
num_iter = 2;
for (unsigned count = 0; count < num_iter; count++) {
this->outputs[*location] = *reg;
More information about the mesa-commit
mailing list