r300: respect buffer offset in r300_set_constant_buffer
Fixes constants upload with nine.
Thanks to Marek Olšák for pointing this out.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7481
Cc: mesa-stable
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19277>
(cherry picked from commit 8a0c1dcbd6
)
This commit is contained in:

committed by
Dylan Baker

parent
80f296268e
commit
677721202e
@@ -1579,7 +1579,7 @@
|
||||
"description": "r300: respect buffer offset in r300_set_constant_buffer",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
@@ -2075,7 +2075,7 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
|
||||
struct r300_resource *rbuf = r300_resource(cb->buffer);
|
||||
|
||||
if (rbuf && rbuf->malloced_buffer)
|
||||
mapped = (uint32_t*)rbuf->malloced_buffer;
|
||||
mapped = (uint32_t*)(rbuf->malloced_buffer + cb->buffer_offset);
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user