platform/upstream/mesa.git
3 years agoclover: implements clEnqueueMigrateMemObjects
Serge Martin [Sat, 9 May 2020 06:11:16 +0000 (08:11 +0200)]
clover: implements clEnqueueMigrateMemObjects

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974>

3 years agoetnaviv: Make sure to track different pipe_screens for different DRM device descriptions
Daniel Abrecht [Sat, 19 Sep 2020 15:21:36 +0000 (15:21 +0000)]
etnaviv: Make sure to track different pipe_screens for different DRM device descriptions

pipe_screens that are created used to be dedublicated directly based on the gpu device file.
If a process created two of them, for example by opening the etnaviv render node twice
and calling `gbm_create_device`, or by opening two card nodes which used kmsro, or any
combination of these things, then for any but the first instance, the gem handles created
for it would be for the first one instead of the intended one, due to them being created
using the same pipe_screen, and buffers allocated for kmsro devices would be allocated using
the wrong file description as well. This can lead to various problems, such as a proccess not
being able to use two cards which use kmsro at the same time, for example.

This patch changes the dedublication to be done based on the gpu device description
rather than based on the gpu device file. This will solve the above mentioned problem,
but there will now be only a few cases in which anything is dedublicated at all.

Signed-off-by: Daniel Abrecht <public@danielabrecht.ch>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6790>

3 years agopanfrost: Fix a warning
Boris Brezillon [Fri, 2 Oct 2020 13:08:04 +0000 (15:08 +0200)]
panfrost: Fix a warning

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7040>

3 years agopanfrost: bifrost: disassemble: Fix decoding of next_regs
Boris Brezillon [Wed, 7 Oct 2020 06:42:00 +0000 (08:42 +0200)]
panfrost: bifrost: disassemble: Fix decoding of next_regs

next_regs decoding is wrong for the first and last instructions in a
clause:
- the first instruction has its destination encoded in the second reg
  block
- the last instruction has its destination encoded in the first reg block
  (things wrap around)

So, only the last instruction should pass first=true when decoding
next_regs. Fix that by passing the is_last_instruction information
instead of is_first_instruction to the disasm helpers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7040>

3 years agoradv: remove trailing whitespace
Rhys Perry [Wed, 7 Oct 2020 09:59:36 +0000 (10:59 +0100)]
radv: remove trailing whitespace

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7043>

3 years agoaco: remove trailing whitespace
Rhys Perry [Wed, 7 Oct 2020 09:59:07 +0000 (10:59 +0100)]
aco: remove trailing whitespace

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7043>

3 years agoaco: more uses of nir_get_io_offset_src()
Samuel Pitoiset [Mon, 5 Oct 2020 09:30:39 +0000 (11:30 +0200)]
aco: more uses of nir_get_io_offset_src()

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/7003>

3 years agoaco: bail out if the NIR IO base offset isn't zero
Samuel Pitoiset [Mon, 5 Oct 2020 09:28:02 +0000 (11:28 +0200)]
aco: bail out if the NIR IO base offset isn't zero

nir_io_add_const_offset_to_base takes care of this.

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/7003>

3 years agoetnaviv: stop leaking the dummy texure descriptor BO
Lucas Stach [Fri, 11 Sep 2020 16:47:04 +0000 (18:47 +0200)]
etnaviv: stop leaking the dummy texure descriptor BO

Free the dummy texture descriptor BO on context destroy.

Fixes: eda73d71277a (etnaviv: GC7000: Texture descriptors)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6986>

3 years agointel/uuid: use git-sha1/package for the driver UUID
Juan A. Suarez Romero [Tue, 17 Mar 2020 10:14:08 +0000 (10:14 +0000)]
intel/uuid: use git-sha1/package for the driver UUID

We can't read information from the loaded shared object because we have
different objects for Vulkan and OpenGL drivers, but we need to share
the same UUID for both.

Hence let's use SHA1 from the Git commit and package version.

v2: use also package version for the case of building from tarball (Eric)
v3: fix typos in comment (Tapani)

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7025>

3 years agoiris: plumb device/driver UUID generators
Juan A. Suarez Romero [Thu, 26 Mar 2020 16:04:19 +0000 (17:04 +0100)]
iris: plumb device/driver UUID generators

Use the same generators as used in anv driver so both Vulkan and OpenGL
drivers can share the same external memory objects.

v2: removed extra parameter from function gen_uuid_compute_device_id

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7025>

3 years agointel: split driver/device UUID generators
Juan A. Suarez Romero [Wed, 7 Oct 2020 06:44:44 +0000 (09:44 +0300)]
intel: split driver/device UUID generators

We need Vulkan and GL to produce the same UUIDs. So move the generator
from ANV to a common code that can be shared by ANV and Iris driver.

v2: fix android build (Tapani)

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7025>

3 years agoturnip: Enable support for KHR_incremental_present
Eduardo Lima Mitev [Sun, 13 Sep 2020 14:56:13 +0000 (16:56 +0200)]
turnip: Enable support for KHR_incremental_present

All bits should already be provided by wsi/common.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6704>

3 years agoomx/tizonia: fix build
Pierre-Eric Pelloux-Prayer [Tue, 6 Oct 2020 12:29:15 +0000 (14:29 +0200)]
omx/tizonia: fix build

Fixes: 24f2b0a8560 ("gallium/video: remove pipe_video_buffer.chroma_format")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3595
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7026>

3 years agogallium/util: remove empty file u_half.h
Marek Olšák [Sat, 19 Sep 2020 18:11:02 +0000 (14:11 -0400)]
gallium/util: remove empty file u_half.h

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6987>

3 years agogallium/util: remove redundant util_float_to_half_rtz
Marek Olšák [Fri, 18 Sep 2020 10:00:06 +0000 (06:00 -0400)]
gallium/util: remove redundant util_float_to_half_rtz

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6987>

3 years agoutil: remove util_float_to_half and util_half_to_float wrappers
Marek Olšák [Fri, 18 Sep 2020 09:53:56 +0000 (05:53 -0400)]
util: remove util_float_to_half and util_half_to_float wrappers

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6987>

3 years agoutil: move util_half_to_float code into _mesa_half_to_float_slow
Marek Olšák [Fri, 18 Sep 2020 09:48:05 +0000 (05:48 -0400)]
util: move util_half_to_float code into _mesa_half_to_float_slow

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6987>

3 years agoutil: implement F16C using inline assembly on x86_64
Marek Olšák [Fri, 18 Sep 2020 09:21:09 +0000 (05:21 -0400)]
util: implement F16C using inline assembly on x86_64

F16C: https://en.wikipedia.org/wiki/F16C

This also happens to fix bptc-float-modes on llvmpipe.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6987>

3 years agonir/constant_folding: init nir_const_value to zero
Samuel Pitoiset [Tue, 6 Oct 2020 16:58:45 +0000 (18:58 +0200)]
nir/constant_folding: init nir_const_value to zero

To avoid NIR validation failures.

Fixes: 9df1ff36781 ("nir/constant_folding: Use the builder")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7035>

3 years agolavapipe: drop dri,dricommon deps.
Dave Airlie [Tue, 6 Oct 2020 06:31:11 +0000 (16:31 +1000)]
lavapipe: drop dri,dricommon deps.

This would be a step towards building elsewhere.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7019>

3 years agointel: drop likely/unlikely around INTEL_DEBUG
Marcin Ślusarz [Mon, 14 Sep 2020 16:53:41 +0000 (18:53 +0200)]
intel: drop likely/unlikely around INTEL_DEBUG

It's included in declaration of INTEL_DEBUG.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6732>

3 years agoanv: drop likely/unlikely around INTEL_DEBUG
Marcin Ślusarz [Mon, 14 Sep 2020 16:53:13 +0000 (18:53 +0200)]
anv: drop likely/unlikely around INTEL_DEBUG

It's included in declaration of INTEL_DEBUG.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6732>

3 years agoi965: drop likely/unlikely around INTEL_DEBUG
Marcin Ślusarz [Mon, 14 Sep 2020 16:52:02 +0000 (18:52 +0200)]
i965: drop likely/unlikely around INTEL_DEBUG

It's included in declaration of INTEL_DEBUG.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6732>

3 years agoiris: drop likely/unlikely around INTEL_DEBUG
Marcin Ślusarz [Mon, 14 Sep 2020 16:49:43 +0000 (18:49 +0200)]
iris: drop likely/unlikely around INTEL_DEBUG

It's included in declaration of INTEL_DEBUG.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6732>

3 years agointel: add INTEL_DEBUG expected value in declaration
Marcin Ślusarz [Mon, 14 Sep 2020 16:43:50 +0000 (18:43 +0200)]
intel: add INTEL_DEBUG expected value in declaration

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6732>

3 years agoanv: Add driconf option to disable compression for 16bpp format
Sagar Ghuge [Mon, 14 Sep 2020 22:52:11 +0000 (15:52 -0700)]
anv: Add driconf option to disable compression for 16bpp format

On Fallout4, enabling HIZ_CCS_WT compression for D16_UNORM format
regress the performance by 2%, in order to avoid that disable
compression via driconf option.

The experiment showed that, running Fallout4 with HIZ performs better
than HIZ_CCS and HIZ_CCS_WT. Reason behind that is the benchmark uses
the depth pass with D16_UNORM surfaces format which fills the L3 cache
and next pass doesn't make use of it where we end up clearing cache.

v2:
- Don't add conditional check in isl (Nanley, Jason)
- Move disable_d16unorm_compression flag to instance (Lionel)
- Use plane_format.isl_format (Nanley)

v3:
- Add more descriptive comment (Marcin Ślusarz)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6734>

3 years agoanv: Factor out dri option initialization code in separate function
Sagar Ghuge [Mon, 14 Sep 2020 19:21:41 +0000 (12:21 -0700)]
anv: Factor out dri option initialization code in separate function

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6734>

3 years agoclover/nir: extract constant buffer into its own section
Karol Herbst [Wed, 2 Sep 2020 18:45:26 +0000 (20:45 +0200)]
clover/nir: extract constant buffer into its own section

Fixes test_basic constant_source

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6569>

3 years agoclover: bind constant buffer if one is provided
Karol Herbst [Wed, 2 Sep 2020 18:36:41 +0000 (20:36 +0200)]
clover: bind constant buffer if one is provided

We will use that with NIR as it is easier to manage the constant buffer
inside clover instead of letting all drivers to deal with it.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6569>

3 years agoclover/util: add id_type_equals to support symbols with multiple sections
Karol Herbst [Wed, 2 Sep 2020 18:35:35 +0000 (20:35 +0200)]
clover/util: add id_type_equals to support symbols with multiple sections

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6569>

3 years agodriconf: Restore the ability to override driconf with the environment.
Eric Anholt [Mon, 5 Oct 2020 17:18:49 +0000 (10:18 -0700)]
driconf: Restore the ability to override driconf with the environment.

I distinctly remember testing this during development, yet clearly deleted
the code.

I pulled the parseValue code back up to the top where it used to be since
we have to use it, rather than just adding a prototype.

Fixes: 8a05d6ffc65d ("driconf: Make the driver's declarations be structs instead of XML.")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7012>

3 years agodriconf: Make sure that the range check on the defaults actually works.
Eric Anholt [Mon, 5 Oct 2020 17:33:28 +0000 (10:33 -0700)]
driconf: Make sure that the range check on the defaults actually works.

Fixes: 8a05d6ffc65d ("driconf: Make the driver's declarations be structs instead of XML.")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7012>

3 years agoCI: Re-enable Panfrost T7xx CI
Daniel Stone [Tue, 6 Oct 2020 15:49:10 +0000 (16:49 +0100)]
CI: Re-enable Panfrost T7xx CI

Lab maintenance is done now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7032>

3 years agogallium/u_threaded_context: fix use-after-free in transfer_unmap
Marek Olšák [Mon, 5 Oct 2020 16:02:19 +0000 (12:02 -0400)]
gallium/u_threaded_context: fix use-after-free in transfer_unmap

discovered by valgrind

Fixes: fd6a5e112aa

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6952>

3 years agogallium/u_threaded_context: always flush asynchronously if requested
Marek Olšák [Sat, 3 Oct 2020 08:12:47 +0000 (04:12 -0400)]
gallium/u_threaded_context: always flush asynchronously if requested

This can reduce overhead depending on whether st/mesa uses the ASYNC flag
and the app flushes often.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6952>

3 years agogallium/u_threaded_context: don't call memcpy in tc_set_constant_buffer
Marek Olšák [Mon, 28 Sep 2020 14:33:06 +0000 (10:33 -0400)]
gallium/u_threaded_context: don't call memcpy in tc_set_constant_buffer

In sysprof, the CPU time spend in tc_set_constant_buffer drops
from 7% to 1.4% in a release build. It doesn't make sense to me.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6952>

3 years agoradeonsi: implement GL_INTEL_blackhole_render
Marek Olšák [Mon, 21 Sep 2020 06:05:49 +0000 (02:05 -0400)]
radeonsi: implement GL_INTEL_blackhole_render

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agoradeonsi: remove dead variable postponed_kill
Marek Olšák [Sat, 19 Sep 2020 22:35:42 +0000 (18:35 -0400)]
radeonsi: remove dead variable postponed_kill

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agogallium/util: add set_frontend_noop into driver_noop and u_threaded_context
Marek Olšák [Mon, 21 Sep 2020 06:22:25 +0000 (02:22 -0400)]
gallium/util: add set_frontend_noop into driver_noop and u_threaded_context

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agoutil/idalloc: resize if ID is too large for reservation
Marek Olšák [Wed, 30 Sep 2020 17:44:52 +0000 (13:44 -0400)]
util/idalloc: resize if ID is too large for reservation

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agost/mesa: enable GL name reuse for queries based on the driconf option
Marek Olšák [Fri, 25 Sep 2020 19:15:53 +0000 (15:15 -0400)]
st/mesa: enable GL name reuse for queries based on the driconf option

Fixes: a56849ddda6

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agodriconf: enable force_glsl_extensions_warn for viewperf
Marek Olšák [Sat, 26 Sep 2020 11:50:07 +0000 (07:50 -0400)]
driconf: enable force_glsl_extensions_warn for viewperf

Discovered by Pierre-Eric Pelloux-Prayer.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agodriconf: force the vendor string to NVIDIA to fix viewperf energy tests
Marek Olšák [Sat, 26 Sep 2020 01:06:16 +0000 (21:06 -0400)]
driconf: force the vendor string to NVIDIA to fix viewperf energy tests

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agogl_marshal.py: inline print_sync_dispatch
Marek Olšák [Sat, 26 Sep 2020 00:20:19 +0000 (20:20 -0400)]
gl_marshal.py: inline print_sync_dispatch

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agomesa: factor out layout parsing for glInterleavedArrays
Marek Olšák [Sat, 26 Sep 2020 00:02:14 +0000 (20:02 -0400)]
mesa: factor out layout parsing for glInterleavedArrays

glthread will use it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7031>

3 years agonir/constant_folding: Fold load_deref of nir_var_mem_constant
Jason Ekstrand [Thu, 3 Sep 2020 19:14:03 +0000 (14:14 -0500)]
nir/constant_folding: Fold load_deref of nir_var_mem_constant

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6974>

3 years agonir: Validate constant initializers
Jason Ekstrand [Fri, 2 Oct 2020 07:14:36 +0000 (02:14 -0500)]
nir: Validate constant initializers

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6974>

3 years agonir/constant_folding: Use nir_shader_instruction_pass
Jason Ekstrand [Thu, 1 Oct 2020 23:29:08 +0000 (18:29 -0500)]
nir/constant_folding: Use nir_shader_instruction_pass

This gets rid of so much boilerplate...

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6974>

3 years agonir/constant_folding: Use the builder
Jason Ekstrand [Thu, 1 Oct 2020 23:25:37 +0000 (18:25 -0500)]
nir/constant_folding: Use the builder

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6974>

3 years agoradv: remove VkPipelineCacheCreateInfo::flags assert
Mike Blumenkrantz [Tue, 6 Oct 2020 14:14:33 +0000 (10:14 -0400)]
radv: remove VkPipelineCacheCreateInfo::flags assert

flags are handled, so this just crashes for no reason

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7030>

3 years agoiris: Fix a fast-clear skipping optimization
Nanley Chery [Tue, 29 Sep 2020 12:49:54 +0000 (05:49 -0700)]
iris: Fix a fast-clear skipping optimization

When support for multi-slice fast-clears was introduced for color
surfaces, an existing optimization for skipping fast-clears was not
updated (this optimization assumed single-slice fast-clears). As a
result, the driver began to skip multi-layer fast-clears if just the
first slice was in the CLEAR state (ignoring the state of the others).

A Civilization VI trace was the only workload I found to make use of
this optimization and it did so for 2D, non-array textures. Therefore,
this fix simply checks that the depth of the clear box is 1. It also
moves the single-slice aux-state query closer to the optimization to
clarify the need for the depth check.

Enables iris to pass a case of the fcc-write-after-clear piglit test,
[fast-clear tracking across layers 0 -> 1 -> (0,1)].

Fixes: 393f659ed83 ("iris: Enable fast clears on other miplevels and layers than 0.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6973>

3 years agoanv: remove VkPipelineCacheCreateInfo::flags assert
Mike Blumenkrantz [Tue, 6 Oct 2020 14:14:33 +0000 (10:14 -0400)]
anv: remove VkPipelineCacheCreateInfo::flags assert

flags are handled, so this just crashes for no reason

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7029>

3 years agointel/dev: add a small non installable tool to print device info
Lionel Landwerlin [Thu, 1 Oct 2020 10:05:20 +0000 (13:05 +0300)]
intel/dev: add a small non installable tool to print device info

Mostly for debug purposes.

$ ./build/src/intel/dev/intel_device_info
/dev/dri/renderD128:
   name: Intel(R) UHD Graphics 620 (WHL GT2)
   gen: 9
   PCI id: 0x3ea0
   revision: 2
   slice0.subslice0: 11111111
   slice0.subslice1: 11111111
   slice0.subslice2: 11111111
   slices: 1
   subslices: 3
   EUs: 24
   EU threads: 168
   LLC: 1
   threads per EU: 7
   L3 banks: 4
   max VS  threads: 336
   max TCS threads: 336
   max TES threads: 336
   max GS  threads: 336
   max WM  threads: 256
   max CS  threads: 56
   timestamp frequency: 12000000

v2: Missing license (Marcin)
    Fix stderr usage (Marcin)

v3: Reformat topology printing (Marcin)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6957>

3 years agozink: enable pipe caps for ARB_timer_query
Mike Blumenkrantz [Fri, 10 Jul 2020 18:47:32 +0000 (14:47 -0400)]
zink: enable pipe caps for ARB_timer_query

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6923>

3 years agozink: add pipe_context::get_timestamp hook
Mike Blumenkrantz [Fri, 10 Jul 2020 18:46:18 +0000 (14:46 -0400)]
zink: add pipe_context::get_timestamp hook

this uses VK_EXT_calibrated_timestamps to read a timestamp immediately from
the device without using a batch, which is what the gallium api expects

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6923>

3 years agozink: handle TIME_ELAPSED queries
Mike Blumenkrantz [Mon, 17 Aug 2020 20:44:45 +0000 (16:44 -0400)]
zink: handle TIME_ELAPSED queries

these just need to write a timestamp at the start to diff against

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6923>

3 years agozink: handle timestamp queries
Mike Blumenkrantz [Fri, 10 Jul 2020 18:44:58 +0000 (14:44 -0400)]
zink: handle timestamp queries

a lot of this is just rejiggering code to allow timestamp queries to
take the same codepaths as "normal" queries instead of even more explicitly
special casing everything

key point here is that we need to convert vulkan-level timestamp "ticks" to
nanoseconds like the gallium api expects

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6923>

3 years agointel/perf: fix crash when no perf queries are supported
Lionel Landwerlin [Tue, 6 Oct 2020 08:38:54 +0000 (11:38 +0300)]
intel/perf: fix crash when no perf queries are supported

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ec1fa1d51ff614 ("intel/perf: fix raw query kernel metric selection")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7024>

3 years agoutil: drop non-posix header fnmatch
Michel Zou [Mon, 5 Oct 2020 18:11:26 +0000 (20:11 +0200)]
util: drop non-posix header fnmatch

Seems fnmatch usage was removed but not the include

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7013>

3 years agoCI: Disable Panfrost T7xx CI
Daniel Stone [Sat, 3 Oct 2020 10:53:06 +0000 (11:53 +0100)]
CI: Disable Panfrost T7xx CI

The lab is having some more maintenance work this morning to continue
expanding capacity and improving resilience.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7023>

3 years agoxmlconfig: fix scandir_filter
Mike Blumenkrantz [Tue, 6 Oct 2020 01:21:16 +0000 (21:21 -0400)]
xmlconfig: fix scandir_filter

this was changed from a fnmatch usage to strcmp, and the return value
was flipped, breaking matching

also fix the formatting of the changed lines

Fixes: 4f37161a8f2: ("util/xmlconfig: Indent to Mesa style.")

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7018>

3 years agospirv: Make the clc_shader const
Jason Ekstrand [Tue, 6 Oct 2020 00:21:29 +0000 (19:21 -0500)]
spirv: Make the clc_shader const

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7016>

3 years agoturnip/kgsl: Add strerror decode in BO init failure.
Eric Anholt [Tue, 22 Sep 2020 18:28:02 +0000 (11:28 -0700)]
turnip/kgsl: Add strerror decode in BO init failure.

Just covering more of the error paths.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7014>

3 years agoturnip: Report device loss through _mesa_loge() instead of fprintf.
Eric Anholt [Tue, 22 Sep 2020 02:41:06 +0000 (19:41 -0700)]
turnip: Report device loss through _mesa_loge() instead of fprintf.

We drop the file/line, but there are only a couple of places calling this
and they have unique strings anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7014>

3 years agoturnip: Always enable TU_DEBUG=startup on debug drivers.
Eric Anholt [Mon, 5 Oct 2020 21:31:26 +0000 (14:31 -0700)]
turnip: Always enable TU_DEBUG=startup on debug drivers.

For Android, it's hard to inject environment variables for testing, and I
figure if you've got a debug driver then you'd love to see about driver
init failures anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7014>

3 years agoturnip: Extend the coverage of TU_DEBUG=startup.
Eric Anholt [Wed, 16 Sep 2020 02:42:41 +0000 (19:42 -0700)]
turnip: Extend the coverage of TU_DEBUG=startup.

I found while debugging KGSL that we were missing failure output for a
bunch of the error paths.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7014>

3 years agoturnip: Mark the vk_errorf helper as bring printflike.
Eric Anholt [Mon, 5 Oct 2020 21:22:40 +0000 (14:22 -0700)]
turnip: Mark the vk_errorf helper as bring printflike.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7014>

3 years agoturnip: Use mesa's normal PRINTFLIKE macro instead of our own.
Eric Anholt [Wed, 16 Sep 2020 02:29:13 +0000 (19:29 -0700)]
turnip: Use mesa's normal PRINTFLIKE macro instead of our own.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7014>

3 years agoturnip: Don't expose VK_ANDROID_native_buffer on non-Android.
Eric Anholt [Mon, 21 Sep 2020 16:35:23 +0000 (09:35 -0700)]
turnip: Don't expose VK_ANDROID_native_buffer on non-Android.

The code is only there when compiling that platform.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7014>

3 years agoanv: Implement VK_EXT_transform_feedback on Gen7
Jason Ekstrand [Sun, 4 Oct 2020 14:15:36 +0000 (09:15 -0500)]
anv: Implement VK_EXT_transform_feedback on Gen7

Things work a little different on Gen7 than they do on Gen8+.  In
particular, SOBufferEnable lives in 3DSTATE_STREAMOUT but BufferPitch
lives in 3DSTATE_SO_BUFFER.  This leaves us having to marshal data
around a bit more than we did on Gen8.  Still, it's not too bad.

Normally, I don't spend much time on Gen7 but XFB just became a hard
requirement for DXVK so it stopped working for all our Haswell users.
Let's get them happily playing their games again. 😸

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3532
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6997>

3 years agoandroid: panfrost: use python3 for generated sources rules
Mauro Rossi [Sat, 3 Oct 2020 22:25:34 +0000 (00:25 +0200)]
android: panfrost: use python3 for generated sources rules

Scripts are python3 ready

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6996>

3 years agoandroid: pan/bi: Use new disassembler (v2)
Mauro Rossi [Sat, 3 Oct 2020 22:14:29 +0000 (00:14 +0200)]
android: pan/bi: Use new disassembler (v2)

(v2) bifrost_gen_disasm.c generated source belongs to libpanfrost_bifrost_disasm

Fixes the following build errors, which happen with Android P, but not with Android Q

FAILED: out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
external/mesa/src/panfrost/bifrost/disassemble.c:678: error: undefined reference to 'bi_disasm_fma'
external/mesa/src/panfrost/bifrost/disassemble.c:679: error: undefined reference to 'bi_disasm_add'

Fixes: 792b51713 ("android: pan/bi: Use new disassembler")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6996>

3 years agoturnip: implement timestamp fences/semaphores for kgsl backend
Jonathan Marek [Mon, 5 Oct 2020 02:06:18 +0000 (22:06 -0400)]
turnip: implement timestamp fences/semaphores for kgsl backend

This gets fences and semaphores working for kgsl (minus import/export).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7000>

3 years agobroadcom/simulator: update to a newer simulator
Alejandro Piñeiro [Wed, 23 Sep 2020 21:54:44 +0000 (23:54 +0200)]
broadcom/simulator: update to a newer simulator

Some headers were moved, and macros renamed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7007>

3 years agozink: hook up driconf
Mike Blumenkrantz [Wed, 23 Sep 2020 19:42:18 +0000 (15:42 -0400)]
zink: hook up driconf

we need this

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7009>

3 years agoac/nir,radv: fix invalid IR when loading inline uniform blocks
Samuel Pitoiset [Mon, 28 Sep 2020 13:47:38 +0000 (15:47 +0200)]
ac/nir,radv: fix invalid IR when loading inline uniform blocks

Fixes dEQP-VK.binding_model.descriptorset_random.* and
dEQP-VK.binding_model.descriptor_copy.*.

Fixes: 05b6612b4ec ("radv: do not lower UBO/SSBO access to offsets")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6977>

3 years agoradv: remove dead deref code in the shader info pass
Samuel Pitoiset [Wed, 30 Sep 2020 07:59:56 +0000 (09:59 +0200)]
radv: remove dead deref code in the shader info pass

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6931>

3 years agoradv: remove unused gs.writes_memory in the shader info pass
Samuel Pitoiset [Wed, 30 Sep 2020 07:58:16 +0000 (09:58 +0200)]
radv: remove unused gs.writes_memory in the shader info pass

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6931>

3 years agoac,radv,radeonsi: remove unused parameters in the shader ABI IO
Samuel Pitoiset [Wed, 30 Sep 2020 07:57:00 +0000 (09:57 +0200)]
ac,radv,radeonsi: remove unused parameters in the shader ABI IO

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6931>

3 years agoradeonsi: remove dead code in TCS/TES/GS since const_index is always 0
Samuel Pitoiset [Wed, 30 Sep 2020 07:51:08 +0000 (09:51 +0200)]
radeonsi: remove dead code in TCS/TES/GS since const_index is always 0

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6931>

3 years agoac/nir: remove dead shader IO code
Samuel Pitoiset [Wed, 30 Sep 2020 07:26:18 +0000 (09:26 +0200)]
ac/nir: remove dead shader IO code

RADV/LLVM and RadeonSI now lower IO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6931>

3 years agoac/nir: remove dead global load/store/atomic derefs code
Samuel Pitoiset [Wed, 30 Sep 2020 07:21:31 +0000 (09:21 +0200)]
ac/nir: remove dead global load/store/atomic derefs code

RADV/LLVM now lowers global operations and RadeonSI doesn't use that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6931>

3 years agoradv/llvm: enable lower_unpack_half_2x16
Samuel Pitoiset [Wed, 30 Sep 2020 13:01:46 +0000 (15:01 +0200)]
radv/llvm: enable lower_unpack_half_2x16

To match ACO.

fossils-db (Navi10):
Totals from 294 (0.22% of 136420) affected shaders:
SGPRs: 16504 -> 16496 (-0.05%)
VGPRs: 19008 -> 19124 (+0.61%); split: -0.06%, +0.67%
SpillVGPRs: 511 -> 476 (-6.85%); split: -7.63%, +0.78%
CodeSize: 1688852 -> 1687932 (-0.05%); split: -0.10%, +0.05%
Scratch: 305152 -> 307200 (+0.67%)
MaxWaves: 2877 -> 2878 (+0.03%)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6937>

3 years agoac/llvm: implement nir_op_unpack_half_2x16_split_{x,y}
Samuel Pitoiset [Wed, 30 Sep 2020 13:09:54 +0000 (15:09 +0200)]
ac/llvm: implement nir_op_unpack_half_2x16_split_{x,y}

nir_unpack_half_2x16_split_{x,y}_flush_to_zero don't have to be
implemented because RADV/LLVM doesn't allow flushing denorms
for 16-bit floating point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6937>

3 years agoradv/llvm: lower VS IO
Samuel Pitoiset [Wed, 30 Sep 2020 07:15:54 +0000 (09:15 +0200)]
radv/llvm: lower VS IO

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6912>

3 years agoradv/llvm: gather VS input usage mask from load_input
Samuel Pitoiset [Fri, 25 Sep 2020 15:14:13 +0000 (17:14 +0200)]
radv/llvm: gather VS input usage mask from load_input

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6912>

3 years agoradv/llvm: lower TCS IO
Samuel Pitoiset [Wed, 30 Sep 2020 06:46:19 +0000 (08:46 +0200)]
radv/llvm: lower TCS IO

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6912>

3 years agoradv/llvm: gather TCS outputs from the output variables
Samuel Pitoiset [Tue, 29 Sep 2020 17:13:23 +0000 (19:13 +0200)]
radv/llvm: gather TCS outputs from the output variables

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6912>

3 years agoradv/llvm: lower TES IO
Samuel Pitoiset [Tue, 29 Sep 2020 17:12:37 +0000 (19:12 +0200)]
radv/llvm: lower TES IO

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6912>

3 years agoradv/llvm: lower GS IO
Samuel Pitoiset [Tue, 29 Sep 2020 15:05:57 +0000 (17:05 +0200)]
radv/llvm: lower GS IO

The LLVM bakend expects 64-bit IO to be lowered to 32-bit but
it's unclear if we want to do that for ACO at this point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6912>

3 years agoradv/llvm: assign driver locations for VS, TCS, TES and GS correctly
Samuel Pitoiset [Tue, 29 Sep 2020 17:18:14 +0000 (19:18 +0200)]
radv/llvm: assign driver locations for VS, TCS, TES and GS correctly

RADV/LLVM doesn't use assigned IO locations (yet).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6912>

3 years agoac/nir: remove dead load/store deref code for temporary variables
Samuel Pitoiset [Fri, 2 Oct 2020 14:35:14 +0000 (16:35 +0200)]
ac/nir: remove dead load/store deref code for temporary variables

They should have been lowered before reaching the backend.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6984>

3 years agoac/llvm: adjust dmask when image stores are shrinked using the format
Samuel Pitoiset [Fri, 2 Oct 2020 12:58:15 +0000 (14:58 +0200)]
ac/llvm: adjust dmask when image stores are shrinked using the format

It looks like GFX10 doesn't care about dmask if it's greater than
the number of components stored but it matters on GFX8-9 (I haven't
checked older gens).

Fixes: 1b4d968106d ("ac/llvm: fix invalid IR if image stores are shrinked using the format")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6982>

3 years agovc4: Avoid negative scissor caused by no intersection
Jose Maria Casanova Crespo [Thu, 1 Oct 2020 23:55:07 +0000 (00:55 +0100)]
vc4: Avoid negative scissor caused by no intersection

This fixes 6 tests that were crashing on VC4 since
EGL_KHR_swap_buffers_with_damage was enabled.

dEQP-EGL.functional.swap_buffers_with_damage.*.buffer_age_render

Cc: 20.2 <mesa-stable>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6976>

3 years agov3d: Update the TEXTURE_SHADER_STATE when there’s a new buf for a tex
Neil Roberts [Tue, 29 Sep 2020 15:24:51 +0000 (17:24 +0200)]
v3d: Update the TEXTURE_SHADER_STATE when there’s a new buf for a tex

When a texture is mapped with the DISCARD_WHOLE_RESOURCE flag set,
v3d_map_usage_prep will try to allocate a new buffer for the resource.
Previously, if the resource was used in a bound texture then nothing
would cause it to update the sampler view with the offset for the new
buffer. This commit just adds that in by looking at all sampler views
and calling v3d_create_texture_shader_state_bo for each one that
references this resource.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6914>

3 years agov3d: Split the creating of TEXTURE_SHADER_STATE into a helper function
Neil Roberts [Tue, 29 Sep 2020 15:22:37 +0000 (17:22 +0200)]
v3d: Split the creating of TEXTURE_SHADER_STATE into a helper function

This extracts the part of v3d_create_sampler_view that creates and fills
in the buffer for the TEXTURE_SHADER_STATE record into a helper
function. This will be used in a later patch to update the record when
the information changes.

v2: Also put the part that creates the buffer into the helper function
    so that it won’t override the contents of an inflight buffer.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6914>

3 years agov3d: Make the function to set tex dirty state for a stage global
Neil Roberts [Tue, 29 Sep 2020 15:20:31 +0000 (17:20 +0200)]
v3d: Make the function to set tex dirty state for a stage global

This moves the static function v3d_dirty_tex_state_for_shader_type from
v3dx_state.c to v3d_context.c and adds a declaration for it in the
header so that it can be used as a general utility function in a later
patch.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6914>

3 years agoturnip: remove pre-emption marker
Jonathan Marek [Sun, 4 Oct 2020 02:00:31 +0000 (22:00 -0400)]
turnip: remove pre-emption marker

turnip doesn't implement pre-emption, this hasn't been a problem with drm
backend since the kernel driver doesn't implement it either, however this
causes issues with kgsl backend.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6994>

3 years agoglsl: Initialize ast_node member field location.path in constructor.
Vinson Lee [Tue, 29 Sep 2020 01:20:32 +0000 (18:20 -0700)]
glsl: Initialize ast_node member field location.path in constructor.

Fix defect reported by Coverity Scan.

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

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6905>