mesa.git
7 years agoradeonsi: pull iteration over vertex streams into GS copy shader logic
Nicolai Hähnle [Tue, 29 Nov 2016 13:23:05 +0000 (14:23 +0100)]
radeonsi: pull iteration over vertex streams into GS copy shader logic

The iteration is not needed for normal vertex shaders.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: group streamout writes by vertex stream
Nicolai Hähnle [Tue, 29 Nov 2016 14:36:08 +0000 (15:36 +0100)]
radeonsi: group streamout writes by vertex stream

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: load the streamout buf descriptors closer to their use
Nicolai Hähnle [Tue, 29 Nov 2016 14:09:14 +0000 (15:09 +0100)]
radeonsi: load the streamout buf descriptors closer to their use

LLVM can still decide to hoist the loads since they're marked invariant.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: extract writing of a single streamout output
Nicolai Hähnle [Tue, 29 Nov 2016 12:23:21 +0000 (13:23 +0100)]
radeonsi: extract writing of a single streamout output

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: separate the call to si_llvm_emit_streamout from exports
Nicolai Hähnle [Tue, 29 Nov 2016 11:59:48 +0000 (12:59 +0100)]
radeonsi: separate the call to si_llvm_emit_streamout from exports

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: plumb the output vertex_stream through to si_shader_output_values
Nicolai Hähnle [Tue, 29 Nov 2016 14:43:44 +0000 (15:43 +0100)]
radeonsi: plumb the output vertex_stream through to si_shader_output_values

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: rename members of si_shader_output_values
Nicolai Hähnle [Tue, 29 Nov 2016 11:55:19 +0000 (12:55 +0100)]
radeonsi: rename members of si_shader_output_values

Be a bit more verbose and avoid confusion in future patches.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: fix an off-by-one error in the bounds check for max_vertices
Nicolai Hähnle [Tue, 6 Dec 2016 20:03:03 +0000 (21:03 +0100)]
radeonsi: fix an off-by-one error in the bounds check for max_vertices

The spec actually says that calling EmitStreamVertex is undefined when
you exceed max_vertices. But we do need to avoid trampling over memory
outside the GSVS ring.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: do not kill GS with memory writes
Nicolai Hähnle [Tue, 29 Nov 2016 15:33:31 +0000 (16:33 +0100)]
radeonsi: do not kill GS with memory writes

Vertex emits beyond the specified maximum number of vertices are supposed to
have no effect, which is why we used to always kill GS that reached the limit.

However, if the GS also writes to memory (SSBO, atomics, shader images), then
we must keep going and only skip the vertex emit itself.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: update all GSVS ring descriptors for new buffer allocations
Nicolai Hähnle [Mon, 28 Nov 2016 19:30:41 +0000 (20:30 +0100)]
radeonsi: update all GSVS ring descriptors for new buffer allocations

Fixes GL45-CTS.gtf40.GL3Tests.transform_feedback3.transform_feedback3_geometry_instanced.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agost/glsl_to_tgsi: plumb the GS output stream qualifier through to TGSI
Nicolai Hähnle [Tue, 29 Nov 2016 11:38:48 +0000 (12:38 +0100)]
st/glsl_to_tgsi: plumb the GS output stream qualifier through to TGSI

Allow drivers to emit GS outputs in a smarter way.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agotgsi/scan: collect information about output usagemasks
Nicolai Hähnle [Fri, 2 Dec 2016 20:20:16 +0000 (21:20 +0100)]
tgsi/scan: collect information about output usagemasks

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agotgsi/scan: collect information about output vertex streams
Nicolai Hähnle [Tue, 29 Nov 2016 13:22:20 +0000 (14:22 +0100)]
tgsi/scan: collect information about output vertex streams

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agogallium: extract individual streamout output structure
Nicolai Hähnle [Tue, 29 Nov 2016 13:21:55 +0000 (14:21 +0100)]
gallium: extract individual streamout output structure

So that we can pass pointers to individual array entries around.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agotgsi: add Stream{X,Y,Z,W} fields to tgsi_declaration_semantic
Nicolai Hähnle [Wed, 7 Dec 2016 10:27:25 +0000 (11:27 +0100)]
tgsi: add Stream{X,Y,Z,W} fields to tgsi_declaration_semantic

This is for geometry shader outputs. Without it, drivers have no way of
knowing which stream each output is intended for, and have to
conservatively write all outputs to all streams.

Separate stream numbers for each component are required due to output
packing.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoglsl: remember per-component vertex streams for packed varyings
Nicolai Hähnle [Wed, 30 Nov 2016 09:38:55 +0000 (10:38 +0100)]
glsl: remember per-component vertex streams for packed varyings

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoi965/blorp: fix release build unused variable warning
Grazvydas Ignotas [Sun, 11 Dec 2016 19:57:44 +0000 (21:57 +0200)]
i965/blorp: fix release build unused variable warning

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
7 years agovirgl: Fix a strict-aliasing violation in the encoder
Edward O'Callaghan [Mon, 5 Dec 2016 23:43:17 +0000 (10:43 +1100)]
virgl: Fix a strict-aliasing violation in the encoder

As per the C spec, it is illegal to alias pointers to different
types. This results in undefined behaviour after optimization
passes, resulting in very subtle bugs that happen only on a
full moon..

Use a memcpy() as a well defined coercion between the double
to uint64_t interpretations of the memory.

V.2: Use static_assert() instead of assert().
V.3: Use C99 compat STATIC_ASSERT() over C11 static_assert().

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Acked-by: Dave Airlie <airlied@redhat.com>
7 years agoi965: Print out cycle estimates at the start of block annotations.
Kenneth Graunke [Sun, 11 Dec 2016 06:13:05 +0000 (22:13 -0800)]
i965: Print out cycle estimates at the start of block annotations.

We now print

   START B15 <-B14 (42774 cycles)

indicating that we estimate B15 will take 42,774 cycles.  Printing
this should make it easier where time is spent in the program.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agomesa: Return LINEAR encoding for winsys FBO depth/stencil.
Kenneth Graunke [Sat, 10 Dec 2016 00:16:53 +0000 (16:16 -0800)]
mesa: Return LINEAR encoding for winsys FBO depth/stencil.

GetFramebufferAttachmentParameteriv should return GL_LINEAR for the
window system default framebuffer's GL_DEPTH or GL_STENCIL attachments
when there are zero depth or stencil bits.

The GL 4.5 spec's GetFramebufferAttachmentParameteriv section says:

"If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is not NONE,
 these queries apply to all other framebuffer types:

 [...]

 If attachment is not a color attachment, or no data storage or texture
 image has been specified for the attachment, then params will contain
 the value LINEAR."

Note that we already return LINEAR for the case where there is an actual
depth or stencil renderbuffer attached.  In the case modified by this
patch, FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE returns FRAMEBUFFER_DEFAULT
rather than NONE.

Fixes a CTS test when run in a visual without depth / stencil buffers:
GL45-CTS.gtf30.GL3Tests.framebuffer_srgb.framebuffer_srgb_default_encoding

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agointel/aubinator: fix 32bit shift overflow warning
Grazvydas Ignotas [Sat, 10 Dec 2016 19:10:46 +0000 (21:10 +0200)]
intel/aubinator: fix 32bit shift overflow warning

Doesn't look like this can work on 32bit, just rids of annoying
warning.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
7 years agoanv: fix release build unused variable warnings
Grazvydas Ignotas [Sat, 10 Dec 2016 19:10:48 +0000 (21:10 +0200)]
anv: fix release build unused variable warnings

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
7 years agoradv/ac: some fix maybe-uninitialized warnings
Grazvydas Ignotas [Sat, 10 Dec 2016 19:10:05 +0000 (21:10 +0200)]
radv/ac: some fix maybe-uninitialized warnings

Mark some paths unreachable so that compiler knows variables are
initialized in all valid paths.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv/meta: use VK_NULL_HANDLE for handles
Grazvydas Ignotas [Sat, 10 Dec 2016 19:10:04 +0000 (21:10 +0200)]
radv/meta: use VK_NULL_HANDLE for handles

Otherwise we get 32bit warnings because handle is plain uint64_t there
and NULL is not suited to initialize that.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: fix release build unused variable warnings
Grazvydas Ignotas [Sat, 10 Dec 2016 19:10:03 +0000 (21:10 +0200)]
radv: fix release build unused variable warnings

Just mark with MAYBE_UNUSED.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agosoftpipe: fix release build unused variable warning
Grazvydas Ignotas [Sat, 10 Dec 2016 19:10:47 +0000 (21:10 +0200)]
softpipe: fix release build unused variable warning

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: fix release build unused variable warnings
Grazvydas Ignotas [Sat, 10 Dec 2016 19:10:45 +0000 (21:10 +0200)]
radeonsi: fix release build unused variable warnings

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
7 years agoi965/mt: Disable HiZ when sharing depth buffer externally (v2)
Chad Versace [Sat, 10 Dec 2016 00:22:52 +0000 (16:22 -0800)]
i965/mt: Disable HiZ when sharing depth buffer externally (v2)

intel_miptree_make_shareable() discarded and disabled CCS. Fix it so
that it discards and disables HiZ too.

Fixes dEQP-EGL.functional.image.render_multiple_contexts.gles2_renderbuffer_depth16_depth_buffer
on Skylake.

v2: Actually do what the commit message says. Discard the HiZ buffer.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98329
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Nanley Chery <nanley.g.chery@intel.com
Cc: Haixia Shi <hshi@chromium.org>
Cc: mesa-stable@lists.freedesktop.org
7 years agoi965/mt: Disable aux surfaces after making miptree shareable
Chad Versace [Sat, 10 Dec 2016 00:18:11 +0000 (16:18 -0800)]
i965/mt: Disable aux surfaces after making miptree shareable

The entire goal of intel_miptree_make_shareable() is to permanently
disable the miptree's aux surfaces. So set
intel_mipmap_tree:disable_aux_buffers after the function's done with
discarding down the aux surfaces.

References: https://bugs.freedesktop.org/show_bug.cgi?id=98329
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Nanley Chery <nanley.g.chery@intel.com
Cc: Haixia Shi <hshi@chromium.org>
Cc: mesa-stable@lists.freedesktop.org
7 years agospirv: Use a simpler and more correct implementaiton of tanh()
Jason Ekstrand [Fri, 9 Dec 2016 17:34:50 +0000 (09:34 -0800)]
spirv: Use a simpler and more correct implementaiton of tanh()

The new implementation is more correct because it clamps the incoming value
to 10 to avoid floating-point overflow.  It also uses a much reduced
version of the formula which only requires 1 exp() rather than 2.  This
fixes all of the dEQP-VK.glsl.builtin.precision.tanh.* tests.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0" <mesa-dev@lists.freedesktop.org>
7 years agoglsl: Use a simpler formula for tanh
Jason Ekstrand [Fri, 9 Dec 2016 17:33:05 +0000 (09:33 -0800)]
glsl: Use a simpler formula for tanh

The formula we have used in the past is a trivial reduction from the
definition by simply multiplying both the numerator and denominator of the
formula by 2.  However, multiplying by e^x, you can further reduce it.
This allows us to get rid of one side of the clamp and two of exponential
functions which should make it faster.  The new formula still passes the
dEQP precision tests for tanh so it should be fine.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoanv: Clean up some unused variables
Edward O'Callaghan [Fri, 9 Dec 2016 14:40:40 +0000 (01:40 +1100)]
anv: Clean up some unused variables

Following on from the spirit of commit 011e5570f.

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoswr: [rasterizer common/core/jitter] fetch support for GL_FIXED
Tim Rowley [Wed, 7 Dec 2016 23:04:20 +0000 (17:04 -0600)]
swr: [rasterizer common/core/jitter] fetch support for GL_FIXED

v2: use fmul(1/65536) instead of fdiv(65535)

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agoconfigure: cleanup GLX_USE_TLS handling
Emil Velikov [Mon, 5 Dec 2016 19:02:29 +0000 (19:02 +0000)]
configure: cleanup GLX_USE_TLS handling

Mesa requires ax_pthread_ok = yes, thus we can fold/rewrite the
conditional to follow the more common "if test" pattern.

No functional change intended.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agoconfigure: enable glx-tls by default
Emil Velikov [Mon, 5 Dec 2016 19:02:28 +0000 (19:02 +0000)]
configure: enable glx-tls by default

In the (not too) distant future we'd want to remove this option and
effectively drop the other codepath(s) we have in our dispatch.

Linux distributions have been using --enable-glx-tls for a number of
years. Some/most BSD platforms still don't support this, yet this should
serve as an encouragement to move things forwards.

Note: we had many bug reports were opened due to the wrong default
option. See the list below for details.

v2:
 - Correct default option in help string (Andreas)
 - Add bugzilla references.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70623
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72902
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73778
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89043

Cc: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
Cc: Jonathan Gray <jsg@jsg.id.au>
Cc: mesa-maintainers@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
7 years agodocs: document how to (self-) reject stable patches
Emil Velikov [Mon, 5 Dec 2016 16:11:21 +0000 (16:11 +0000)]
docs: document how to (self-) reject stable patches

Document what has been the unofficial way to self-reject stable patches.

Namely: drop the mesa-stable tag and push the commit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
7 years agoegl: add and enable EGL_KHR_config_attribs
Emil Velikov [Mon, 5 Dec 2016 14:42:04 +0000 (14:42 +0000)]
egl: add and enable EGL_KHR_config_attribs

Extension is already implemented in the main code.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoegl/surfaceless: remove duplicate KHR_image_base enablement
Emil Velikov [Mon, 5 Dec 2016 14:42:03 +0000 (14:42 +0000)]
egl/surfaceless: remove duplicate KHR_image_base enablement

Already set by the core code - dri2_create_screen/dri2_setup_screen

Cc: Chad Versace <chadversary@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoegl: unexport _eglConvertIntsToAttribs
Eric Engestrom [Thu, 8 Dec 2016 00:36:03 +0000 (00:36 +0000)]
egl: unexport _eglConvertIntsToAttribs

Nobody else makes use of this function.
We can always re-export it if someone ever needs it.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl: rename static functions to match convention
Eric Engestrom [Thu, 8 Dec 2016 00:36:02 +0000 (00:36 +0000)]
egl: rename static functions to match convention

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agocompiler/glsl: fix precision problem of tanh
Haixia Shi [Fri, 9 Dec 2016 01:41:02 +0000 (17:41 -0800)]
compiler/glsl: fix precision problem of tanh

Clamp input scalar value to range [-10, +10] to avoid precision problems
when the absolute value of input is too large.

Fixes dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.* test
failures.

v2: added more explanation in the comment.
v3: fixed a typo in the comment.

Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0" <mesa-dev@lists.freedesktop.org>
7 years agoswr: [rasterizer core/memory] Finish R24_UNORM_X8_TYPELESS for AVX512
Tim Rowley [Wed, 7 Dec 2016 23:02:29 +0000 (17:02 -0600)]
swr: [rasterizer core/memory] Finish R24_UNORM_X8_TYPELESS for AVX512

This one-off specialization was missed.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
7 years agoradv: Use enum for memory types.
Bas Nieuwenhuizen [Thu, 8 Dec 2016 22:06:44 +0000 (23:06 +0100)]
radv: Use enum for memory types.

Inspired by patches from Eric Engestrom.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Cc: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: Use enum for memory heaps.
Bas Nieuwenhuizen [Thu, 8 Dec 2016 21:28:21 +0000 (22:28 +0100)]
radv: Use enum for memory heaps.

Inspired by patches from Eric Engestrom.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Cc: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: Clean up some unused variables.
Bas Nieuwenhuizen [Thu, 8 Dec 2016 21:19:28 +0000 (22:19 +0100)]
radv: Clean up some unused variables.

Leftovers from anv?

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoi965: delay adding built-in uniforms to Parameters list
Timothy Arceri [Tue, 6 Dec 2016 06:34:02 +0000 (17:34 +1100)]
i965: delay adding built-in uniforms to Parameters list

This is a step towards using NIR optimisations over GLSL IR
optimisations. Delaying adding built-in uniforms until after
we convert to NIR gives it a chance to optimise them away.

V2: move the new code back to brw_link_shader()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoswr: [rasterizer core] supply proper clip distances to point sprites
Ilia Mirkin [Thu, 24 Nov 2016 18:27:48 +0000 (13:27 -0500)]
swr: [rasterizer core] supply proper clip distances to point sprites

Large points become pairs of triangles when rasterized, so we must feed
it three clip distances, one for each vertex.

The clip distance is not subject to sprite coord replacement, so there's
no interpolation of it. We just take its value and put it in the "z"
component of the barycentric-ready plane equation.

(We could also just cull it at an earlier point in time, but that would
require larger changes.)

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
7 years agoswr: [rasterizer core] perform perspective division on clip distances
Ilia Mirkin [Thu, 24 Nov 2016 18:27:48 +0000 (13:27 -0500)]
swr: [rasterizer core] perform perspective division on clip distances

Clip distances need to be perspective-divided. This fixes all the
interpolation-*-{distance,vertex} piglits.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
7 years agoradv/ac: no need to pass nir to the post outputs handling
Dave Airlie [Thu, 8 Dec 2016 00:54:24 +0000 (00:54 +0000)]
radv/ac: no need to pass nir to the post outputs handling

We don't use the nir shader in here at all.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: fix warnings in ubo load code.
Dave Airlie [Thu, 8 Dec 2016 00:12:08 +0000 (00:12 +0000)]
radv: fix warnings in ubo load code.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/ac: pass a mask of array params not a number.
Dave Airlie [Thu, 8 Dec 2016 00:11:33 +0000 (00:11 +0000)]
radv/ac: pass a mask of array params not a number.

This makes it easier to add new params before the array ones.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: split out a chunk of variant filling code.
Dave Airlie [Thu, 8 Dec 2016 00:03:38 +0000 (00:03 +0000)]
radv: split out a chunk of variant filling code.

This code will have use for copy shaders etc.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/meta: don't pass rect into blit2d src function.
Dave Airlie [Wed, 7 Dec 2016 23:58:08 +0000 (23:58 +0000)]
radv/meta: don't pass rect into blit2d src function.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/meta: cleanup image info setup.
Dave Airlie [Wed, 30 Nov 2016 02:08:15 +0000 (02:08 +0000)]
radv/meta: cleanup image info setup.

This just passes the subresource info in and uses it.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/meta: split copyimage api into api and meta function
Dave Airlie [Wed, 30 Nov 2016 02:03:33 +0000 (02:03 +0000)]
radv/meta: split copyimage api into api and meta function

This make it easier to add multiple queues later.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/meta: clean up buffer->image code.
Dave Airlie [Wed, 30 Nov 2016 01:56:11 +0000 (01:56 +0000)]
radv/meta: clean up buffer->image code.

Removes some unnecessary functions and pull
some stuff out of the loop.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/ac: don't pass nir to create_function
Dave Airlie [Wed, 7 Dec 2016 23:45:36 +0000 (23:45 +0000)]
radv/ac: don't pass nir to create_function

This isn't needed for later things like geom shader copy shaders,
we won't have NIR.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: add missing license file to radv_meta_bufimage.
Dave Airlie [Wed, 30 Nov 2016 01:51:19 +0000 (01:51 +0000)]
radv: add missing license file to radv_meta_bufimage.

Just noticed this file was missing license and any
explaination of what is in it.

(stable just for license header reasons)
Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/ac: use build_gep0 instead of opencoding it.
Dave Airlie [Wed, 7 Dec 2016 23:39:49 +0000 (23:39 +0000)]
radv/ac: use build_gep0 instead of opencoding it.

Reviewed by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradeonsi: disable the constant engine (CE) on Carrizo and Stoney
Marek Olšák [Wed, 7 Dec 2016 22:01:56 +0000 (23:01 +0100)]
radeonsi: disable the constant engine (CE) on Carrizo and Stoney

It must be disabled until the kernel bug is fixed, and then we'll enable CE
based on the DRM version.

Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: Fix typo: "llvm.fs.interp" => "llvm.SI.fs.interp"
Michel Dänzer [Thu, 8 Dec 2016 01:51:03 +0000 (10:51 +0900)]
radeonsi: Fix typo: "llvm.fs.interp" => "llvm.SI.fs.interp"

Fixes lots of pixel shaders failing to compile with LLVM 3.9 or older.

Trivial.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99013#c4

7 years agoradv: make push constants optional
Dave Airlie [Mon, 28 Nov 2016 03:15:30 +0000 (03:15 +0000)]
radv: make push constants optional

We don't set the push constants slot up unless
something will cause us to need it.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: only emit descriptor sgprs when needed
Dave Airlie [Mon, 28 Nov 2016 02:43:27 +0000 (02:43 +0000)]
radv: only emit descriptor sgprs when needed

This only emits enough descriptor sgprs for the number
of sets in the layout, and only emits the descriptors
necessary for the current stage.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: move userdata sgpr ownership to compiler side.
Dave Airlie [Mon, 28 Nov 2016 01:11:34 +0000 (01:11 +0000)]
radv: move userdata sgpr ownership to compiler side.

This isn't fully what we want yet, but is a good step on the way.

This allows the compiler to create the information structures
for the state setting side, however the state setting still expects
things to be pretty much in 2 sgpr wide register sets, and can't
handle the indirect setting yet.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: refactor out the constant setting user sgpr code.
Dave Airlie [Mon, 28 Nov 2016 00:57:30 +0000 (00:57 +0000)]
radv: refactor out the constant setting user sgpr code.

This just refactors out some common code to make future changes
easier to understand.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: refactor out the descriptor user sgpr setting.
Dave Airlie [Mon, 28 Nov 2016 00:56:37 +0000 (00:56 +0000)]
radv: refactor out the descriptor user sgpr setting.

This just splits some common code into a utility function.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: only bind descriptor sets to stages that need them
Dave Airlie [Mon, 28 Nov 2016 00:46:00 +0000 (00:46 +0000)]
radv: only bind descriptor sets to stages that need them

This copies the push constant code and only binds descriptor
sets to the stages that need them. It also now has to dirty
descriptors on pipeline binds.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: move descriptor set userdata emission to draw flush time.
Dave Airlie [Mon, 28 Nov 2016 00:42:56 +0000 (00:42 +0000)]
radv: move descriptor set userdata emission to draw flush time.

This is another step towards having the compiler decide the
user sgpr layout.

This still emits the descriptors sets for all shader types, but
we will fix this later.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: refactor descriptor set userdata emission out.
Dave Airlie [Mon, 28 Nov 2016 00:37:25 +0000 (00:37 +0000)]
radv: refactor descriptor set userdata emission out.

This just moves this into a separate function.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: pass pipeline to constant flush function
Dave Airlie [Mon, 28 Nov 2016 00:33:39 +0000 (00:33 +0000)]
radv: pass pipeline to constant flush function

I'll need this later rather than just the layout.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: consolidate compute pipeline flushing (v1.1)
Dave Airlie [Mon, 28 Nov 2016 00:32:22 +0000 (00:32 +0000)]
radv: consolidate compute pipeline flushing (v1.1)

This just moves some common code into a utility function
to avoid having to change multiple places later.

v1.1: rename function to better reflect what it does. (Bas)

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradeonsi: wait for outstanding LDS instructions in memory barriers if needed
Marek Olšák [Fri, 2 Dec 2016 18:40:40 +0000 (19:40 +0100)]
radeonsi: wait for outstanding LDS instructions in memory barriers if needed

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agotgsi: fix the src type of TGSI_OPCODE_MEMBAR
Marek Olšák [Fri, 2 Dec 2016 18:17:52 +0000 (19:17 +0100)]
tgsi: fix the src type of TGSI_OPCODE_MEMBAR

It's a literal integer. The next commit will need this.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: wait for outstanding memory instructions in TCS barriers
Marek Olšák [Fri, 2 Dec 2016 18:10:11 +0000 (19:10 +0100)]
radeonsi: wait for outstanding memory instructions in TCS barriers

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: allow specifying simm16 of emit_waitcnt at call sites
Marek Olšák [Fri, 2 Dec 2016 17:56:21 +0000 (18:56 +0100)]
radeonsi: allow specifying simm16 of emit_waitcnt at call sites

The next commit will use this.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: write shader descriptors into hang reports
Marek Olšák [Fri, 2 Dec 2016 01:23:16 +0000 (02:23 +0100)]
radeonsi: write shader descriptors into hang reports

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: check for sampler state CSO corruption
Marek Olšák [Fri, 2 Dec 2016 02:34:07 +0000 (03:34 +0100)]
radeonsi: check for sampler state CSO corruption

It really happens.

v2: declare "magic" in debug builds only

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v1)
7 years agoradeonsi: properly declare context sampler states
Marek Olšák [Fri, 2 Dec 2016 02:39:04 +0000 (03:39 +0100)]
radeonsi: properly declare context sampler states

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: fix incorrect FMASK checking in bind_sampler_states
Marek Olšák [Fri, 2 Dec 2016 01:57:30 +0000 (02:57 +0100)]
radeonsi: fix incorrect FMASK checking in bind_sampler_states

Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: always restore sampler states when unbinding sampler views
Marek Olšák [Fri, 2 Dec 2016 01:18:25 +0000 (02:18 +0100)]
radeonsi: always restore sampler states when unbinding sampler views

Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: take LDS into account for compute shader occupancy stats
Marek Olšák [Thu, 1 Dec 2016 02:23:27 +0000 (03:23 +0100)]
radeonsi: take LDS into account for compute shader occupancy stats

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agost/mesa: round lod_bias to a multiple of 1/256
Marek Olšák [Fri, 2 Dec 2016 15:37:22 +0000 (16:37 +0100)]
st/mesa: round lod_bias to a multiple of 1/256

This reduces the number of sampler states 3.6x in Batman Arkham: Origins.
(from ~7200 to ~2000)

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agogallium: decrease the size of pipe_sampler_state fields
Marek Olšák [Fri, 2 Dec 2016 15:26:43 +0000 (16:26 +0100)]
gallium: decrease the size of pipe_sampler_state fields

We've had unused bits.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agocso: don't release sampler states that are bound
Marek Olšák [Fri, 2 Dec 2016 14:39:25 +0000 (15:39 +0100)]
cso: don't release sampler states that are bound

This fixes random radeonsi GPU hangs in Batman Arkham: Origins (Wine) and
probably many other games too.

cso_cache deletes sampler states when the cache size is too big and doesn't
check which sampler states are bound, causing use-after-free in drivers.
Because of that, radeonsi uploaded garbage sampler states and the hardware
went bananas. Other drivers may have experienced similar issues.

Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
7 years agoi965: Increase max texture to 16k for gen7+
Jordan Justen [Thu, 3 Nov 2016 19:20:19 +0000 (12:20 -0700)]
i965: Increase max texture to 16k for gen7+

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98297
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel/blorp_blit: Add split_blorp_blit_debug switch
Jordan Justen [Wed, 23 Nov 2016 01:20:42 +0000 (17:20 -0800)]
intel/blorp_blit: Add split_blorp_blit_debug switch

Enabling this debug switch causes surface shrinking to happen by
default, and lowers the surface size limit which causes blorp blits to
be split.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel/blorp_blit: Enable splitting large blorp blits
Jordan Justen [Mon, 7 Nov 2016 22:07:07 +0000 (14:07 -0800)]
intel/blorp_blit: Enable splitting large blorp blits

Detect when the surface sizes are too large for a blorp blit. When it
is too large, the blorp blit will be split into a smaller operation
and attempted again.

For gen7, this fixes the cts test:

ES3-CTS.gtf.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit

It will also enable us to increase our renderable size from 8k x 8k to
16k x 16k.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel/blorp_blit: Move RGB=>R conversion to follow blit splitting
Jordan Justen [Wed, 30 Nov 2016 23:53:48 +0000 (15:53 -0800)]
intel/blorp_blit: Move RGB=>R conversion to follow blit splitting

In blorp_copy, when RGB surfaces are copied, we convert the
destination surface to a Red only surface, but 3 times as wide. This
introduces an implicit restriction of "mod 3" for the destination
width.

It is easier to handle the blorp split buffer offsetting with the
original RGB surface, and do the RGB=>R after this.

Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel/blorp_blit: Adjust blorp surface parameters for split blits
Jordan Justen [Mon, 7 Nov 2016 22:08:22 +0000 (14:08 -0800)]
intel/blorp_blit: Adjust blorp surface parameters for split blits

If try_blorp_blit() previously returned that a blit was too large,
shrink_surface_params() will be used to update the surface parameters
for the smaller blit so the blit operation can proceed.

v2:
 * Use double instead of float. (Jason)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel/blorp_blit: Split blorp blits if they are too large
Jordan Justen [Mon, 7 Nov 2016 22:06:56 +0000 (14:06 -0800)]
intel/blorp_blit: Split blorp blits if they are too large

We rename do_blorp_blit() to try_blorp_blit(), and add a return error
if the surface size for the blit is too large. Now, do_blorp_blit() is
rewritten to try to split the blit into smaller operations if
try_blorp_blit() fails.

Note: In this commit, try_blorp_blit() will always attempt to blit and
never return an error, which matches the previous behavior. We will
enable the size checking and splitting in a future commit.

The motivation for this splitting is that in some cases when we
flatten an image, it's dimensions grow, and this can then exceed the
programmable hardware limits. An example is w-tiled+MSAA blits.

v2:
 * Use double instead of float. (Jason)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel/blorp_blit: Create structure for src & dst coordinates
Jordan Justen [Mon, 7 Nov 2016 22:06:49 +0000 (14:06 -0800)]
intel/blorp_blit: Create structure for src & dst coordinates

This will be useful for splitting blits into smaller sizes.

We also make the coordinates of type double rather than float. Since
we will be splitting and scaling the coordinates, we might require
extra precision in the calculations.

v2:
 * Use double instead of float. (Jason)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agovulkan: use STATIC_ASSERT instead of static_assert
Edward O'Callaghan [Tue, 6 Dec 2016 23:30:48 +0000 (10:30 +1100)]
vulkan: use STATIC_ASSERT instead of static_assert

Following the spirit of commit 23d1799f, fixes compilation
warnings on Android build due to lack of C11 features.

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: enable INTEL_conservative_rasterization on Gen9+
Lionel Landwerlin [Fri, 25 Nov 2016 14:23:01 +0000 (14:23 +0000)]
i965: enable INTEL_conservative_rasterization on Gen9+

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
7 years agomesa: add support for GL_INTEL_conservative_rasterization
Lionel Landwerlin [Wed, 30 Nov 2016 14:47:41 +0000 (14:47 +0000)]
mesa: add support for GL_INTEL_conservative_rasterization

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
7 years agoi965: Add i965 plumbing for ARB_post_depth_coverage for i965 (gen9+).
Plamena Manolova [Tue, 6 Dec 2016 19:37:01 +0000 (21:37 +0200)]
i965: Add i965 plumbing for ARB_post_depth_coverage for i965 (gen9+).

This extension allows the fragment shader to control whether values in
gl_SampleMaskIn[] reflect the coverage after application of the early
depth and stencil tests.

Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agomesa: Add GL and GLSL plumbing for ARB_post_depth_coverage for i965 (gen9+).
Plamena Manolova [Tue, 6 Dec 2016 19:32:36 +0000 (21:32 +0200)]
mesa: Add GL and GLSL plumbing for ARB_post_depth_coverage for i965 (gen9+).

This extension allows the fragment shader to control whether values in
gl_SampleMaskIn[] reflect the coverage after application of the early
depth and stencil tests.

Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
7 years agoradeonsi: fix isolines tess factor writes to control ring
Nicolai Hähnle [Mon, 5 Dec 2016 13:39:50 +0000 (14:39 +0100)]
radeonsi: fix isolines tess factor writes to control ring

Fixes piglit arb_tessellation_shader/execution/isoline{_no_tcs}.shader_test.

Cc: mesa-stable@lists.freedesktop.org
7 years agoi965: Drop redundant key->outputs_written initialization.
Kenneth Graunke [Tue, 6 Dec 2016 10:50:21 +0000 (02:50 -0800)]
i965: Drop redundant key->outputs_written initialization.

This was already set to the same value earlier.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agoi965: Initialize "separate" flag in VUE maps.
Kenneth Graunke [Tue, 6 Dec 2016 10:43:07 +0000 (02:43 -0800)]
i965: Initialize "separate" flag in VUE maps.

This was uninitialized, which resulted in weird looking printouts where
it appeared that the TCS output and TES input patch URB entries differed
in SSO/non-SSO layout.  There is no "separable" layout for both, as
they're tied together.

It should have no other actual effect.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agonir: In split_var_copies_block, uint, int, and bool types cannot be matrices
Ian Romanick [Wed, 7 Sep 2016 21:35:20 +0000 (14:35 -0700)]
nir: In split_var_copies_block, uint, int, and bool types cannot be matrices

Noticed while adding support for 64-bit integer types.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>