summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-03-02 15:39:57 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-03-02 20:59:53 +0100
commit908013b7370f8dfe20a1ab41b353968a60a9055d (patch)
tree22178053edb6afcf2a17d58c9acc2922ee6438c4 /src/gallium/drivers/nv50
parent040ff18a2116c7acee51c57b7b0442ca18cdb0ad (diff)
nv50: apply relocations to shader code
On nv50, branches are absolute, so we need to adjust them according to the shader's position in the code buffer.
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_shader_state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
index 7d4b12bde1..f5685c1cd7 100644
--- a/src/gallium/drivers/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nv50/nv50_shader_state.c
@@ -149,6 +149,8 @@ nv50_program_validate(struct nv50_context *nv50, struct nv50_program *prog)
return FALSE;
prog->code_base = prog->res->start;
+ nv50_relocate_program(prog, prog->code_base, 0);
+
nv50_sifc_linear_u8(&nv50->base, nv50->screen->code,
(prog->type << 16) + prog->code_base,
NOUVEAU_BO_VRAM, prog->code_size, prog->code);