[Mesa-dev] [PATCH 11/12] svga: Add somewhat sensible fallback and silence warning

Brian Paul brianp at vmware.com
Mon Jan 9 15:27:49 PST 2012


On 01/09/2012 03:53 PM, Jakob Bornecrantz wrote:
> Signed-off-by: Jakob Bornecrantz<jakob at vmware.com>
> ---
>   src/gallium/drivers/svga/svga_tgsi_decl_sm30.c |    5 ++---
>   1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
> index 0c5cb90..a4e80b5 100644
> --- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
> +++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
> @@ -318,8 +318,6 @@ ps30_output(struct svga_shader_emitter *emit,
>               struct tgsi_declaration_semantic semantic,
>               unsigned idx)
>   {
> -   SVGA3dShaderDestToken reg;
> -
>      switch (semantic.Name) {
>      case TGSI_SEMANTIC_COLOR:
>         if (emit->unit == PIPE_SHADER_FRAGMENT&&
> @@ -345,7 +343,8 @@ ps30_output(struct svga_shader_emitter *emit,
>         break;
>      default:
>         assert(0);
> -      reg = dst_register( SVGA3DREG_COLOROUT, 0 );
> +      /* A wild stab in the dark. */
> +      emit->output_map[idx] = dst_register( SVGA3DREG_COLOROUT, 0 );
>         break;
>      }
>

That looks fine.  If we find a PS with an output other than color or 
depth we've got a serious problem somewhere else.

-Brian



More information about the mesa-dev mailing list