radeon/llvm: Emit 2 bytes for vertex fetch offsets
authorTom Stellard <thomas.stellard@amd.com>
Fri, 1 Jun 2012 20:08:41 +0000 (16:08 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 1 Jun 2012 20:52:26 +0000 (16:52 -0400)
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/radeon/R600CodeEmitter.cpp

index 5f3c76eafbb34cd965322c6cd2c04aed5bf6b04a..8a80dba38a42c504f3fa60de5fe4ce62a6fe43cb 100644 (file)
@@ -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)) {
index fdc79a674991e6c61c8fe065b550b086ea27066a..8715f1133e87a113885ee4ace7007115cf325528 100644 (file)
@@ -255,7 +255,7 @@ bool R600CodeEmitter::runOnMachineFunction(MachineFunction &MF) {
                 emitByte(0);
 
                 // offset
-                emitByte(0);
+                emitTwoBytes(0);
 
                 // endian
                 emitByte(0);