diff options
author | Kenneth Graunke <[email protected]> | 2014-07-26 20:32:41 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-08-02 05:16:41 -0700 |
commit | 7da612e8d02d41eeb04935a41b20c66da103cc16 (patch) | |
tree | ff414567c2b7a3c8ffa91afe93a90cd07b669b9f | |
parent | 3d1a4d1f5b26400878fa99c723759a2c54721de2 (diff) |
i965: Drop sizeof(struct brw_sampler_state) from estimated prim size.
This is the last user of the structure.
v2: Use a local variable with a sensible name so people know what 16 is.
(Suggested by Topi Pohjolainen).
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index ac21656012a..4dae7d35b1c 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -442,11 +442,11 @@ static bool brw_try_draw_prims( struct gl_context *ctx, for (i = 0; i < nr_prims; i++) { int estimated_max_prim_size; + const int sampler_state_size = 16; estimated_max_prim_size = 512; /* batchbuffer commands */ - estimated_max_prim_size += (BRW_MAX_TEX_UNIT * - (sizeof(struct brw_sampler_state) + - sizeof(struct gen5_sampler_default_color))); + estimated_max_prim_size += BRW_MAX_TEX_UNIT * + (sampler_state_size + sizeof(struct gen5_sampler_default_color)); estimated_max_prim_size += 1024; /* gen6 VS push constants */ estimated_max_prim_size += 1024; /* gen6 WM push constants */ estimated_max_prim_size += 512; /* misc. pad */ |