[Mesa-dev] [PATCH 10/10] nouveau: Return NONE to VARYINGS_PACKING_CONSTRAINTS query

Christoph Bumiller e0425955 at student.tuwien.ac.at
Fri Feb 24 07:40:28 PST 2012


Do you fix tgsi_declaration to support per-component interpolation mode
anywhere ?

If you don't, or if you don't update the corresponding bits in the
driver code to handle that (which I don't expect you to), you have to
put NO_MIXED_INTERPOLATION everywhere.

On 02/23/2012 09:12 PM, Vincent Lejeune wrote:
> ---
>  src/gallium/drivers/nv50/nv50_screen.c |    2 ++
>  src/gallium/drivers/nvc0/nvc0_screen.c |   11 +++++++++++
>  src/gallium/drivers/nvfx/nvfx_screen.c |    4 ++++
>  3 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
> index 1d53593..5fb81d9 100644
> --- a/src/gallium/drivers/nv50/nv50_screen.c
> +++ b/src/gallium/drivers/nv50/nv50_screen.c
> @@ -208,6 +208,8 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
>        return 32;
>     case PIPE_SHADER_CAP_OUTPUT_READ:
>        return 0; /* maybe support this for fragment shaders ? */
> +   case PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS:
> +	return NONE;
>     default:
>        NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param);
>        return 0;
> diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
> index abc04ab..824b78b 100644
> --- a/src/gallium/drivers/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nvc0/nvc0_screen.c
> @@ -143,6 +143,15 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>     }
>  }
>  
> +// Where to put this ?
> +enum packing_constraint
> +{
> +   NONE, /** no limitation (scalar architecture : swrast, nouveau) */
> +   SMOOTH_NOPERSPECTIVE_MIXED, /** Smooth and noperspective varying can be mixed but not with flat (i965) */
> +   NO_MIXED_INTERPOLATION, /** Dont mix different interpolation (r300 and r600) */
> +   AVOID_PACKING, /** Disable packing */
> +};
> +
>  static int
>  nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
>                               enum pipe_shader_cap param)
> @@ -204,6 +213,8 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
>        */
>     case PIPE_SHADER_CAP_OUTPUT_READ:
>        return 0; /* shader != PIPE_SHADER_TESSELLATION_CONTROL; */
> +   case PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS:
> +	return NONE;
>     default:
>        NOUVEAU_ERR("unknown PIPE_SHADER_CAP %d\n", param);
>        return 0;
> diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c
> index 71e7c15..46452c7 100644
> --- a/src/gallium/drivers/nvfx/nvfx_screen.c
> +++ b/src/gallium/drivers/nvfx/nvfx_screen.c
> @@ -145,6 +145,8 @@ nvfx_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum
>  			return screen->use_nv4x ? 1 : 0;
>  		case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
>  			return 16;
> +		case PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS:
> +		   return NONE;
>  		default:
>  			break;
>  		}
> @@ -189,6 +191,8 @@ nvfx_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum
>  			return 0;
>  		case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
>  			return 0; /* We have 4 on nv40 - but unsupported currently */
> +		case PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS:
> +		   return NONE;
>  		default:
>  			break;
>  		}



More information about the mesa-dev mailing list