[Mesa-dev] [PATCH 01/16] i965: Sets missing vertex shader constant values for HighInt format

Kenneth Graunke kenneth at whitecape.org
Thu Dec 11 16:47:23 PST 2014


On Thursday, December 11, 2014 11:33:52 PM Eduardo Lima Mitev wrote:
> The range's min and max, and the precision value are not set correctly for the
> vertex shader constants.
> 
> Fixes 1 dEQP test: dEQP-GLES3.functional.state_query.shader.precision_vertex_highp_int
> ---
>  src/mesa/drivers/dri/i965/brw_context.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> index 860ee22d..03b4ee3 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -480,6 +480,12 @@ brw_initialize_context_constants(struct brw_context *brw)
>     ctx->Const.Program[MESA_SHADER_FRAGMENT].HighInt = ctx->Const.Program[MESA_SHADER_FRAGMENT].LowInt;
>     ctx->Const.Program[MESA_SHADER_FRAGMENT].MediumInt = ctx->Const.Program[MESA_SHADER_FRAGMENT].LowInt;
>  
> +   ctx->Const.Program[MESA_SHADER_VERTEX].LowInt.RangeMin = 31;
> +   ctx->Const.Program[MESA_SHADER_VERTEX].LowInt.RangeMax = 30;
> +   ctx->Const.Program[MESA_SHADER_VERTEX].LowInt.Precision = 0;
> +   ctx->Const.Program[MESA_SHADER_VERTEX].HighInt = ctx->Const.Program[MESA_SHADER_VERTEX].LowInt;
> +   ctx->Const.Program[MESA_SHADER_VERTEX].MediumInt = ctx->Const.Program[MESA_SHADER_VERTEX].LowInt;
> +
>     if (brw->gen >= 7) {
>        ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
>        ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
> 

We should set these as default values in src/mesa/main somewhere - that way,
all drivers advertise 32-bit integer support by default.  Currently, it looks
like basically all drivers forget to do this.

The few (if any?) drivers that want something else can set their own values.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141211/eebe769f/attachment.sig>


More information about the mesa-dev mailing list