aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs.cpp
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <[email protected]>2016-05-20 16:35:52 +0200
committerJuan A. Suarez Romero <[email protected]>2016-05-24 10:06:29 +0200
commite79aa19d88b4d6dbd26c23287292e6bf9f41ce33 (patch)
treec78d45530c059c55cd9e7cd259965aaeb76ef599 /src/mesa/drivers/dri/i965/brw_fs.cpp
parentccd58015a2a9b067a6ece7a83bf5aa42dbb9acba (diff)
i965: fix double-precision vertex inputs measurement
For double-precision vertex inputs we need to measure them in dvec4 terms, and for single-precision vertex inputs we need to measure them in vec4 terms. For the later case, we use type_size_vec4() function. For the former case, we had a wrong implementation based on type_size_vec4(). This commit introduces a proper type_size_dvec4() function, that we use to measure vertex inputs. Measuring double-precision vertex inputs as dvec4 is required because ARB_vertex_attrib_64bit states that these uses the same number of locations than the single-precision version. That is, two consecutives dvec4 would be located in location "x" and location "x+1", not "x+2". Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 847a6d36566..bb2caa54e17 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -552,7 +552,7 @@ extern "C" int
type_size_vs_input(const struct glsl_type *type)
{
if (type->is_double()) {
- return type_size_vec4(type) / 2;
+ return type_size_dvec4(type);
} else {
return type_size_vec4(type);
}