gallium/targets: Haiku softpipe, perform better framebuffer validation

* Check for back left attachment as well
* Set and act on pipe format none

Ack'ed by Emil Velikov <emil.l.velikov@gmail.com>
gallium/targets: Break haiku state_tracker out to own directory

Ack'ed by Emil Velikov <emil.l.velikov@gmail.com>
hgl: trivial bits

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
include/haiku: fix comment typo

Cc: Alexander von Gluck IV <kallisti5@unixzen.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
sw/hgl: struct haiku_displaytarget is not public struct

It is meant to be private within the actual winsys. Remove it from
the exported header, and fold it into it's only user.

Cc: Alexander von Gluck IV <kallisti5@unixzen.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/haiku-softpipe: explicitly prefix sw/hgl header

Cc: Alexander von Gluck IV <kallisti5@unixzen.com>

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
nouveau: allow more tokens by default to avoid parse failures

Also print a note saying that parsing failed to help isolate issues.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
i965/disasm: Disassemble Z/NZ conditional modifiers as .z/.nz.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965/disasm: Add break/cont/halt to list of has_uip().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965/disasm: Disassemble JMPI's source properly.

The source can be a register as well as an immediate, and disassembling
a register as an immediate can have some strange results.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965/disasm: Show jump count for if/iff/halt.

These instructions don't have pop count.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Mark BRW_CONDITIONAL_R as Gen <= 5.
r600g: Reinstate include path to common radeon source directory

Fixes build failure since commit a131263a2f19507ca0d2f6093672d930a7c054d1
('gallium/radeon: cleanup header inclusion'):

../../../../../src/gallium/drivers/r600/evergreen_compute.c:50:30: fatal error: radeon_llvm_util.h: No such file or directory
 #include "radeon_llvm_util.h"
                              ^
compilation terminated.

Trivial.
u_vbuf: Make sure all caps are initialized

Pointed out by valgrind.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83148
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600/compute: Don't leak compute pool item_list/unallocated_list

v3: Fix multi-line comment format
v2: Change to C-style comments and fix indentation

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Bruno Jiménez <brunojimen@gmail.com>
mesa: fix fallback texture for cube map array

mesa was creating a cube map array texture with just one layer, which is
not legal. This caused an assertion failure when using that texture later
in llvmpipe (when enabling cube map arrays) since it verifies the number
of layers in the view is divisible by 6 (the sampling code might well crash
randomly otherwise) with piglit glsl-resource-not-bound CubeArray -fbo -auto.

v2: use appropriately sized texel array...

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
draw: remove fishy num_samplers/num_sampler_views check in llvm path

This was meant for softpipe to not crash at some point if vertex texturing
was used. It is, however, fishy because it uses values from
draw_set_samplers/draw_set_sampler_views and not from the shader key. Albeit
we should still in all cases actually generate a new shader if this changes
(because the samplers and views themselves are in the key) I don't want to
think again wondering if that's really correct in the future.
Besides, at least today, it does not actually work for softpipe, as this was
relying on softpipe not actually calling draw_set_samplers/sampler_views at
all - I've verified it crashes regardless (if there were a tex instruction in
the vs, which normally should not happen anyway). For drivers which do indeed
not call these functions because they don't support vertex texturing at all
(r300), this should still not crash because the static texture data is all
zero, which causes the sampling functions to take an early out (same as is done
if no texture is bound at the slot used for sampling - verified with hacked up
softpipe).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
tgsi: (trivial) fix handling msaa resources on TXF

Just handle as ordinary 2d / 2d array resources. Prevents an assertion failure
with softpipe and piglit glsl-resource-not-bound 2DMS/2DMSArray tests.
While here also fix TXD shadowCube similarly, which fixes the crash with piglit
tex-miplevel-selection textureGrad CubeShadow (the test will still fail due to
softpipe being broken).

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=80011

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
softpipe: don't assert on illegal wrap mode for rect textures

piglit tex-miplevel-selection nowadays doesn't use repeat wrap mode due to
sampler objects any longer, however at the time of the clear the wrap mode
is still illegal and at this point we get to verify the state, including
samplers (even though they won't get used), and because mesa doesn't treat
it as an incomplete texture as the spec says it should, we hit the assertion.
Just warn about this for now instead.
Gets crashes down from 44 to 14 in a piglit run (all were in various tests of
tex-miplevel-selection with texture rectangles). Though just about all
tex-miplevel-selection tests fail anyway for other reasons.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
draw: kill off bogus assertion in tgsi_fetch_gs_outputs

Not sure why it was there but it is definitely not an error if gs outputs are
infs/nans. Besides, the outputs can be ints, in which case any small negative
number asserted.
This fixes piglit's texelFetch gs isamplerXX crashes with softpipe (down from
14 to 2).

Bug https://bugs.freedesktop.org/show_bug.cgi?id=80012

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>