Jose Fonseca <jfons...@vmware.com> writes: > ----- Original Message ----- >> Without this, llvmpipe ends up giving a zero size to all uncompressed >> textures >> on non-x86 systems, since align() cannot handle a 0 alignment. Making the >> default 1 seemed preferable to adding checks for 0. >> >> Signed-off-by: Richard Sandiford <rsand...@linux.vnet.ibm.com> >> --- >> src/gallium/auxiliary/util/u_cpu_detect.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c >> b/src/gallium/auxiliary/util/u_cpu_detect.c >> index 7e6df9d..52d21a5 100644 >> --- a/src/gallium/auxiliary/util/u_cpu_detect.c >> +++ b/src/gallium/auxiliary/util/u_cpu_detect.c >> @@ -250,6 +250,11 @@ util_cpu_detect(void) >> util_cpu_caps.nr_cpus = 1; >> #endif >> >> + /* Make the fallback cacheline size 1 rather than 0 so that it can be >> + * safely passed to align(). >> + */ >> + util_cpu_caps.cacheline = 1; > > `sizeof(void *)` is a better default. Otherwise sounds good.
Ah, yeah, that does sound better :-) I'll post a revised patch. Thanks, Richard _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev