projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b55498
)
radeonsi: prevent a negative buffer offset in si_upload_descriptors
author
Marek Olšák
<marek.olsak@amd.com>
Thu, 22 Feb 2018 19:21:42 +0000
(20:21 +0100)
committer
Marek Olšák
<marek.olsak@amd.com>
Wed, 7 Mar 2018 18:55:42 +0000
(13:55 -0500)
src/gallium/drivers/radeonsi/si_descriptors.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/radeonsi/si_descriptors.c
b/src/gallium/drivers/radeonsi/si_descriptors.c
index b6e767c2546ee31995ffa60dfbe2ba306808bbc3..b71815fac5c6bcea97c59dbbdb14523215a7d37c 100644
(file)
--- a/
src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/
src/gallium/drivers/radeonsi/si_descriptors.c
@@
-167,11
+167,10
@@
static bool si_upload_descriptors(struct si_context *sctx,
}
uint32_t *ptr;
-
int
buffer_offset;
- u_upload_alloc(sctx->b.b.const_uploader,
0
, upload_size,
+
unsigned
buffer_offset;
+ u_upload_alloc(sctx->b.b.const_uploader,
first_slot_offset
, upload_size,
si_optimal_tcc_alignment(sctx, upload_size),
- (unsigned*)&buffer_offset,
- (struct pipe_resource**)&desc->buffer,
+ &buffer_offset, (struct pipe_resource**)&desc->buffer,
(void**)&ptr);
if (!desc->buffer) {
desc->gpu_address = 0;