st/wgl: add WINAPI qualifiers on wgl function typedefs

Fixes a release build segfault when wglCreateContextAttribsARB()
calls the wglCreateContext() function.

Cc: "10.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matthew McClure <mcclurem@vmware.com>
gm107/ir: add dnz emission for fmul

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.3" <mesa-stable@lists.freedesktop.org>
gk110/ir: add dnz flag emission for fmul/fmad

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
radeonsi: fix CS tracing and remove excessive CS dumping
gallium/util: add util_bitcount64

I'll need this in radeonsi.

v2: use __builtin_popcountll if available

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: get tgsi_shader_info only once before compilation

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
tgsi: simplify shader properties in tgsi_shader_info

Use an array of properties indexed by TGSI_PROPERTY_* definitions.
radeonsi: get fs_write_all from tgsi_shader_info directly

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
tgsi: remove some not so useful variables from tgsi_shader_info
radeonsi: remove unused variable si_shader::gs_input_prim

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: always compile shaders on demand

The first compiled shader is sometimes useless, because the key doesn't match
the key for the draw call where it's used.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: move geometry shader properties from si_shader to si_shader_selector

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: remove interp_at_sample from the key, use TGSI_INTERPOLATE_LOC_SAMPLE

st/mesa has the same flag in its shader key, we don't need to do it
in the driver anymore.

Instead, use TGSI_INTERPOLATE_LOC_SAMPLE, which is what st/mesa sets.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: don't flush shader caches when building PM4 shader states

This is a wrong place to flush caches to say the least.

I don't think we need to flush the instruction caches if we don't patch
shaders with DMA.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: make the vertex shader key smaller

We only support 16 vertex attribs, not 32.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: set LLVMByValAttribute for all descriptor arrays

I hope this is correct.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: pass the GS shader directly to si_generate_gs_copy_shader

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: set number of userdata SGPRs of GS copy shader to 4

It only needs the constant buffer with clip planes and read-write resources
for the GS->VS ring and streamout. That's 2 pointers.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
tgsi: change tgsi_shader_info::properties to a one-dimensional array

Reviewed-by: Roland Scheidegger <sroland@vmware.com>

v2: fix svga too
ilo: let shaders determine sampler counts

When a shader needs N samplers, we should upload N samplers and not depend on
how many are bound.

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