diff options
author | Alok Hota <alok.hota@intel.com> | 2019-02-21 14:41:15 -0600 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2019-03-06 21:35:53 +0000 |
commit | 09542cd07074574efd85a9c9dc25748fde2274b3 (patch) | |
tree | 3d076e1aca599a69b5f71cbca6d69fa65ad5701a | |
parent | 483f947a58a72a9ac9e77ca1e2a276afe078733c (diff) | |
download | mesa-09542cd07074574efd85a9c9dc25748fde2274b3.tar.gz |
swr/rast: bypass size limit for non-sampled textures
This fixes a bug where SWR will fail to render in cases with large
buffer allocations, e.g. very large meshes whose vertex buffers exceed
2GB
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
(cherry picked from commit 6053499f2eafde606b13a9663016e9be8e4089eb)
-rw-r--r-- | src/gallium/drivers/swr/swr_screen.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp index de9008ddf6a..c29a90bad8c 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++ b/src/gallium/drivers/swr/swr_screen.cpp @@ -844,7 +844,9 @@ swr_texture_layout(struct swr_screen *screen, size_t total_size = (uint64_t)res->swr.depth * res->swr.qpitch * res->swr.pitch * res->swr.numSamples; - if (total_size > SWR_MAX_TEXTURE_SIZE) + + // Let non-sampled textures (e.g. buffer objects) bypass the size limit + if (swr_resource_is_texture(&res->base) && total_size > SWR_MAX_TEXTURE_SIZE) return false; if (allocate) { |