[Mesa-dev] [PATCH 1/5] i965: Convert 3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP to OUT_BATCH style.
Eric Anholt
eric at anholt.net
Thu Jul 7 08:42:14 PDT 2011
On Thu, 7 Jul 2011 00:49:13 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/drivers/dri/i965/brw_misc_state.c | 15 +++++----------
> src/mesa/drivers/dri/i965/brw_structs.h | 9 ---------
> 2 files changed, 5 insertions(+), 19 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
> index 033c77c..5ecbe64 100644
> --- a/src/mesa/drivers/dri/i965/brw_misc_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
> @@ -621,16 +621,11 @@ static void upload_invarient_state( struct brw_context *brw )
> }
>
> if (intel->gen < 6) {
> - struct brw_global_depth_offset_clamp gdo;
> - memset(&gdo, 0, sizeof(gdo));
> -
> - /* Disable depth offset clamping.
> - */
> - gdo.header.opcode = _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP;
> - gdo.header.length = sizeof(gdo)/4 - 2;
> - gdo.depth_offset_clamp = 0.0;
> -
> - BRW_BATCH_STRUCT(brw, &gdo);
> + /* Disable depth offset clamping. */
> + BEGIN_BATCH(2);
> + OUT_BATCH(_3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP << 16 | (2 - 2));
> + OUT_BATCH(0.0);
> + ADVANCE_BATCH();
If it's a float value, OUT_BATCH_F().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110707/602c4612/attachment.pgp>
More information about the mesa-dev
mailing list