diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-08-01 15:11:37 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-08-06 14:41:37 -0700 |
commit | 8c27f13cd9aca3f4eb3089863c6e8dd708e85bc6 (patch) | |
tree | 281f5ebf366d77a80e25aaaca30a7a43c374ea31 /src/mesa/drivers/dri/i965/gen6_queryobj.c | |
parent | 2daf974cfe701f5955b96b51478ca545c4a5082c (diff) | |
download | external_mesa3d-8c27f13cd9aca3f4eb3089863c6e8dd708e85bc6.zip external_mesa3d-8c27f13cd9aca3f4eb3089863c6e8dd708e85bc6.tar.gz external_mesa3d-8c27f13cd9aca3f4eb3089863c6e8dd708e85bc6.tar.bz2 |
i965: Tidy preprocessor macros for SO_NUM_PRIMS_WRITTEN registers.
Gen7+ supports four transform feedback streams. Using a function-like
macro makes it easy to access them by stream number or loop over them.
"GEN7_" prefixes are more common than "_IVB" suffixes, so we use that.
Gen6 only supports a single stream, so the single #define should be
fine. However, SO_NUM_PRIMS_WRITTEN was confusingly generic, as it
doesn't exist on Gen7+. Add a "GEN6_" prefix for clarity.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_queryobj.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_queryobj.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c index 6f4f6f5..498b187 100644 --- a/src/mesa/drivers/dri/i965/gen6_queryobj.c +++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c @@ -139,9 +139,9 @@ write_xfb_primitives_written(struct brw_context *brw, drm_intel_bo *query_bo, int idx) { if (brw->gen >= 7) { - write_reg(brw, query_bo, SO_NUM_PRIMS_WRITTEN0_IVB, idx); + write_reg(brw, query_bo, GEN7_SO_NUM_PRIMS_WRITTEN(0), idx); } else { - write_reg(brw, query_bo, SO_NUM_PRIMS_WRITTEN, idx); + write_reg(brw, query_bo, GEN6_SO_NUM_PRIMS_WRITTEN, idx); } } |