Eric Engestrom [Thu, 24 Jan 2019 14:49:30 +0000 (14:49 +0000)]
travis: bump libdrm to 2.4.97
Fixes: c02f761bdfc87d0a1bfd "winsys/amdgpu: use the new BO list API"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Veluri Mithun [Wed, 23 Jan 2019 17:15:42 +0000 (22:45 +0530)]
egl: Implementation of egl dri2 drivers for MESA_query_driver
Signed-off-by: Veluri Mithun <velurimithun38@gmail.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Thu, 24 Jan 2019 10:27:24 +0000 (10:27 +0000)]
egl: add glvnd entrypoints for EGL_MESA_query_driver
Fixes: fbdd7bde29863935106c "egl: Implement EGL API for MESA_query_driver"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Veluri Mithun [Wed, 23 Jan 2019 17:14:25 +0000 (22:44 +0530)]
egl: Implement EGL API for MESA_query_driver
Signed-off-by: Veluri Mithun <velurimithun38@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Thu, 24 Jan 2019 10:07:45 +0000 (10:07 +0000)]
egl: update headers from Khronos
Cheating a tiny bit as these headers aren't in the Khronos repo yet, but
I expect them to be within a couple days.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Thu, 24 Jan 2019 10:06:27 +0000 (10:06 +0000)]
egl: finalize EGL_MESA_query_driver
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Matt Turner [Tue, 22 Jan 2019 19:33:11 +0000 (11:33 -0800)]
intel/compiler: Reset default flag register in brw_find_live_channel()
emit_uniformize() emits SHADER_OPCODE_FIND_LIVE_CHANNEL with its
flag_subreg set, so that the IR knows which flag is accessed. However
the flag is only used on Gen7 in Align1 mode.
To avoid setting unnecessary bits in the instruction words, get the
information we need and reset the default flag register. This allows
round-tripping through the assembler/disassembler.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Kenneth Graunke [Thu, 24 Jan 2019 01:16:22 +0000 (17:16 -0800)]
gallium: Add forgotten docs for PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS.
Thanks to Ilia for catching this.
Mark Janes [Thu, 24 Jan 2019 00:28:55 +0000 (16:28 -0800)]
Revert "Implement EGL API for MESA_query_driver"
This reverts commit
ff621a505594a3217f24fb785c51f43580f1bf78.
with default warnings configuration, this commit generates:
../src/egl/main/eglapi.c:2654:1: error: no previous prototype for
‘eglGetDisplayDriverConfig’ [-Werror=missing-prototypes]
Mark Janes [Thu, 24 Jan 2019 00:28:47 +0000 (16:28 -0800)]
Revert "Implementation of egl dri2 drivers for MESA_query_driver"
This reverts commit
2720f78ef231a5a19ea69731755ee4242acbc580.
Veluri Mithun [Wed, 23 Jan 2019 17:15:42 +0000 (22:45 +0530)]
Implementation of egl dri2 drivers for MESA_query_driver
Signed-off-by: Veluri Mithun <velurimithun38@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Veluri Mithun [Wed, 23 Jan 2019 17:14:25 +0000 (22:44 +0530)]
Implement EGL API for MESA_query_driver
Signed-off-by: Veluri Mithun <velurimithun38@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Veluri Mithun [Sun, 13 Jan 2019 11:28:04 +0000 (16:58 +0530)]
Add extension doc for MESA_query_driver
Signed-off-by: Veluri Mithun <velurimithun38@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Sergii Romantsov [Tue, 15 Jan 2019 11:08:32 +0000 (13:08 +0200)]
nir: Length of boolean vtn_value now is 1
During conversion type-length was lost due to math.
v2 (Jason Ekstrand):
- Use a size/offset of 4 bytes
Fixes: 44227453ec03 (nir: Switch to using 1-bit Booleans for almost everything)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109353
Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
Tested-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Marek Olšák [Fri, 18 Jan 2019 16:25:06 +0000 (11:25 -0500)]
st/mesa: fix PRIMITIVES_GENERATED query after the "pipeline stat single" changes
When this functionality was added, the PRIMITIVES_GENERATED query was
accidentally omitted. This causes issues for drivers that support
transform feedback."
Fixes: d644698b443 ("gallium: Add the ability to query a single
pipeline statistics counter")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Mon, 21 Jan 2019 17:09:07 +0000 (12:09 -0500)]
st/mesa: purge framebuffers when unbinding a context
This fixes pipe_surface "leaks".
Cc: 18.3 <mesa-stable@lists.freedesktop.org>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Erik Faye-Lund [Wed, 23 Jan 2019 09:34:28 +0000 (10:34 +0100)]
docs: add note about sending merge-requests from forks
Sending MRs from the main Mesa repository increase clutter in the
repository, and decrease visibility of project-wide branches. So it's
better if MRs are sent from forks instead.
Let's add a note about this, in case its not obvious to everyone.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Rob Clark [Wed, 23 Jan 2019 14:42:42 +0000 (09:42 -0500)]
freedreno: set modifier when exporting buffer
Fixes an assert we start hitting with kms/gbm:
#0 0x0000007fbf3d6e3c in raise () from /lib64/libc.so.6
#1 0x0000007fbf3c4a68 in abort () from /lib64/libc.so.6
#2 0x0000007fbf3d04e8 in __assert_fail_base () from /lib64/libc.so.6
#3 0x0000007fbf3d0550 in __assert_fail () from /lib64/libc.so.6
#4 0x0000007fbf5a73c4 in gbm_dri_bo_create (gbm=0x5820f0, width=2160, height=1440, format=
875713112, usage=0, modifiers=0x695e00, count=1) at ../src/gbm/backends/dri/gbm_dri.c:1150
#5 0x0000007fbf5a49c4 in gbm_bo_create_with_modifiers (gbm=0x5820f0, width=2160, height=1440, format=
875713112, modifiers=0x695e00, count=1) at ../src/gbm/main/gbm.c:491
#6 0x0000007fbbac3d64 in get_back_bo (dri2_surf=0x6f4cc0) at ../src/egl/drivers/dri2/platform_drm.c:258
#7 0x0000007fbbac4318 in dri2_drm_image_get_buffers (driDrawable=0x704490, format=4098, stamp=0x6fc730, loaderPrivate=0x6f4cc0, buffer_mask=1, buffers=0x7fffffe210) at ../src/egl/drivers/dri2/platform_drm.c:409
#8 0x0000007fbf5a5318 in image_get_buffers (driDrawable=0x704490, format=4098, stamp=0x6fc730, loaderPrivate=0x70e150, buffer_mask=1, buffers=0x7fffffe210) at ../src/gbm/backends/dri/gbm_dri.c:135
#9 0x0000007fbe4308c4 in dri_image_drawable_get_buffers (drawable=0x6fc730, images=0x7fffffe210, statts=0x6f2660, statts_count=1) at ../src/gallium/state_trackers/dri/dri2.c:339
#10 0x0000007fbe430c44 in dri2_allocate_textures (ctx=0x614b30, drawable=0x6fc730, statts=0x6f2660, statts_count=1) at ../src/gallium/state_trackers/dri/dri2.c:466
#11 0x0000007fbe435580 in dri_st_framebuffer_validate (stctx=0x714160, stfbi=0x6fc730, statts=0x6f2660, count=1, out=0x7fffffe3b8) at ../src/gallium/state_trackers/dri/dri_drawable.c:85
#12 0x0000007fbe7b2c84 in st_framebuffer_validate (stfb=0x6f2190, st=0x714160) at ../src/mesa/state_tracker/st_manager.c:222
#13 0x0000007fbe7b4884 in st_api_make_current (stapi=0x7fbf0430d8 <st_gl_api>, stctxi=0x714160, stdrawi=0x6fc730, streadi=0x6fc730) at ../src/mesa/state_tracker/st_manager.c:1074
#14 0x0000007fbe434f44 in dri_make_current (cPriv=0x703c20, driDrawPriv=0x704490, driReadPriv=0x704490) at ../src/gallium/state_trackers/dri/dri_context.c:301
#15 0x0000007fbe42c910 in driBindContext (pcp=0x703c20, pdp=0x704490, prp=0x704490) at ../src/mesa/drivers/dri/common/dri_util.c:579
#16 0x0000007fbbabab40 in dri2_make_current (drv=0x69d170, disp=0x69c6e0, dsurf=0x6f4cc0, rsurf=0x6f4cc0, ctx=0x70cb40) at ../src/egl/drivers/dri2/egl_dri2.c:1456
#17 0x0000007fbbaa8ef4 in eglMakeCurrent (dpy=0x69c6e0, draw=0x6f4cc0, read=0x6f4cc0, ctx=0x70cb40) at ../src/egl/main/eglapi.c:862
#18 0x0000007fbf5736ac in InternalMakeCurrentVendor (dpy=dpy@entry=0x614fb0, draw=draw@entry=0x6f4cc0, read=read@entry=0x6f4cc0, context=context@entry=0x70cb40, apiState=apiState@entry=0x6fc940, vendor=0x6975f0) at libegl.c:861
#19 0x0000007fbf573764 in InternalMakeCurrentDispatch (dpy=0x614fb0, draw=0x6f4cc0, read=0x6f4cc0, context=0x70cb40, vendor=0x6975f0) at libegl.c:630
#20 0x0000000000403640 in init_egl (egl=0x5805a8 <gl>, gbm=0x580528 <gbm>, samples=0) at ../common.c:263
#21 0x0000000000403c1c in init_cube_smooth (gbm=0x580528 <gbm>, samples=0) at ../cube-smooth.c:225
#22 0x0000000000408618 in main (argc=1, argv=0x7fffffe8d8) at ../kmscube.c:145
Fixes: 1ce5d757d04 freedreno: core buffer modifier support
Signed-off-by: Rob Clark <robdclark@gmail.com>
Samuel Pitoiset [Thu, 17 Jan 2019 08:33:39 +0000 (09:33 +0100)]
radv: always pass the GFX9 fence data to si_cs_emit_cache_flush()
Remove two useless checks.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Thu, 17 Jan 2019 08:33:38 +0000 (09:33 +0100)]
radv: compute the GFX9 fence VA at allocation time
Instead of doing every time we emit cache flushes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Thu, 17 Jan 2019 08:33:37 +0000 (09:33 +0100)]
radv: only allocate the GFX9 fence and EOP BOs for the gfx queue
It's invalid to emit a ZPASS_DONE event on the compute queue, and
the fence BO is unused on the compute queue (ie. we don't flush
CB or DB caches).
This saves some space in the upload BO.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Thu, 17 Jan 2019 08:33:36 +0000 (09:33 +0100)]
radv: remove old_fence parameter from si_cs_emit_write_event_eop()
This parameter is actually useless as the immediate value
can always be zero.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Tue, 22 Jan 2019 18:30:20 +0000 (19:30 +0100)]
radv: improve gathering of load_push_constants with dynamic bindings
For example, if a pipeline has two stages VS and FS. And if only
the fragment stage needs dynamic bindings, we shouldn't allocate
an extra user SGPR for the vertex stage. Of course, if the vertex
stage loads constants, it needs an user SGPR.
This should reduce the number of SET_SH_REG packets that are emitted.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Caio Marcelo de Oliveira Filho [Wed, 19 Sep 2018 17:16:27 +0000 (10:16 -0700)]
gallium: Add PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS
In the Intel backend, it makes the most sense to treat gl_TessLevelInner
and gl_TessLevelOuter as ordinary shader inputs. For Radeon, it makes
more sense to treat them as system values which get special handling.
We already have a compiler option for this, but the Iris driver will
need a capability bit so we can set it appropriately.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ilia Mirkin [Mon, 21 Jan 2019 03:19:26 +0000 (22:19 -0500)]
nv50,nvc0: mark textures dirty on fb update
We may have to flush the cache if there are any textures presently bound
that refer to the outgoing framebuffer. This is only checked at
validation time.
Fixes a number of dEQP-GLES3.functional.fbo.color.repeated_clear.sample.*
tests, which would bind a texture, then clear it while the binding was
in effect, and then render to a different texture. This seems legal
under the "no feedback loops" rule.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Timothy Arceri [Tue, 22 Jan 2019 05:11:03 +0000 (16:11 +1100)]
ac/nir_to_llvm: fix interpolateAt* for structs
This fixes the arb_gpu_shader5 interpolateAt* tests that contain
structs.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Tue, 22 Jan 2019 01:29:34 +0000 (12:29 +1100)]
ac/nir_to_llvm: add bindless support for uniform handles
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Timothy Arceri [Tue, 22 Jan 2019 00:48:51 +0000 (11:48 +1100)]
radeonsi/nir: add missing piece for bindless image support
This fixes some piglit tests and is was TGSI does.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Rob Clark [Mon, 21 Jan 2019 15:50:13 +0000 (10:50 -0500)]
freedreno: core buffer modifier support
Split out of a patch from Fritz Koenig to decouple from a6xx UBWC
enablement, and added fd_resource_create_with_modifiers().
Rob Clark [Tue, 22 Jan 2019 19:08:41 +0000 (14:08 -0500)]
loader: fix the no-modifiers case
Normally modifiers take precendence over use flags, as they are more
explicit. But if the driver supports modifiers, but the xserver does
not, then we should fallback to the old mechanism of allocating a buffer
using 'use' flags.
Fixes: 069fdd5f9facbd72fb6a289696c7b74e3237e70f
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Fritz Koenig [Fri, 2 Nov 2018 00:08:39 +0000 (17:08 -0700)]
freedreno: add query for dmabuf modifiers
Fritz Koenig [Thu, 6 Dec 2018 01:26:17 +0000 (17:26 -0800)]
freedreno: drm_fourcc.h header include
Add Qualcomm modifier for UBWC
Brian Paul [Tue, 22 Jan 2019 19:29:24 +0000 (12:29 -0700)]
svga: add new gallium formats to the format conversion table
Fixes a static assertion which broke the build.
Fixes: 3ee240890 "gallium: add SINT formats to have exact counterparts to SNORM formats"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Neha Bhende<bhenden@vmware.com>
Marek Olšák [Sat, 19 Jan 2019 00:35:04 +0000 (19:35 -0500)]
radeonsi: rename rfence -> sfence
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Sat, 19 Jan 2019 00:30:17 +0000 (19:30 -0500)]
radeonsi: rename rbo, rbuffer to buf or buffer
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Sat, 19 Jan 2019 00:22:06 +0000 (19:22 -0500)]
radeonsi: rename rsrc -> ssrc, rdst -> sdst
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Sat, 19 Jan 2019 00:15:44 +0000 (19:15 -0500)]
radeonsi: rename rquery -> squery
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Sat, 19 Jan 2019 00:13:36 +0000 (19:13 -0500)]
radeonsi: rename r600_resource -> si_resource
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Lionel Landwerlin [Tue, 22 Jan 2019 17:36:56 +0000 (17:36 +0000)]
vulkan: make generated enum to strings helpers available from c++
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Marek Olšák [Sat, 19 Jan 2019 00:39:45 +0000 (19:39 -0500)]
radeonsi: remove r600 from comments
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Sat, 19 Jan 2019 00:36:49 +0000 (19:36 -0500)]
winsys/amdgpu: rename rfence, rsrc, rdst -> afence, asrc, adst
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Sat, 19 Jan 2019 00:35:33 +0000 (19:35 -0500)]
radeonsi: rename rview -> sview
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Sat, 19 Jan 2019 00:19:23 +0000 (19:19 -0500)]
radeonsi: rename rscreen -> sscreen
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Wed, 16 Jan 2019 23:57:07 +0000 (18:57 -0500)]
radeonsi: disable render cond & pipeline stats for internal compute dispatches
Sonny Jiang [Mon, 3 Dec 2018 17:36:33 +0000 (12:36 -0500)]
radeonsi: use compute for resource_copy_region when possible
v2: marek: fix snorm8 blits
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Jiang, Sonny [Tue, 8 Jan 2019 19:47:07 +0000 (19:47 +0000)]
radeonsi: add compute_last_block to configure the partial block fields
Marek Olšák [Tue, 15 Jan 2019 17:33:53 +0000 (12:33 -0500)]
gallium/util: add util_format_snorm8_to_sint8 (from radeonsi)
Marek Olšák [Tue, 15 Jan 2019 17:32:27 +0000 (12:32 -0500)]
gallium: add SINT formats to have exact counterparts to SNORM formats
for radeonsi
Marek Olšák [Thu, 17 Jan 2019 20:07:03 +0000 (15:07 -0500)]
radeonsi: move PKT3_WRITE_DATA generation into a helper function
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Thu, 17 Jan 2019 19:49:02 +0000 (14:49 -0500)]
radeonsi: don't use WRITE_DATA.DST_SEL == MEM_GRBM on >= CIK
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Thu, 17 Jan 2019 19:45:10 +0000 (14:45 -0500)]
radeonsi: fix the top-of-pipe fence on SI
SI doesn't have MEM.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Thu, 17 Jan 2019 19:27:18 +0000 (14:27 -0500)]
radeonsi: correct WRITE_DATA.DST_SEL definitions
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Fri, 11 Jan 2019 23:06:59 +0000 (18:06 -0500)]
radeonsi: compile clear and copy buffer compute shaders on demand
same as all other shaders
Marek Olšák [Fri, 11 Jan 2019 21:57:06 +0000 (16:57 -0500)]
radeonsi: remove redundant call to emit_cache_flush in compute clear/copy
launch_grid calls it.
Marek Olšák [Thu, 10 Jan 2019 21:17:00 +0000 (16:17 -0500)]
radeonsi: use buffer_store_format_x & xy
Marek Olšák [Thu, 10 Jan 2019 19:32:42 +0000 (14:32 -0500)]
radeonsi: fix rendering to tiny viewports where the viewport center is > 8K
This fixes an assertion failure with GL CTS when cts-runner is used.
(not a specific test)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108877
Cc: 18.3 <mesa-stable@lists.freedesktop.org>
Marek Olšák [Fri, 11 Jan 2019 20:11:30 +0000 (15:11 -0500)]
radeonsi: fix a u_blitter crash after a shader with FBFETCH
This fixes an assertion failure with GL CTS when cts-runner is used.
(not a specific test)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108877
Cc: 18.3 <mesa-stable@lists.freedesktop.org>
Marek Olšák [Mon, 7 Jan 2019 19:32:33 +0000 (14:32 -0500)]
winsys/amdgpu: use the new BO list API
Jason Ekstrand [Fri, 14 Sep 2018 20:10:28 +0000 (15:10 -0500)]
anv: Implement transform feedback queries
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 14 Sep 2018 19:45:12 +0000 (14:45 -0500)]
genxml: Add SO_PRIM_STORAGE_NEEDED and SO_NUM_PRIMS_WRITTEN
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 14 Sep 2018 19:27:43 +0000 (14:27 -0500)]
anv: Implement CmdBegin/EndQueryIndexed
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 14 Sep 2018 17:25:10 +0000 (12:25 -0500)]
anv: Implement vkCmdDrawIndirectByteCountEXT
Annoyingly, this requires that we implement integer division on the
command streamer. Fortunately, we're only ever dividing by constants so
we can use the mulh+add+shift trick and it's not as bad as it sounds.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Mon, 10 Sep 2018 21:17:37 +0000 (16:17 -0500)]
anv: Implement the basic form of VK_EXT_transform_feedback
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Wed, 12 Sep 2018 21:40:52 +0000 (16:40 -0500)]
anv: Add pipeline cache support for xfb_info
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Mon, 10 Sep 2018 20:46:02 +0000 (15:46 -0500)]
anv: Add but do not enable VK_EXT_transform_feedback
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Alejandro Piñeiro [Thu, 10 Jan 2019 18:45:12 +0000 (19:45 +0100)]
nir/xfb: distinguish array of structs vs array of blocks
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Wed, 9 Jan 2019 00:22:16 +0000 (18:22 -0600)]
nir/xfb: Properly handle arrays of blocks
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Alejandro Piñeiro [Mon, 22 Oct 2018 16:30:39 +0000 (18:30 +0200)]
nir/xfb: don't assert when xfb_buffer/stride is present but not xfb_offset
In order to allow nir_gather_xfb_info to be used on OpenGL,
specifically ARB_gl_spirv.
So, from OpenGL 4.6 spec, section 11.1.2.1, "Output Variables":
"outputs specifying both an *XfbBuffer* and an *Offset* are
captured, while outputs not specifying both of these are not
captured. Values are captured each time the shader writes to such
a decorated object."
This implies that are captured if both are present, and not if one of
those are lacking. Technically, it doesn't explicitly point that
having just one or the other is a mistake. In some cases, glslang is
adding some extra XfbBuffer without XfbOffset around, and mentioning
that technically that is not a bug (see issue#1526)
And for the case of Vulkan, as the same glslang issue mentions, it is
not clear if that should be a mistake or not. But even if it is a
mistake, it is not really needed to be checked on the driver, and we
can let the validation layers to check that.
v2: simplify explicit_xfb_buffer and explicit_offset checks (Jason).
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 6 Dec 2018 22:49:27 +0000 (16:49 -0600)]
nir/xfb: Fix offset accounting for dvec3/4
Before, we were double-counting the component slots when we had a dvec3
or dvec4. Instead, just add them in once and manually offset the
recorded output offset.
Fixes: 19064b8c "nir: Add a pass for gathering transform feedback info"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Jason Ekstrand [Fri, 14 Sep 2018 20:54:19 +0000 (15:54 -0500)]
nir: Preserve offsets in lower_io_to_scalar_early
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Samuel Pitoiset [Mon, 10 Sep 2018 19:59:31 +0000 (21:59 +0200)]
nir: fix lowering arrays to elements for XFB outputs
If we have a transform feedback output like:
float[2] x2_out (VARYING_SLOT_VAR1.x, 0, 0)
which is lowered by nir_lower_io_arrays_to_elements to,
float x2_out (VARYING_SLOT_VAR1.x, 0, 0)
float x2_out@5 (VARYING_SLOT_VAR2.x, 0, 0)
We have to update the destination offset to avoid overwriting
the same value.
v2 (Jason Ekstrand):
- Compute the correct offsets for arrays of vectors and/or doubles
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Samuel Pitoiset [Fri, 11 May 2018 08:29:17 +0000 (10:29 +0200)]
nir: do not remove varyings used for transform feedback
When a xfb buffer is explicitely declared on a varying
variable, we shouldn't remove it at link time.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 21 Jan 2019 22:09:56 +0000 (16:09 -0600)]
spirv: Only set interface_type on blocks
Instead of setting interface_type to whatever the per-vertex type is, we
only set it on blocks. This allows later passes to tell the difference
between variables that are in blocks and those that aren't.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Jason Ekstrand [Wed, 16 Jan 2019 17:52:03 +0000 (11:52 -0600)]
spirv: Only split blocks
Instead of splitting every per-vertex struct, just split the ones that
are actually blocks. The reason for the split is so that we have
separate variables for separate locations, qualifiers, and builtin
decorations. The vulkan spec only allows these on members of blocks.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Jason Ekstrand [Wed, 9 Jan 2019 00:19:33 +0000 (18:19 -0600)]
spirv: Initialize struct member offsets to -1
This is the "no offset specified" value.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Tue, 8 Jan 2019 23:35:19 +0000 (17:35 -0600)]
anv: Always emit at least one vertex element
This seems to make the simulator happier. The early return wasn't
really protecting anything and the code that follows will happily
initialize the dummy element to STORE_0 and emit it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Eric Engestrom [Mon, 21 Jan 2019 19:44:45 +0000 (19:44 +0000)]
configure: EGL requirements only apply if EGL is built
Issue was hit with this configuration:
--disable-{egl,gbm} --with-platform=drm
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Fixes: 3208fd2e46b ("configure: move platform handling further up")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Jonathan Marek [Thu, 13 Dec 2018 17:39:39 +0000 (12:39 -0500)]
freedreno: a2xx: add partial lower_scalar pass for ir2
Some instructions can only be scalar on a2xx, lower these only
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Jonathan Marek [Wed, 19 Dec 2018 01:23:16 +0000 (20:23 -0500)]
freedreno: a2xx: add ir2 copy propagation
Two cases:
* replacing srcs which refer to MOV instructions
* replacing MOVs used to write to exports
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Jonathan Marek [Mon, 21 Jan 2019 15:00:28 +0000 (10:00 -0500)]
freedreno: a2xx: insert scalar MOV to allow 2 source scalar
If we want to use a scalar instruction with two sources, both sources have
to be in the same register. This covers a common case by inserting a scalar
MOV into a previous instruction with only a vector alu instruction.
A better method would be to have the sources end up in the same register in
the first place, but when one source is a constant this is the only way.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Jonathan Marek [Wed, 19 Dec 2018 01:15:57 +0000 (20:15 -0500)]
freedreno: a2xx: NIR backend
This patch replaces the a2xx TGSI compiler with a NIR compiler.
It also adds several new features:
-gl_FrontFacing, gl_FragCoord, gl_PointCoord, gl_PointSize
-control flow (including loops)
-texture related features (LOD/bias, cubemaps)
-filling scalar ALU slot when possible
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Tapani Pälli [Tue, 22 Jan 2019 07:37:58 +0000 (09:37 +0200)]
nir: cleanup glsl_get_struct_field_offset, glsl_get_explicit_stride
Take away const qualifier from return type of these functions as
-Wignored-qualifiers points out it is ignored for these cases.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Eric Engestrom [Mon, 21 Jan 2019 10:03:37 +0000 (10:03 +0000)]
travis: fix autotools build after --enable-autotools switch addition
Fixes: e68777c87ceed02ab199 "autotools: Deprecate the use of autotools"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Jason Ekstrand [Sat, 19 Jan 2019 15:21:33 +0000 (09:21 -0600)]
spirv: Update the JSON and headers from Khronos master
This corresponds to commit
79b6681aadcb53c27d1052e on GitHub.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Jason Ekstrand [Mon, 21 Jan 2019 22:35:25 +0000 (16:35 -0600)]
nir: Mark deref UBO and SSBO access as non-scalar
Fixes: 63b9aa2e2574 "spirv: Add support for using derefs for..."
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Karol Herbst [Mon, 3 Dec 2018 18:08:41 +0000 (19:08 +0100)]
nir/spirv: handle ContractionOff execution mode
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Rob Clark [Mon, 26 Feb 2018 23:01:02 +0000 (18:01 -0500)]
nir/vtn: add caps for some cl related capabilities
vtn supports these, so don't squalk if user is happy with enabling
these.
v2: add new members sorted
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Karol Herbst [Wed, 7 Mar 2018 16:41:03 +0000 (17:41 +0100)]
vtn: handle SpvExecutionModelKernel
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Karol Herbst [Thu, 29 Nov 2018 14:21:12 +0000 (15:21 +0100)]
mesa: add MESA_SHADER_KERNEL
used for CL kernels
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Jason Ekstrand [Sat, 19 Jan 2019 23:50:23 +0000 (17:50 -0600)]
anv/pipeline: Add a pdevice helper variable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Jason Ekstrand [Sat, 19 Jan 2019 19:10:15 +0000 (13:10 -0600)]
relnotes: Add newly added Vulkan extensions
Both the Intel and RADV people have been really bad about adding things
to the release notes. We should start actually paying attention.
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Jason Ekstrand [Sat, 19 Jan 2019 15:40:12 +0000 (09:40 -0600)]
anv: Only parse pImmutableSamplers if the descriptor has samplers
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Rhys Perry [Fri, 18 Jan 2019 20:35:15 +0000 (20:35 +0000)]
radv: prevent dirtying of dynamic state when it does not change
DXVK often sets dynamic state without actually changing it.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Rhys Perry [Fri, 18 Jan 2019 20:17:35 +0000 (20:17 +0000)]
radv: avoid context rolls when binding graphics pipelines
It's common in some applications to bind a new graphics pipeline without
ending up changing any context registers.
This has a pipline have two command buffers: one for setting context
registers and one for everything else. The context register command buffer
is only emitted if it differs from the previous pipeline's.
v2: ensure late scissor emission is done when radv_emit_rbplus_state() is
called
v2: make use of cmd_buffer->state.workaround_scissor_bug
v3: rename "workaround_scissor_bug" to
"context_roll_without_scissor_emitted"
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Rhys Perry [Fri, 18 Jan 2019 20:17:35 +0000 (20:17 +0000)]
radv: add missed situations for scissor bug workaround
v2: rename "workaround_scissor_bug" to
"context_roll_without_scissor_emitted"
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Rhys Perry [Fri, 18 Jan 2019 20:15:26 +0000 (20:15 +0000)]
radv: pass radv_draw_info to radv_emit_draw_registers()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Jonathan Marek [Wed, 19 Dec 2018 02:35:41 +0000 (21:35 -0500)]
freedreno: a2xx: sysmem rendering
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Jonathan Marek [Mon, 10 Dec 2018 03:31:26 +0000 (22:31 -0500)]
freedreno: a2xx: fix non-zero texture base offsets
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Jonathan Marek [Tue, 18 Dec 2018 23:11:04 +0000 (18:11 -0500)]
freedreno: a2xx: fix VERTEX_REUSE/DEALLOC on a20x
On a20x, set VGT_VERTEX_REUSE_BLOCK_CNTL to 2 and don't change it. Small
rearrangement on a220 to reduce the size of draw commands.
Only set DEALLOC_CNTL on a20x because the correct a220 value is not known.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Jonathan Marek [Mon, 10 Dec 2018 04:14:41 +0000 (23:14 -0500)]
freedreno: a2xx: fix gmem2mem viewport
Fixes cases where previous viewport values might case gmem2mem to fail.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@gmail.com>