i965: Remove brw_set_predicate_inverse(p, true) from scratch offset code

Given that it exists between a push/pop of instruction state, this call
can only affect the MOV or ADD instruction generated just below it.
Neither of those instructions are predicated, so it makes no sense to
ask for the inverse predicate.

This fixes grumblings from the simulator debugger, which was
complaining about an invalid predicate.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965/blorp: Fix narrowing warnings.

Blorp has to convert rectangle coordinates from integers to floats in
order to send them down the GPU pipeline.  Recent versions of GCC
issue a warning for this, since a float is not capable of precisely
representing all possible 32-bit integer values.  Suppress the warning
with an explicit type cast in the case of blorp, since rectangle
coordinates will never be large enough to cause a loss of precision.

Reviewed-by: Eric Anholt <eric@anholt.net>
radeon/llvm: Replace AMDGPU pow intrinsic with the llvm version
radeon/llvm: Add optimization for FP_ROUND
radeon/llvm: Expand vector fadd and fmul on R600
radeon/llvm: Add support for i8 reads on R600
radeon/llvm: Add support for v4f32 stores on R600
radeon/llvm: Handle loads from the constants address space.

Reading from constant memory is not supported yet, so constant reads use
global memory.
pipe-loader: Remove a few debug_printfs

On debug builds these were always being printed.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
clover: Initialize height and depth to 1 for transfers

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
meta: Add on demand compilation of per target shader programs

A call to glGenerateMipmap() follows the generation of a relevant
shader program in setup_glsl_generate_mipmap().

To support all texture targets and to avoid compiling shaders
everytime, per target shader programs are compiled on demand
and saved for the next call.

Fixes float-texture(mipmap.manual):
See Comment 6: https://bugs.freedesktop.org/show_bug.cgi?id=54296

NOTE: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
r600g: don't snoop context state while building shaders

Let's use the shader key describing the state.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: atomize framebuffer state

Tested on RS880, Evergreen and Cayman.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: remove unused CB registers from register lists

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: remove now-unused SURFACE_BASE_UPDATE logic

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: remove initialization of unused loop register tables

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: use CS helpers to emit streamout state

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: set QUANT_MODE on Cayman too

This fixes piglit/fbo-blit-stretched.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: Fix build with LLVM compiler
draw: fix non-indexed draw calls if there's an index buffer

pipe_draw_info::indexed determines if it should be indexed and not
the presence of an index buffer.

This fixes crashes in r300g.

NOTE: This is a candidate for the stable branches.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>