tc: don't use CPU storage for glBufferData
This fixes a performance regression with yquake2 cause by the enablement of cpu_storage by default for radeonsi ina5a8e19741. Fixes:a5a8e19741("radeonsi: enable tc cpu_storage by default") Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18774>
This commit is contained in:
committed by
Marge Bot
parent
8af8dc97bc
commit
e06c332bf7
@@ -2731,6 +2731,12 @@ tc_buffer_subdata(struct pipe_context *_pipe,
|
||||
|
||||
u_box_1d(offset, size, &box);
|
||||
|
||||
/* CPU storage is only useful for partial updates. It can add overhead
|
||||
* on glBufferData calls so avoid using it.
|
||||
*/
|
||||
if (!tres->cpu_storage && offset == 0 && size == resource->width0)
|
||||
usage |= TC_TRANSFER_MAP_UPLOAD_CPU_STORAGE;
|
||||
|
||||
map = tc_buffer_map(_pipe, resource, 0, usage, &box, &transfer);
|
||||
if (map) {
|
||||
memcpy(map, data, size);
|
||||
|
||||
Reference in New Issue
Block a user