Commit Graph

130998 Commits

Author SHA1 Message Date
Vinson Lee 50175716d2 microsoft/compiler: Add dxil_nir_lower_16bit_conv prototype.
Fix missing-prototypes build error.

src/microsoft/compiler/dxil_nir_algebraic.c:5761:1: error: no previous prototype for ‘dxil_nir_lower_16bit_conv’ [-Werror=missing-prototypes]
 5761 | dxil_nir_lower_16bit_conv(nir_shader *shader)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: b9c61379ab ("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7559>
2020-11-11 12:09:52 -08:00
Vinson Lee c432d4814a glsl: Fix typos in comments.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7415>
2020-11-11 19:22:08 +00:00
Vinson Lee e7aa3cf828 glsl: Initialize ir_variable member field data.is_xfb.
Fix defect reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member field data.is_xfb is not
initialized in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7414>
2020-11-11 18:59:43 +00:00
Vinson Lee 904dcfd914 draw: Clean up single-use goto statements.
Suggested-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7389>
2020-11-11 18:36:37 +00:00
Jason Ekstrand e9caba6ce5 intel/fs: Fix use of undefined value in fixup_nomask_control_flow
Fixes: a8ac0bd759 "intel/fs/gen12: Workaround unwanted SEND execution..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7536>
2020-11-11 17:42:47 +00:00
Eric Anholt dd34d28de7 ci/db410c: Fix networking so we get artifacts from our jobs.
Seems some sort of linux change (bugfix?) resulted in the db410cs
selecting device mode for the db410cs due to the micro cable being
plugged in (fastboot runs them in device mode), so we weren't finding
the network and getting artifacts out.

Closes: #3728
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6971>
2020-11-11 17:22:47 +00:00
Eric Anholt f6ccaca36e ci: Re-enable the clip_three test on non-freedreno ARMs.
I'm surprised these were listed as flaky instead of xfails, since I would
have expected them to always fail given my experience on freedreno and
broadcom.  But let's try turning them back on and see if it's actually
flaky since the test has been fixed.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6971>
2020-11-11 17:22:47 +00:00
Eric Anholt c189d385ce ci: Bump deqp to current vulkan-cts-1.2.4
I want the new version to show the fix in the fd-largeconsts branch (and
make sure the pass keeps working, and make sure other drivers get around
to fixing the issue).  While I'm here, cherry-pick in the VK test along
with the GLES one, and also the fix for clip_three on ARMs.

Since the VK and GL test lists were changing, I took the opportunity to
reset freedreno xfails lists to just the tests that are being run with the
CTS uprev, and increase its coverage to 1/10th of the CTS across two
boards (since we just freed up a bunch of runtime with the grouped gles
"other" job).

For panfrost, I didn't spend the time characterizing the t720 fragment_ops
flakes like I did for the deqp-runner change.  Given that the random
behavior changes between CTS versions, it doesn't seem to be worth the
time to do so.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6971>
2020-11-11 17:22:47 +00:00
Eric Anholt 6bc35c00e2 ci/deqp: Allow specifying the caselist fraction separate from CI_NODE_INDEX.
To increase our VK coverage on a630, we want to have two jobs in parallel,
but we still can't hit full coverage so we need the fractional setting to
be separate from gitlab CI's flags for setting up parallel jobs.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6971>
2020-11-11 17:22:47 +00:00
Eric Anholt 2998a0b055 ci/freedreno: Group the short a630 dEQP runs into one test job.
This saves the minute and a half boot time on each of these minute-or-less
test jobs.  The whole job was 3.5 minutes in my last run.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6971>
2020-11-11 17:22:47 +00:00
Eric Anholt bf576b449e ci: Only install kernel modules for LAVA devices.
The recent change to install kernel modules for AMD included a sed job to
disable kernel modules in the defconfig.  This somehow broke booting on
a307, except the commit failed to bump the arm64_test tag so it wasn't
noticed until the next uprev. (I didn't notice when landing the next
change to that container to add the deqp runner, because I didn't get a
git conflict on rebasing my tag bump so I didn't bump the tag again to
pull in the kernel changes and catch the fail).

I've spent a while trying to debug what's happened (including what
*should* be a replication of the kernel build on my local db410c) and come
up empty.  Just punt and disable the AMD kernel module changes on
baremetal to fix it.  Bump every container using lava_build.sh to make
sure we don't screw anything up with the script changes.

Fixes: 60c5729d16 ("ci: Distribute ADMGPU driver to LAVA as a module")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6971>
2020-11-11 17:22:47 +00:00
Eric Anholt 737d2b704b ci: Move the rust cleanup in lava_build out of the middle of kernel build.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6971>
2020-11-11 17:22:47 +00:00
Eric Anholt eda3e4e055 nir/builder: Add a name format arg to nir_builder_init_simple_shader().
This cleans up a bunch of gross sprintfs and keeps the caller from needing
to remember to ralloc_strdup.  I added a couple of '"%s", name ? name :
""' to radv where I didn't fully trace through whether a non-null name was
being passed in.

I also took the liberty of adding a basic name to a few shaders (pan_blit,
unit tests)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
2020-11-11 08:50:29 -08:00
Eric Anholt 5f992802f5 nir/builder: Drop the mem_ctx arg from nir_builder_init_simple_shader().
This looks a lot more simple now!

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
2020-11-11 08:50:29 -08:00
Eric Anholt ef5bce9253 intel: Drop the last uses of a mem_ctx in nir_builder_init_simple_shader().
These two consumers were the only ones out of the ~65 calls to
init_simple_shader, so there's a pretty clear consensus on how to allocate
simple shaders.  I suspect that actually these would be just fine with
b.shader being the mem_ctx, but that would take a bit more rework.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
2020-11-11 08:50:27 -08:00
Eric Anholt 2f372572a1 nir/tests: Simplify the mem_ctx setup in our unit tests.
These all make a simple shader and free it at the end, that can be our
mem_ctx.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
2020-11-11 08:49:58 -08:00
Eric Anholt 5b9c7586f4 nir/builder_tests: Drop unused lin_ctx.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
2020-11-11 08:49:56 -08:00
Eric Anholt 4e9328e3b6 nir_builder: Return a new builder from nir_builder_init_simple_shader().
It's a little inline function, so we can just RAII it for better
ergonomics.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323>
2020-11-11 08:49:49 -08:00
Samuel Pitoiset 1aa1c1aec2 nir/algebraic: optimize bitfield_select(a, iand(a, b), c)
fossils-db (Vega10):
Totals from 242 (0.17% of 139517) affected shaders:
CodeSize: 853752 -> 852752 (-0.12%)
Instrs: 165944 -> 165694 (-0.15%)
Cycles: 855720 -> 854528 (-0.14%)
VMEM: 83772 -> 83668 (-0.12%); split: +0.13%, -0.25%
SMEM: 12360 -> 12316 (-0.36%)
SClause: 8222 -> 8238 (+0.19%)

Only helps Control.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7531>
2020-11-11 15:28:01 +01:00
James Jones 68d70fb969 gallium: Add format modifier plane count query
Rather than hard-code a list of all the format
modifiers supported by any gallium driver and the
number of aux planes they require in the dri state
tracker, add a screen proc that queries the number
of planes required for a given modifier+format
pair.

Since the only format modifiers that require
auxiliary planes currently are the iris driver's
I915_FORMAT_MOD_Y_TILED_CCS,
I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS, and
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS, the absence
of the screen proc implies zero aux planes for all
of the screen's supported modifiers.  Hence, when
a driver does not expose the proc, derive the
number of planes directly from the format.

Signed-off-by: James Jones <jajones@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3723>
2020-11-11 10:51:37 +00:00
James Jones 6ee10ab3de gallium: Add pipe_screen::is_dmabuf_modifier_supported
Add a "do you support this modifier?" query to all
drivers which support format modifiers. This will
be used in a subsequent change to fully
encapsulate modifier validation and auxiliary plane
count calculation logic behind the driver
abstraction, which will in turn simplify the
addition of device-class-specific format modifiers
in the nouveau driver.

Signed-off-by: James Jones <jajones@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3723>
2020-11-11 10:51:37 +00:00
Duncan Hopkins 40e3eb9be9 mesa: Undefine ALIGN macro before it is used as a function name. Issues on MacOS.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7469>
2020-11-11 09:09:45 +00:00
Steven Houston d6a8a6ed4e v3dv: VK_KHR_display extension support
When VK_KHR_display is enabled it needs to open the primary
node on the vc4/vc5 display device, so pass it to
physical_device_init().
Extension functions call through to the wsi_common_display.c
implementations.

v2: Follow Mesa conventions for comments and char *
    Refer to vc4 display device in comments.
v3: Added Copyright © 2020 Raspberry Pi
v4: Test device has primary node when using simulator.
v5: Assert that we have a primary device. Fix trailing blank space.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3692
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7515>
2020-11-11 08:36:05 +00:00
Dave Airlie d186766c08 llvmpipe: just use draw_regions in draw/line setup.
This fixes:
dEQP-VK.draw.scissor*

Cc: 20.3 <mesa-stable>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7499>
2020-11-11 08:14:44 +00:00
Dave Airlie 01c4bac36e lavapipe: disable SNORM blending for now
dEQP-VK.pipeline.blend.dual_source.format.r16g16b16a16_snorm.states.color_1msc_1ms1a_add_alpha_1mdc_1msa_sub-color_dc_1ms1c_rsub_alpha_z_1mdc_sub-color_ca_1ms1c_min_alpha_sas_ca_rsub-color_1ms1c_s1c_add_alpha_z_1mda_add,Fail
dEQP-VK.pipeline.blend.dual_source.format.r8g8_snorm.states.color_z_sc_add_alpha_1ms1c_sa_min-color_dc_1mca_add_alpha_z_1mca_max-color_1ms1c_sa_max_alpha_1mcc_sc_sub-color_s1c_1mda_add_alpha_s1c_1mda_add,Fail
dEQP-VK.pipeline.blend.dual_source.format.r8g8b8a8_snorm.states.color_1msc_1ms1a_add_alpha_1mdc_1msa_sub-color_dc_1ms1c_rsub_alpha_z_1mdc_sub-color_ca_1ms1c_min_alpha_sas_ca_rsub-color_1ms1c_s1c_add_alpha_z_1mda_add,Fail
dEQP-VK.pipeline.blend.dual_source.format.r8g8b8a8_snorm.states.color_z_sc_add_alpha_1ms1c_sa_min-color_dc_1mca_add_alpha_z_1mca_max-color_1ms1c_sa_max_alpha_1mcc_sc_sub-color_s1c_1mda_add_alpha_s1c_1mda_add,Fail
dEQP-VK.pipeline.blend.format.r16g16b16a16_snorm.states.color_ca_1mca_rsub_alpha_1mda_z_sub-color_sc_sc_add_alpha_1mca_sa_max-color_sa_1msa_min_alpha_1msc_sa_sub-color_dc_sc_add_alpha_1mdc_1mca_add,Fail
dEQP-VK.pipeline.blend.format.r8g8b8a8_snorm.states.color_ca_1mca_rsub_alpha_1mda_z_sub-color_sc_sc_add_alpha_1mca_sa_max-color_sa_1msa_min_alpha_1msc_sa_sub-color_dc_sc_add_alpha_1mdc_1mca_add,Fail

All fail due to the 1 - mdc or 1 - mca alpha channel in the last quadrant.

Cc: 20.3 <mesa-stable>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7499>
2020-11-11 08:14:44 +00:00
Dave Airlie a04a146560 lavapipe: enable alpha to one.
CTS seems fine with this.

Cc: 20.3 <mesa-stable>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7499>
2020-11-11 08:14:44 +00:00
Dave Airlie ea034c981b u_blitter: port radv 3D blit coords logic.
The current code fails a lot of VK CTS tests, this fixes them all:
dEQP-VK*blit_image*3d*

Cc: 20.3 <mesa-stable>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7499>
2020-11-11 08:14:44 +00:00
Dave Airlie 4b1d23b243 gallium: handle empty cbuf slots in framebuffer samples helper
If we have cbufs but they are all empty, default
to returning the fb->samples.

Fixes:
dEQP-VK.pipeline.multisample.mixed_count.1_4_unused
on lavapipe

v2:
drop unneeded chunk (Roland)

Cc: 20.3 <mesa-stable>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7499>
2020-11-11 08:14:44 +00:00
Iago Toral Quiroga 46d2f2224f zink: only add MESA WSI structs for specific devices
Some drivers will drop warnings about seeing these structs in the
pNext chain and not handling them. This change makes it so we
only include the structs with Vulkan drivers that are known to
require them for proper behavior (v3dv only for now) to avoid the
warnings.

It should be noted that here we are only supressing the messages
from Zink. Since the Mesa Vulkan WSI code will include these structs,
when native Vulkan Mesa drivers are used without Zink they might
still dump these messages.

Requested by Mike Blumenkrantz.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7523>
2020-11-11 08:16:32 +01:00
Eric Anholt eba97645c9 nir/validate: Size the set of blocks to avoid rehashing.
We can use num_blocks (if it's been initialized by some pass indexing
blocks) to pre-size our table, which helps on validating shaders with many
blocks which would otherwise reallocate the set several times.

No statistically significant performance difference on softpipe
KHR-GL33.texture_swizzle.functional runtime (n=15).  A previous, similar
variant of this patch cut .3% of instructions in softpipe shader-db ./run
shaders/closed/steam/borderlands-2/35* (an arbitrary set of shaders that
completed in reasonable amount of time) according to callgrind.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7244>
2020-11-10 22:18:31 +00:00
Eric Anholt 2afdd94f86 util/set: Fix the _mesa_set_clear function to not leave tombstones.
This implementation was broken and should have just been the same as the
hash_table_clear() one, which I copied over here.  It was setting all
formerly-present entries to deleted, yet also setting deleted_entries to
0.  This meant that all new searches or additions after clearing would
have to reprobe the whole table until a rehash happened, and that rehash
would be delayed because we violated the deleted_entries invariant.

No statistically significant performance difference on softpipe
KHR-GL33.texture_swizzle.functional runtime (n=18)

Fixes: 5c075b0855 ("util/set: add a set_clear function")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7244>
2020-11-10 22:18:31 +00:00
Eric Anholt 4618ca82c3 util/hash_table: Clean up the _mesa_hash_table_clear() implementation.
Use the entry_is_present() helper to clarify what's going on with
deletion, and then we can remove the special continue for NULL since we're
just writing NULL anyway (which the CPU cache will elide for us).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7244>
2020-11-10 22:18:31 +00:00
Eric Anholt 9c5422c7dd util/hash_table: Handle NULL ht in _mesa_hash_table_clear().
This is the one useful bit of _mesa_set_clear() that wasn't in
_mesa_hash_table_clear().

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7244>
2020-11-10 22:18:31 +00:00
Dave Airlie 3a512c34d2 clover: add support for opencl C features
This adds support to the compiler and api for this CL 3.0 feature.

fixes CTS compiler features_macro

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:30:26 +10:00
Pierre Moreau f1b91177fb clover/spirv: avoid strings for version handling
This is extracted from Pierre's WIP versioning patch.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:30:26 +10:00
Pierre Moreau 330c524762 clover/llvm: don't use strings for version handling.
This is extracted from Pierre's WIP versioning patch.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:59 +10:00
Dave Airlie b8a96199cb clover: add platform supported extensions with version
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:54 +10:00
Dave Airlie 940e479d7d clover: add support for versioned device extensions
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:48 +10:00
Dave Airlie 3a9fa5b36d clover: report device CLC versions for 3.0
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:44 +10:00
Dave Airlie 5444918098 clover: add CL_PLATFORM_NUMERIC_VERSION support
This is part of CL 3.0

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:39 +10:00
Dave Airlie 019130ed71 clover/platform: move versioning to core object.
This reads the env var once at constructor time and stores it
in the platform object.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:33 +10:00
Dave Airlie 2a3a0322ae clover: add CL 3.0 CL_DEVICE_NUMERIC_VERSION support
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:29 +10:00
Dave Airlie 981f8d7252 clover/device: store version in device at constructor.
This reads the env vars once and stores the value, and converts
to strings when needed

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:19 +10:00
Dave Airlie 297ad1bbb3 util: add a env getter for versions
This lets us parse a standard major.minor version.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:08:15 +10:00
Pierre Moreau 7507ce1db4 clover: rename platform/device apis using strings
Just add as_string to these to faciliate the non-string ones.

(extracted by airlied from pmoreau patch).

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7520>
2020-11-11 06:07:54 +10:00
Karol Herbst 20a3ec2d77 clover/queue: Flush automatically if applications do not flush themselves
With the image_read_write OpenCL CTS we can get a stack overflow handling
all the events as the application itself never flushes.

We need to address this in two ways:
1. flush the queue once an abritary amoung of events piled up.
2. Drop event deps once they get a fence assigned.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7460>
2020-11-10 19:28:26 +00:00
Rob Clark e8a1aa9e94 mesa/bufferobj: Fix valgrind complaints
==328537== Mutex reinitialization: mutex 0x1281afb0, recursion count 0, owner 0.
==328537==    at 0x486FD34: pthread_mutex_init_intercept (drd_pthread_intercepts.c:826)
==328537==    by 0x486FD34: pthread_mutex_init (drd_pthread_intercepts.c:835)
==328537==    by 0x117DA107: mtx_init (threads_posix.h:207)
==328537==    by 0x117DA2BB: simple_mtx_init (simple_mtx.h:132)
==328537==    by 0x117DB86B: _mesa_init_buffer_objects (bufferobj.c:878)
==328537==    by 0x117E8C6F: init_attrib_groups (context.c:840)
==328537==    by 0x117E942F: _mesa_initialize_context (context.c:1225)
==328537==    by 0x1173C323: st_create_context (st_context.c:1019)
==328537==    by 0x11720A9F: st_api_create_context (st_manager.c:930)
==328537==    by 0x1170E2CF: dri_create_context (dri_context.c:163)
==328537==    by 0x11FB9DC3: driCreateContextAttribs (dri_util.c:480)
==328537==    by 0x8E9D3DF: dri3_create_context_attribs (dri3_glx.c:316)
==328537==    by 0x8E9D49B: dri3_create_context (dri3_glx.c:347)
==328537== mutex 0x1281afb0 was first observed at:
==328537==    at 0x486FD34: pthread_mutex_init_intercept (drd_pthread_intercepts.c:826)
==328537==    by 0x486FD34: pthread_mutex_init (drd_pthread_intercepts.c:835)
==328537==    by 0x117DA107: mtx_init (threads_posix.h:207)
==328537==    by 0x117DA2BB: simple_mtx_init (simple_mtx.h:132)
==328537==    by 0x117DB86B: _mesa_init_buffer_objects (bufferobj.c:878)
==328537==    by 0x117E8C6F: init_attrib_groups (context.c:840)
==328537==    by 0x117E942F: _mesa_initialize_context (context.c:1225)
==328537==    by 0x1173C323: st_create_context (st_context.c:1019)
==328537==    by 0x11720A9F: st_api_create_context (st_manager.c:930)
==328537==    by 0x1170E2CF: dri_create_context (dri_context.c:163)
==328537==    by 0x11FB9DC3: driCreateContextAttribs (dri_util.c:480)
==328537==    by 0x8E9D3DF: dri3_create_context_attribs (dri3_glx.c:316)
==328537==    by 0x8E9D49B: dri3_create_context (dri3_glx.c:347)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7517>
2020-11-10 18:57:55 +00:00
Rob Clark f5ea96b584 mesa/fbo: Fix valgrind complaints
Just statically initialize the dummy/incomplete framebuffer/renderbuffer
to avoid re-intializing their mutex.

==328537== Mutex reinitialization: mutex 0x1281bd28, recursion count 0, owner 0.
==328537==    at 0x486FD34: pthread_mutex_init_intercept (drd_pthread_intercepts.c:826)
==328537==    by 0x486FD34: pthread_mutex_init (drd_pthread_intercepts.c:835)
==328537==    by 0x118F9727: mtx_init (threads_posix.h:207)
==328537==    by 0x118F983B: simple_mtx_init (simple_mtx.h:132)
==328537==    by 0x118FA087: _mesa_init_fbobjects (fbobject.c:93)
==328537==    by 0x117E8CB7: init_attrib_groups (context.c:849)
==328537==    by 0x117E942F: _mesa_initialize_context (context.c:1225)
==328537==    by 0x1173C323: st_create_context (st_context.c:1019)
==328537==    by 0x11720A9F: st_api_create_context (st_manager.c:930)
==328537==    by 0x1170E2CF: dri_create_context (dri_context.c:163)
==328537==    by 0x11FB9DC3: driCreateContextAttribs (dri_util.c:480)
==328537==    by 0x8E9D3DF: dri3_create_context_attribs (dri3_glx.c:316)
==328537==    by 0x8E9D49B: dri3_create_context (dri3_glx.c:347)
==328537== mutex 0x1281bd28 was first observed at:
==328537==    at 0x486FD34: pthread_mutex_init_intercept (drd_pthread_intercepts.c:826)
==328537==    by 0x486FD34: pthread_mutex_init (drd_pthread_intercepts.c:835)
==328537==    by 0x118F9727: mtx_init (threads_posix.h:207)
==328537==    by 0x118F983B: simple_mtx_init (simple_mtx.h:132)
==328537==    by 0x118FA087: _mesa_init_fbobjects (fbobject.c:93)
==328537==    by 0x117E8CB7: init_attrib_groups (context.c:849)
==328537==    by 0x117E942F: _mesa_initialize_context (context.c:1225)
==328537==    by 0x1173C323: st_create_context (st_context.c:1019)
==328537==    by 0x11720A9F: st_api_create_context (st_manager.c:930)
==328537==    by 0x1170E2CF: dri_create_context (dri_context.c:163)
==328537==    by 0x11FB9DC3: driCreateContextAttribs (dri_util.c:480)
==328537==    by 0x8E9D3DF: dri3_create_context_attribs (dri3_glx.c:316)
==328537==    by 0x8E9D49B: dri3_create_context (dri3_glx.c:347)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7517>
2020-11-10 18:57:55 +00:00
Mike Blumenkrantz 9cef302aa0 util/threaded_context: use driver's ubo alignment for constant buffer uploads
this is another case where the hardcoded value was specific to radeon drivers

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7475>
2020-11-10 18:28:35 +00:00
Rob Clark cb034ae44f freedreno: Protect gmem_cache ralloc allocations
Since the ralloc context for cache_key allocation is shared between all
the contexts hanging off a screen, we need to allocate the key under the
screen->lock.

Fixes: 91f9bb99c5 ("freedreno: add gmem state cache")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7342>
2020-11-10 17:58:45 +00:00