i965: Fix sampler state pointer adjustment for nonconst samplers

This started hitting an assertion recently. Only affects Haswell
(Ivybridge doesn't support this meddling with the sampler state pointer,
and ARB_gpu_shader5 is not enabled yet on Broadwell)

14 Piglits crash->pass.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
util: Implement unreachable for MSVC using __assume

Based on the description of __assume at:

http://msdn.microsoft.com/en-us/library/1b3fsfxw.aspx

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: Silence unused parameter warning in check_context_limits in non-debug builds

../../src/mesa/main/context.c: In function 'check_context_limits':
../../src/mesa/main/context.c:733:41: warning: unused parameter 'ctx' [-Wunused-parameter]

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
ilo: fix intel_bo_wait() on kernel 3.17

drm_intel_gem_bo_wait() with negative timeout is broken on kernel 3.17.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: add eu_count and thread_count to ilo_dev_info

They will be used to report compute params or program compute states.
thread_count can also be used for 3DSTATE_VS.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: fix compute params

Based on beignet, hardware capabilities, and OpenCL requirements.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: add kernel queries for compute shaders

We need to know the local/input/private sizes and others.  This is not
complete.  We need many others for CURBE setup.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: use a dynamic array for global bindings

Use util_dynarray in ilo_set_global_binding() to allow for unlimited number of
global bindings.  Add a comment for global bindings.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: add ilo_finalize_compute_states()

It updates the handles of the global bindings.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: update genhw headers for media pipeline

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: disassemble TS messages

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: disassemble DP DC messages

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: improve media command helpers

They were written for Gen6 but mostly untested.  Make them work for Gen7+.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: add ilo_render_emit_launch_grid()

ilo_render_emit_launch_grid() emits all the hardware states needed for a
launch_grid() call.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: hook up launch_grid()

All we need to do is to upload the input data and call
ilo_render_emit_launch_grid() with space checking.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: let ilo_shader_compile_cs() return a dummy shader

The dummy shader sends an EOT message to end itself.  There are many more
works need to be done on the compiler side before we can advertise
PIPE_CAP_COMPUTE.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
ilo: OpenCL hello world hacks

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>