SQUASH: Remove redundant stage-based error for non-flat double varying

We've already established that stage->state == MESA_SHADER_FRAGMENT
here. The error message also wouldn't have been correct, if the previous
stage were a tessellation or geometry stage.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
SQUASH: support array constructors for double arrays

Arrays with double element type may be constructed using
different type, patch adds implicit conversion.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
SQUASH: Remove new the tokens used in the grammar from unused list

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
SQUASH: Fixes to implicit conversions required by GL_ARB_gpu_shader_fp64

Patch makes following Piglit test pass:
   arb_gpu_shader_fp64/compiler/implicit-conversions.vert

v2: fix issues in 'can_implicitly_convert_to' and take
    has_double() in use (Dave Airlie)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
SQUASH: validate output types for shader stages

Patch fixes Piglit test:
   arb_gpu_shader_fp64/preprocessor/fs-output-double.frag

and adds additional validation for shader outputs.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
SQUASH: add double support to constant propagation pass

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
SQUASH: support double increment in ir_loop controls

Patch makes following Piglit test pass:
   arb_gpu_shader_fp64/compiler/double-loop-iterator.vert

v2: make also sure that calculate_iterations handles
    double correctly, now the test *really* passes

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
SQUASH: support double in ir_binop_vector_extract

Patch makes following Piglit test pass:
   glsl-double-const-expr-vector-extract.shader_test

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
SQUASH: double support for uniform buffer objects

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
SQUASH: support double in 420pack vector constructor

Patch adds conversion support for when constructing a dvec from
items of a different type.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
SQUASH: set correct size for double array uniforms

+ fix initializer bug in double array uniforms

(merge these to Dave's 'glsl: add double support')

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
SQUASH: support double when constructing matrix from scalar

Patch adds support for both const and non-const cases.

Patch makes following Piglit test pass:
   glsl-double-conversion-constructor-01.shader_test

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
glsl: enable/disable certain lowering passes for doubles

We want to restrict some lowering passes to floats only,
and enable other for doubles.

Signed-off-by: Dave Airlie <airlied@redhat.com>
glsl/lower_instructions: add double lowering passes

This lowers double dot product and lrp to fma.

Signed-off-by: Dave Airlie <airlied@redhat.com>
glsl: implement double builtin functions

This implements the bulk of the builtin functions for fp64 support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
glsl: lower double optional passes

These lowering passes are optional for the backend to request, currently
the TGSI softpipe backend most likely the r600g backend would want to use
these passes as is. They aim to hit the gallium opcodes from the standard
rounding/truncation functions.

Signed-off-by: Dave Airlie <airlied@redhat.com>
i965: just avoid warnings with fp64

This just fills in some blanks to avoid warnings in the i965 driver.

Signed-off-by: Dave Airlie <airlied@redhat.com>
gallium: add double opcodes and TGSI execution (v2)

This is based on code by Michael Krol <michal@vmware.com>

v2: add unsigned/int <-> double
tgsi: expose doubles for softpipe.

Signed-off-by: Dave Airlie <airlied@redhat.com>
st/glsl: add st fp64 support (v2)
v2 : add double to int/unsigned conversion