All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francisco Jerez <currojerez-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
To: nouveau <nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] dri/nouveau: Clean up magic numbers in get_rt_format
Date: Fri, 19 Nov 2010 19:06:56 +0100	[thread overview]
Message-ID: <878w0ptcfz.fsf@riseup.net> (raw)
In-Reply-To: <1289946153-3024-1-git-send-email-noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org> ("Viktor Novotný"'s message of "Tue, 16 Nov 2010 23:22:33 +0100")


[-- Attachment #1.1.1: Type: text/plain, Size: 3141 bytes --]

Viktor Novotný <noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org> writes:

> From: Viktor Novotný <noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
>
> Signed-off-by: Viktor Novotný <noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
> ---
> Hi,
>
> since the switch to rnn headers was pushed(thank you, curro), here is a patch
> that I inteded to submit first, but somehow ended making the switch.
> It is just a small clean up.
>
> Regards
> 	Viktor
>
>  src/mesa/drivers/dri/nouveau/nv04_state_fb.c |    6 +++---
>  src/mesa/drivers/dri/nouveau/nv10_state_fb.c |   10 +++++-----
>  src/mesa/drivers/dri/nouveau/nv20_state_fb.c |   10 +++++-----
>  3 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
> index 730f91f..854571d 100644
> --- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
> +++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
> @@ -36,11 +36,11 @@ get_rt_format(gl_format format)
>  {
>  	switch (format) {
>  	case MESA_FORMAT_XRGB8888:
> -		return 0x05;
> +		return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8;
>  	case MESA_FORMAT_ARGB8888:
> -		return 0x08;
> +		return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8;
>  	case MESA_FORMAT_RGB565:
> -		return 0x03;
> +		return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5;
>  	default:
>  		assert(0);
>  	}
> diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
> index 056054e..0505547 100644
> --- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
> +++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
> @@ -37,15 +37,15 @@ get_rt_format(gl_format format)
>  {
>  	switch (format) {
>  	case MESA_FORMAT_XRGB8888:
> -		return 0x05;
> +		return NV10_3D_RT_FORMAT_COLOR_X8R8G8B8;
>  	case MESA_FORMAT_ARGB8888:
> -		return 0x08;
> +		return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8;
>  	case MESA_FORMAT_RGB565:
> -		return 0x03;
> +		return NV10_3D_RT_FORMAT_COLOR_R5G6B5;
>  	case MESA_FORMAT_Z16:
> -		return 0x10;
> +		return NV10_3D_RT_FORMAT_DEPTH_Z16;
>  	case MESA_FORMAT_Z24_S8:
> -		return 0x0;
> +		return NV10_3D_RT_FORMAT_DEPTH_Z24S8;
>  	default:
>  		assert(0);
>  	}
> diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
> index 8cabb55..cbde74e 100644
> --- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
> +++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
> @@ -37,15 +37,15 @@ get_rt_format(gl_format format)
>  {
>  	switch (format) {
>  	case MESA_FORMAT_XRGB8888:
> -		return 0x05;
> +		return NV20_3D_RT_FORMAT_COLOR_X8R8G8B8;
>  	case MESA_FORMAT_ARGB8888:
> -		return 0x08;
> +		return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8;
>  	case MESA_FORMAT_RGB565:
> -		return 0x03;
> +		return NV20_3D_RT_FORMAT_COLOR_R5G6B5;
>  	case MESA_FORMAT_Z16:
> -		return 0x10;
> +		return NV20_3D_RT_FORMAT_DEPTH_Z16;
>  	case MESA_FORMAT_Z24_S8:
> -		return 0x20;
> +		return NV20_3D_RT_FORMAT_DEPTH_Z24S8;
>  	default:
>  		assert(0);
>  	}

Thanks, pushed.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 229 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

      parent reply	other threads:[~2010-11-19 18:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16 22:22 [PATCH] dri/nouveau: Clean up magic numbers in get_rt_format Viktor Novotný
     [not found] ` <1289946153-3024-1-git-send-email-noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
2010-11-19 18:06   ` Francisco Jerez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878w0ptcfz.fsf@riseup.net \
    --to=currojerez-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.