[Mesa-dev] [PATCH 09/10] r600g: Return NO_MIXED_... to VARYINGS_PACKING_CONSTRAINTS query
Marek Olšák
maraeo at gmail.com
Thu Feb 23 12:44:55 PST 2012
On Thu, Feb 23, 2012 at 9:12 PM, Vincent Lejeune <vljn at ovi.com> wrote:
> ---
> src/gallium/drivers/r600/r600_pipe.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index 3d35ed2..9ccb318 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -49,6 +49,17 @@
> #include "r600_pipe.h"
> #include "r600_hw_context_priv.h"
>
> +#ifndef MTYPES_H
> +// 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 */
> +};
> +#endif
This should be in gallium/include/p_defines.h. The enums should have a
prefix of the form "PIPE_(something)_". The enum type should start
with "pipe_".
FYI, including mtypes.h in Gallium drivers is generally forbidden.
Marek
> +
> /*
> * pipe_context
> */
> @@ -527,6 +538,8 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
> return 16;
> case PIPE_SHADER_CAP_OUTPUT_READ:
> return 1;
> + case PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS:
> + return NO_MIXED_INTERPOLATION;
> }
> return 0;
> }
> --
> 1.7.7
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list