Module: Mesa
Branch: master
Commit: 01ad2067bba17451c663983877ec85145de20f02
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=01ad2067bba17451c663983877ec85145de20f02

Author: Jason Ekstrand <[email protected]>
Date:   Tue Jun  5 14:33:12 2018 -0700

intel/eu: Use a struct copy instead of a memcpy

The memcpy had the wrong size and this was causing crashes on 32-bit
builds of the driver.

Fixes: 6a9525bf6729a8 "intel/eu: Switch to a logical state stack"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106830
Reviewed-by: Kenneth Graunke <[email protected]>

---

 src/intel/compiler/brw_eu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_eu.c b/src/intel/compiler/brw_eu.c
index d0e4ea2070..6ef0a6a577 100644
--- a/src/intel/compiler/brw_eu.c
+++ b/src/intel/compiler/brw_eu.c
@@ -289,7 +289,7 @@ void brw_set_default_acc_write_control(struct brw_codegen 
*p, unsigned value)
 void brw_push_insn_state( struct brw_codegen *p )
 {
    assert(p->current != &p->stack[BRW_EU_MAX_INSN_STACK-1]);
-   memcpy(p->current + 1, p->current, sizeof(brw_inst));
+   *(p->current + 1) = *p->current;
    p->current++;
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to