diff options
author | Michel Dänzer <[email protected]> | 2009-02-14 20:40:48 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-02-14 20:40:48 +1000 |
commit | 5f3ab230ea3e971737b733b0c0358c0a85061f5c (patch) | |
tree | 4e918fccd56ac1959e7ad893c7464f6cad0b37ec /src/mesa/drivers/dri | |
parent | b1b7bc66a414d200102a90ed0580c3fd80a45838 (diff) |
r300: Fix R300_CMD_SCRATCH on big endian.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_cs_drm.h | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_cs_legacy.c | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_drm.h b/src/mesa/drivers/dri/radeon/radeon_cs_drm.h index 8f0b449e41f..984725a6c9d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_cs_drm.h +++ b/src/mesa/drivers/dri/radeon/radeon_cs_drm.h @@ -33,6 +33,7 @@ #define RADEON_CS_H #include <stdint.h> +#include <string.h> #include "drm.h" #include "radeon_drm.h" @@ -194,4 +195,13 @@ static inline void radeon_cs_write_dword(struct radeon_cs *cs, uint32_t dword) } } +static inline void radeon_cs_write_qword(struct radeon_cs *cs, uint64_t qword) +{ + + memcpy(cs->packets + cs->cdw, &qword, sizeof(qword)); + cs->cdw+=2; + if (cs->section) { + cs->section_cdw+=2; + } +} #endif diff --git a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c index 0f73dec1e51..aa95d86cd48 100644 --- a/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_cs_legacy.c @@ -288,8 +288,7 @@ static int cs_emit(struct radeon_cs *cs) age.scratch.n_bufs = 1; age.scratch.flags = 0; radeon_cs_write_dword(cs, age.u); - radeon_cs_write_dword(cs, ull & 0xffffffff); - radeon_cs_write_dword(cs, ull >> 32); + radeon_cs_write_qword(cs, ull); radeon_cs_write_dword(cs, 0); } |