Module: Mesa Branch: master Commit: 87fa645b9438ce7943ae09012f695a7a1bca3eeb URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=87fa645b9438ce7943ae09012f695a7a1bca3eeb
Author: Danylo Piliaiev <[email protected]> Date: Wed Sep 2 13:37:47 2020 +0300 intel/compiler: Fix pointer arithmetic when reading shader assembly start_offset is a byte offset. Fixes: 04a995158084acbd1917b4c7e0f8d381e1c9222d Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6557> --- src/intel/compiler/brw_eu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_eu.cpp b/src/intel/compiler/brw_eu.cpp index 0a886b27ae2..51ae8cdc221 100644 --- a/src/intel/compiler/brw_eu.cpp +++ b/src/intel/compiler/brw_eu.cpp @@ -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); 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); if (ret != sb.st_size) { return false; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
