diff options
author | Eric Anholt <anholt@FreeBSD.org> | 2006-07-19 16:36:52 -0400 |
---|---|---|
committer | Eric Anholt <anholt@FreeBSD.org> | 2006-07-19 16:36:52 -0400 |
commit | da5efb09d55291ce5bcabff7db8d1490bb5e838b (patch) | |
tree | 6752339d81e42117c96627323dd3393d7677063e /src | |
parent | 36aa43bf73ee1268f0a250788eb637a4123f08eb (diff) |
Fix the alignment padding fix (didn't bump BEGIN_LP_RING count).
Diffstat (limited to 'src')
-rw-r--r-- | src/i915_3d.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/i915_3d.h b/src/i915_3d.h index 5a458829..c1162000 100644 --- a/src/i915_3d.h +++ b/src/i915_3d.h @@ -436,13 +436,13 @@ do { \ #define FS_END() \ do { \ - int _i; \ - BEGIN_LP_RING(_cur_shader_commands * 3 + 1); \ + int _i, _pad = (_cur_shader_commands & 0x1) ? 0 : 1; \ + BEGIN_LP_RING(_cur_shader_commands * 3 + 1 + _pad); \ OUT_RING(_3DSTATE_PIXEL_SHADER_PROGRAM | \ (_cur_shader_commands * 3 - 1)); \ for (_i = 0; _i < _cur_shader_commands * 3; _i++) \ OUT_RING(_shader_buf[_i]); \ - if ((_cur_shader_commands & 0x1) == 0) \ + if (_pad != 0) \ OUT_RING(MI_NOOP); \ ADVANCE_LP_RING(); \ } while (0); |