mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
i965/fs: Handle compact outputs.
We need to calculate the number of vec4 slots correctly. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
536af43fe3
commit
b63f7671a3
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue