Mesa (master): i965/fs: Handle compact outputs.
Kenneth Graunke
kwg at kemper.freedesktop.org
Tue Nov 22 08:30:36 UTC 2016
Module: Mesa
Branch: master
Commit: b63f7671a3eafa4ab293a13f45f58837bd840a46
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b63f7671a3eafa4ab293a13f45f58837bd840a46
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Oct 4 01:59:33 2016 -0700
i965/fs: Handle compact outputs.
We need to calculate the number of vec4 slots correctly.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 4 +++-
1 file changed, 3 insertions(+), 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 e770502..82e22c2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -55,7 +55,9 @@ fs_visitor::nir_setup_outputs()
return;
nir_foreach_variable(var, &nir->outputs) {
- const unsigned vec4s = type_size_vec4(var->type);
+ const unsigned vec4s =
+ var->data.compact ? DIV_ROUND_UP(glsl_get_length(var->type), 4)
+ : type_size_vec4(var->type);
fs_reg reg = bld.vgrf(BRW_REGISTER_TYPE_F, 4 * vec4s);
for (unsigned i = 0; i < vec4s; i++) {
if (outputs[var->data.driver_location + i].file == BAD_FILE)
More information about the mesa-commit
mailing list