diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2018-09-04 13:58:01 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-09-07 10:16:55 -0700 |
commit | 6f43390dd259250bc75c08fee87ed911b875cf64 (patch) | |
tree | a324f3a7ae3725907cb3b24af2dc073b1ecbf971 | |
parent | 67cfeb16865eed1a0578fb7dc7a422177f16a7fd (diff) |
anv/pipeline: Only consider double elements which actually exist
The brw_vs_prog_data::double_inputs_read field comes directly from
shader_info::double_inputs which may contain inputs which are not
actually read. Instead of using it directly, AND it with inputs_read
which is only things which are read. Otherwise, we may end up
subtracting too many elements when computing elem_count.
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103241
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 7b26741806c521279a1b83f2eae40a277d806626)
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index e46d5d164fb..dd38e7b8f74 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -91,7 +91,8 @@ emit_vertex_input(struct anv_pipeline *pipeline, /* Pull inputs_read out of the VS prog data */ const uint64_t inputs_read = vs_prog_data->inputs_read; - const uint64_t double_inputs_read = vs_prog_data->double_inputs_read; + const uint64_t double_inputs_read = + vs_prog_data->double_inputs_read & inputs_read; assert((inputs_read & ((1 << VERT_ATTRIB_GENERIC0) - 1)) == 0); const uint32_t elements = inputs_read >> VERT_ATTRIB_GENERIC0; const uint32_t elements_double = double_inputs_read >> VERT_ATTRIB_GENERIC0; |