mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
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 6053499f2e)
This commit is contained in:
parent
1d4fbff786
commit
06889aaa63
1 changed files with 3 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue