summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vs.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-10-01 15:28:55 -0700
committerEric Anholt <eric@anholt.net>2012-10-10 13:22:55 -0700
commit46e529672bb124b78eb454cbf55c72074ef6d35c (patch)
tree6d557fa19f52b9cf63130b6ee961c22e03a83674 /src/mesa/drivers/dri/i965/brw_vs.h
parent587d5db11d8047663201c5fb06a6b2feb5d55891 (diff)
downloadexternal_mesa3d-46e529672bb124b78eb454cbf55c72074ef6d35c.zip
external_mesa3d-46e529672bb124b78eb454cbf55c72074ef6d35c.tar.gz
external_mesa3d-46e529672bb124b78eb454cbf55c72074ef6d35c.tar.bz2
i965/vs: Fix unit mismatch in scratch base_offset parameter.
move_grf_array_access_to_scratch() calculates scratch buffer offsets in bytes. However, emit_scratch_read/write() expects the base_offset parameter to be measured in OWords. As a result, a shader using a scratch read/write offset greater than zero (in practice, a shader containing more than one variable in scratch) would use too large an offset, frequently exceeding the available scratch space. This patch corrects the mismatch by removing spurious conversion from OWords to bytes in move_grf_array_access_to_scratch(). This is based on a patch by Paul Berry. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h
index e04247f..adeff7f 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -93,7 +93,7 @@ struct brw_vs_compile {
GLuint nr_inputs;
GLuint first_output;
- GLuint last_scratch;
+ GLuint last_scratch; /**< measured in 32-byte (register size) units */
GLuint first_tmp;
GLuint last_tmp;