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

Author: Tom Stellard <[email protected]>
Date:   Fri Jun  1 16:08:41 2012 -0400

radeon/llvm: Emit 2 bytes for vertex fetch offsets

---

 src/gallium/drivers/r600/r600_shader.c         |    2 ++
 src/gallium/drivers/radeon/R600CodeEmitter.cpp |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index 5f3c76e..8a80dba 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -458,7 +458,9 @@ static int r600_vtx_from_byte_stream(struct r600_shader_ctx 
*ctx,
        vtx.num_format_all = bytes[bytes_read++];
        vtx.format_comp_all = bytes[bytes_read++];
        vtx.srf_mode_all = bytes[bytes_read++];
+       /* offset is 2 bytes wide */
        vtx.offset = bytes[bytes_read++];
+       vtx.offset |= bytes[bytes_read++];
        vtx.endian = bytes[bytes_read++];
 
        if (r600_bytecode_add_vtx(ctx->bc, &vtx)) {
diff --git a/src/gallium/drivers/radeon/R600CodeEmitter.cpp 
b/src/gallium/drivers/radeon/R600CodeEmitter.cpp
index fdc79a6..8715f11 100644
--- a/src/gallium/drivers/radeon/R600CodeEmitter.cpp
+++ b/src/gallium/drivers/radeon/R600CodeEmitter.cpp
@@ -255,7 +255,7 @@ bool R600CodeEmitter::runOnMachineFunction(MachineFunction 
&MF) {
                 emitByte(0);
 
                 // offset
-                emitByte(0);
+                emitTwoBytes(0);
 
                 // endian
                 emitByte(0);

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

Reply via email to