i965/fs: take into account doubles when emitting system values
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 24 May 2016 13:00:30 +0000 (15:00 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 25 May 2016 18:14:22 +0000 (20:14 +0200)
Fixes the following cts test:
GL42-CTS.vertex_attrib_64bit.limits_test

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index 012492c0e0d8afa40eed8b89b491cd00e5b84506..c220f1c9601de42b03fba23d401801c1ccb74a4f 100644 (file)
@@ -36,7 +36,8 @@ fs_reg *
 fs_visitor::emit_vs_system_value(int location)
 {
    fs_reg *reg = new(this->mem_ctx)
-      fs_reg(ATTR, 4 * _mesa_bitcount_64(nir->info.inputs_read),
+      fs_reg(ATTR, 4 * (_mesa_bitcount_64(nir->info.inputs_read) +
+                        _mesa_bitcount_64(nir->info.double_inputs_read)),
              BRW_REGISTER_TYPE_D);
    brw_vs_prog_data *vs_prog_data = (brw_vs_prog_data *) prog_data;