diff options
author | Alok Hota <alok.hota@intel.com> | 2019-02-21 14:41:15 -0600 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-02-25 13:26:36 -0800 |
commit | 06889aaa63e8fa1198209b9e70a918018615c7a0 (patch) | |
tree | 1def2d2afdd80ac73370a183bc1dbfd2e275c10e | |
parent | 1d4fbff786184f53b3b7fdb621d15a31c7376ccf (diff) |
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 f390f9219c2..bee011e4abf 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++ b/src/gallium/drivers/swr/swr_screen.cpp @@ -846,7 +846,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) { |