Commit Graph

103847 Commits

Author SHA1 Message Date
Neil Roberts cd4a14be06 spirv: Handle XFB variable decorations
These set the new explicit XFB members on nir_variable.

This is needed to support ARB_gl_spirv, as Vulkan doesn't support
transform feedback.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-07-31 13:18:28 +02:00
Neil Roberts a5ec8461f9 spirv: Handle SpvExecutionModeXfb
This just sets has_transform_feedback_varyings on the shader.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-07-31 13:18:28 +02:00
Neil Roberts 3fd5b4c7aa nir: Add members for the explicit XFB properties to nir_variable
These are copied from the from the corresponding values in
ir_variable. The intention is to eventually use them in a pure-NIR
linker.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-07-31 13:18:28 +02:00
Christian Gmeiner e1d4882d05 etnaviv: fix typo in query names
Fixes: d0bed0b494 ("etnaviv: support HI performance counters")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Chris Healy <cphealy@gmail.com>
2018-07-31 08:33:32 +02:00
Tapani Pälli 553af7a190 mesa: fix a typo (trivial)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2018-07-31 08:19:38 +03:00
Tapani Pälli ce80abbb17 mesa: add glRenderbufferStorage support for EXT_texture_norm16 formats
These bits were missing, found when extending the Piglit test.

Fixes: 7f467d4f73 "mesa: GL_EXT_texture_norm16 extension plumbing"
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2018-07-31 08:19:10 +03:00
David Riley f94681b6e2 egl/surfaceless: Allow DRMless fallback.
Allow platform_surfaceless to use swrast even if DRM is not available.
To be used to allow a fuzzer for virgl to be run on a jailed VM without
hardware GL or DRM support.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Signed-off-by: David Riley <davidriley@chromium.org>
2018-07-30 19:40:45 -07:00
David Riley b169b84be6 egl/surfaceless: Define DRI_SWRastLoader extension when using swrast.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
[chadv: Dropped spurious hunk]
Reviewed-by: Chad Versace <chadversary@chromium.org>
2018-07-30 19:40:08 -07:00
Eric Anholt d934492ff9 v3d: Dump the contents off all the buffers in CLIF mode.
A V3D_DEBUG=clif file from a non-texturing .shader_test can now be
successfully run through the CLIF runner in the simulator.  Now I need to
build an open source CLIF runner against the v3d DRM module.
2018-07-30 14:29:01 -07:00
Eric Anholt 99a5ac250b v3d: Split walking the CLs to generate relocs from walking CLs to dump.
We need to dump each buffer's contents in order for a CLIF file, so we
need to collect all of the relocs into a buffer (such as the indirect CL
full of both uniforms and GL shader states) before we start dumping.
2018-07-30 14:29:01 -07:00
Eric Anholt 2df6f1a3df v3d: Include commands to run the BCL and RCL in CLIF dumps. 2018-07-30 14:29:01 -07:00
Eric Anholt c6449e33e3 v3d: Use a short, underscored name for packets in CLIF/CL dumping.
These will match the names that the CLIF parser expects to see.  I may in
the future decide to change more of the other names so that I match the
names the HW/closed SW team uses for their packets, rather than the names
in the spec (which only they and I can read anyway).
2018-07-30 14:29:01 -07:00
Eric Anholt b56f8c475e v3d: Rename "configuration" and "config" in the XML to "cfg"
This matches what CLIF parsing expects, and makes
TILE_BINNING_MODE_CONFIGURATION_COMMON_CONFIGURATION into a much more
legible TILE_BINNING_MODE_CFG_COMMON.
2018-07-30 14:29:01 -07:00
Eric Anholt 300e609feb v3d: s/colour/color in the XML.
The CLIF format expects american english spelling, and the rest of Mesa is
too.  I was previously adhering to the spec's spelling, which is
counterproductive.
2018-07-30 14:29:01 -07:00
Eric Anholt 3a8550ad06 v3d: Rename primitives to prims in the XML to match CLIF names.
This makes us match up with the V3D HW team's names a bit more.
2018-07-30 14:29:01 -07:00
Eric Anholt 6237c64049 v3d: Print CLIF fixed-point values as just their decimal value.
The parser doesn't handle float input, so we have to dump the raw value.
2018-07-30 14:29:01 -07:00
Eric Anholt 8da47b7648 v3d: When not doing terminal pretty-printing, comment struct field names.
The struct field names aren't part of the CLIF ABI, just the order of
fields within the struct.  The comments are there for human readability.
2018-07-30 14:29:01 -07:00
Eric Anholt 103f21b13d v3d: Add a separate flag for CLIF ABI output versus human-readable CLs.
A few of the upcoming changes would make the V3D_DEBUG=cl output less
readable, so let's make proper CLIF file production be under a separate
V3D_DEBUG=clif flag.
2018-07-30 14:29:01 -07:00
Eric Anholt 89ac6fa403 v3d: Add pack header support for f187 values.
V3D only has one of these (the top 16 bits of a float32) left in its CLs,
but VC4 had many more.  This gets us proper pretty-printing of the values
instead of a large uint.
2018-07-30 14:29:01 -07:00
Eric Anholt e146e3a795 v3d: Move depth offset packet setup to CSO creation time.
This should be some simpler memcpying at draw time, and makes the next
change easier.
2018-07-30 14:29:01 -07:00
Dave Airlie 9039cf70fa r600: reduce num compute threads to 1024.
I copied this value from radeonsi, but it was wrong, 1024
seems to be correct answer from looking at gpuinfo.

This should fix a few compute shader related hangs. (at least in CTS)

Cc: <mesa-stable@lists.freedesktop.org>
(airlied: pushed because it avoids hangs)
2018-07-31 04:55:38 +10:00
Rob Clark 0ea243dcd5 freedreno/a5xx: fix txf_ms
Somehow this got lost from the initial MSAA patch.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-07-30 12:31:05 -04:00
Rhys Perry f310e86a42 nvc0: serialize before updating some constant buffer bindings on Maxwell+
To avoid serializing, this has the user constant buffer always be 65536
bytes and enabled unless it's required that something else is used for
constant buffer 0.

Fixes artifacts with at least XCOM: Enemy Within, 0 A.D. and Unigine
Valley, Heaven and Superposition.

v2: changed uniform_buffer_bound to be bool instead of a uint32_t
v3: remove magic constants
v3: remove pointless code in nvc0_validate_driverconst

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100177
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-07-30 15:04:26 +01:00
Eric Anholt 0a3f653180 v3d: Block bin on render when doing vertex texturing.
The kernel by default serializes the BCL on previous BCLs submitted on
this FD, but not RCLs.  For now this fix is conservative and blocks on
last RCL if any vertex texturing is done, which fails to get bin/render
overlap if there was an intermediate job that doesn't draw to the BCL's
buffer.  I've dropped a perf_debug() in here to note that as a potential
future improvement.

Fixes intermittent failures in
KHR-GLES3.copy_tex_image_conversions.required.*
2018-07-29 19:25:39 -07:00
Eric Anholt 34cefa7fe0 v3d: Fix meson build without vc4. 2018-07-29 19:22:33 -07:00
Eric Anholt 27f1bfe471 vc4: Fix meson build when enabled without v3d.
Reported-by: Rob Clark <robdclark@gmail.com>
Fixes: e92959c4e0 ("v3d: Pass the whole clif_dump structure to v3d_print_group().")
2018-07-29 19:13:29 -07:00
Jason Ekstrand 05fb2f88ec nir/instr_set: Fix nir_instrs_equal for derefs
We weren't returning at the end of the nir_isntr_type_deref case in
nir_instrs_equal and it was falling through to the default of false.
While we're at it, make the default unreachable because all statements
in the switch now have their own returns.  Had we done that before, we
would have caught this bug a long time ago.

Fixes: 19a4662a54 "nir: Add a deref instruction type"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Thomas Helland<thomashelland90@gmail.com>
2018-07-29 13:39:35 -07:00
Jason Ekstrand 9a4ab4c120 nir: Take if uses into account in ssa_def_components_read
Fixes: d800b7daa5 "nir: Add a helper for figuring out what..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-07-29 13:39:35 -07:00
Jason Ekstrand 5c1c6939ce util/list: Make some helpers take const lists
They're all just querying things about the list and not mutating
anything.

Reviewed-by: Thomas Helland<thomashelland90@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-07-29 13:39:35 -07:00
Rob Clark 0ddae4acae freedreno/a5xx: small cleanup
We no longer have semi-custom clear pipe that uses 3d state.  Normal
clears happen via hw blitter, and everything else uses u_blitter these
days.  So we don't need this hack.

TODO a3xx+a4xx could get same treatment.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-07-29 14:00:06 -04:00
Rob Clark 3932db0f7e freedreno/a5xx: remove unused prototype
Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-07-29 13:50:19 -04:00
Rob Clark 104a49f166 freedreno: fix caps harder
Fixes: 868ca81c and f485e567
Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-07-29 13:48:22 -04:00
Karol Herbst bc0e0c2818 nir/lower_int64: mark all metadata as dirty
v2: use nir_metadata_preserve
    preserve metadata in case of !progress

Fixes: 074f5ba0b5
       "nir: Add a simple int64 lowering pass"
Signed-off-by: Karol Herbst <kherbst@redhat.com>
2018-07-28 19:59:28 +02:00
Mauro Rossi 0ca153f869 android: radv: enable build of vulkan.radv HAL module
src/amd/Android.mk requires to include src/amd/vulkan/Android.mk
to enable the build of vulkan.radv module

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-07-28 12:40:14 +02:00
Mauro Rossi 212af3c9ea android: radv: add Android.mk for vulkan.radv HAL module
radv implements the Android Vulkan HAL interface, this patch adds
Android.mk building rules by porting of radv automake rules.
vendor HAL module is installed as /vendor/lib/hw/vulkan.radv.so

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-07-28 12:40:07 +02:00
Mauro Rossi 1eb65c51ad radv: generate entrypoints for VK_ANDROID_native_buffer
Patch changes radv entrypoints generator to not skip this extension even
though it is set as disabled in the vk.xml

Reference: 63525ba730 ("android: enable VK_ANDROID_native_buffer")
Fixes: 69f447553c ("vulkan: Drop vk_android_native_buffer.xml")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-07-28 12:39:57 +02:00
Mauro Rossi c67b36c8a1 radv: move vk_format_table.c to generated sources
Android build system will try to compile vk_format_table.c
as a shipped source, but at compile time it will be missing,
we move it to generated source, where it belongs

Fixes: f4e499ec79 ("radv: add initial non-conformant radv vulkan driver")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-07-28 12:39:49 +02:00
Brian Paul b4bda6e066 xlib: fix build break from _swrast_map_soft_renderbuffer() call
We need to pass the new flip_y argument.

Reviewed-by: Clayton Craft <clayton.a.craft@intel.com>
2018-07-27 21:21:24 -06:00
Brian Paul 90b189e5d2 swrast: fix crash in AA line code when there's no texture
Fixes a crash running the Piglit polygon-mode-facing test (and
probably others).

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2018-07-27 21:21:24 -06:00
Brian Paul ce0f42dfe4 mesa: add switch case for GL 2.1 in _mesa_compute_version()
The xlib/swrast driver only supports GL 2.1.  This patch fixes a
crash if the app calls glGetString(GL_SHADING_LANGUAGE_VERSION).

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2018-07-27 21:21:24 -06:00
Brian Paul 4f51e8880d tgsi: whitespace fixes in tgsi_ureg.c
Trivial.
2018-07-27 21:21:24 -06:00
Brian Paul f02243541d gallium/util: whitespace fixes in u_inlines.h
Trivial.
2018-07-27 21:21:24 -06:00
Brian Paul 4216a1d0a8 svga: whitespace fixes in svga_tgsi_decl_sm30.c
Trivial.
2018-07-27 21:21:24 -06:00
Brian Paul 2f1af8549d mesa: replace tabs with spaces in mipmap.c
Trivial.
2018-07-27 21:21:24 -06:00
Brian Paul f39840f866 gallium/util: whitespace fixes in u_debug_memory.c
Trivial.
2018-07-27 21:21:24 -06:00
Brian Paul 2261d6a403 mesa: whitespace clean-up in texstore.c
Trivial.
2018-07-27 21:21:24 -06:00
Brian Paul a67b629193 mesa: move var decls in texstore_rgba()
Move them closer to where they're first used.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2018-07-27 21:21:24 -06:00
Brian Paul 5e2582b381 mesa: remove unneeded free() call in texstore_rgba()
The pointer will always be NULL since that's what we just tested for.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2018-07-27 21:21:24 -06:00
Eric Anholt 942456f646 v3d: Skip printing sub-id or pad fields in CLIF dumping.
The parser doesn't expect them, so our fields would end up mismatched.
They're not really useful in console output, either.
2018-07-27 18:00:48 -07:00
Eric Anholt 3ee0ab599e v3d: Emit commands to switch CLIF parser to CL/shader/attr input mode.
By default after saying you are emitting a buffer, it'll expect a buffer
size.  Once you set a format, it'll keep parsing that format until you
announce something else.
2018-07-27 18:00:46 -07:00