summaryrefslogtreecommitdiff
path: root/src/i915_3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/i915_3d.h')
-rw-r--r--src/i915_3d.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/i915_3d.h b/src/i915_3d.h
index ab4fbb57..043a6d56 100644
--- a/src/i915_3d.h
+++ b/src/i915_3d.h
@@ -423,8 +423,7 @@ do { \
#define FS_BEGIN() \
do { \
- _shader_offset = intel->batch_used; \
- intel->batch_used += 4; \
+ _shader_offset = intel->batch_used++; \
} while (0)
#define FS_OUT(_shaderop) \
@@ -436,7 +435,7 @@ do { \
#define FS_END() \
do { \
- *(uint32_t *)(intel->batch_ptr + _shader_offset) = \
- (_3DSTATE_PIXEL_SHADER_PROGRAM | \
- ((intel->batch_used - _shader_offset) / 4 - 2)); \
+ intel->batch_ptr[_shader_offset] = \
+ _3DSTATE_PIXEL_SHADER_PROGRAM | \
+ (intel->batch_used - _shader_offset - 2); \
} while (0);