summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-06-02 14:57:13 +1000
committerDave Airlie <[email protected]>2011-06-02 14:59:29 +1000
commit4423c79ddf6853d1d4594afda3e1262c1b9af4f5 (patch)
treec708d3df8dd6369ddd4fc3623050e3b7fd41f042 /src/gallium/drivers/r600/r600.h
parent42502b6f03230b828121f60143190c39bc5c8dda (diff)
r600g: work out range/block etc at state build time.
This moves the overhead of working out the range/block to state build time, it also allows the compiler to use constants for a lot of things instead of working them out each time. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600.h')
-rw-r--r--src/gallium/drivers/r600/r600.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h
index 2495aab7a02..df02787ef69 100644
--- a/src/gallium/drivers/r600/r600.h
+++ b/src/gallium/drivers/r600/r600.h
@@ -157,10 +157,11 @@ static INLINE unsigned r600_bo_offset(struct r600_bo *bo)
#define CTX_BLOCK_ID(offset) (((offset - RANGE_OFFSET_START) >> 2) & ((1 << HASH_SHIFT) - 1))
struct r600_pipe_reg {
- u32 offset;
- u32 mask;
u32 value;
- struct r600_bo *bo;
+ u32 mask;
+ struct r600_block *block;
+ struct r600_bo *bo;
+ u32 id;
};
struct r600_pipe_state {
@@ -313,9 +314,9 @@ struct radeon *radeon_decref(struct radeon *radeon);
void _r600_pipe_state_add_reg(struct r600_context *ctx,
struct r600_pipe_state *state,
u32 offset, u32 value, u32 mask,
+ u32 range_id, u32 block_id,
struct r600_bo *bo);
-#define r600_pipe_state_add_reg(state, offset, value, mask, bo) _r600_pipe_state_add_reg(&rctx->ctx, state, offset, value, mask, bo)
-
+#define r600_pipe_state_add_reg(state, offset, value, mask, bo) _r600_pipe_state_add_reg(&rctx->ctx, state, offset, value, mask, CTX_RANGE_ID(offset), CTX_BLOCK_ID(offset), bo)
#endif