mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
mesa/st: discard whole resource when mapping drawpixels texture
The texture resource has just been allocated for the whole purpose of holding the drawpixels data. Make the drivers life a bit easier by telling it that we aren't interested in any previous content when mapping the resource. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23546>
This commit is contained in:
parent
1a975bc278
commit
12b816ce79
1 changed files with 2 additions and 2 deletions
|
|
@ -656,8 +656,8 @@ make_texture(struct st_context *st,
|
|||
|
||||
/* map texture transfer */
|
||||
dest = pipe_texture_map(pipe, pt, 0, 0,
|
||||
PIPE_MAP_WRITE, 0, 0,
|
||||
width, height, &transfer);
|
||||
PIPE_MAP_WRITE | PIPE_MAP_DISCARD_WHOLE_RESOURCE,
|
||||
0, 0, width, height, &transfer);
|
||||
if (!dest) {
|
||||
pipe_resource_reference(&pt, NULL);
|
||||
_mesa_unmap_pbo_source(ctx, unpack);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue