mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
intel/compiler: Fix pointer arithmetic when reading shader assembly
start_offset is a byte offset. Fixes:04a9951580Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6557> (cherry picked from commit87fa645b94)
This commit is contained in:
parent
3f55b4c50a
commit
2f6cd0afa2
2 changed files with 2 additions and 2 deletions
|
|
@ -3748,7 +3748,7 @@
|
||||||
"description": "intel/compiler: Fix pointer arithmetic when reading shader assembly",
|
"description": "intel/compiler: Fix pointer arithmetic when reading shader assembly",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"master_sha": null,
|
"master_sha": null,
|
||||||
"because_sha": "04a995158084acbd1917b4c7e0f8d381e1c9222d"
|
"because_sha": "04a995158084acbd1917b4c7e0f8d381e1c9222d"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -394,7 +394,7 @@ bool brw_try_override_assembly(struct brw_codegen *p, int start_offset,
|
||||||
p->store = (brw_inst *)reralloc_size(p->mem_ctx, p->store, p->next_insn_offset);
|
p->store = (brw_inst *)reralloc_size(p->mem_ctx, p->store, p->next_insn_offset);
|
||||||
assert(p->store);
|
assert(p->store);
|
||||||
|
|
||||||
ssize_t ret = read(fd, p->store + start_offset, sb.st_size);
|
ssize_t ret = read(fd, (char *)p->store + start_offset, sb.st_size);
|
||||||
close(fd);
|
close(fd);
|
||||||
if (ret != sb.st_size) {
|
if (ret != sb.st_size) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue