Leo Liu [Tue, 15 Aug 2017 17:39:37 +0000 (13:39 -0400)]
radeon/uvd: reconstruct MJPEG bitstream
The current tier 1 mjpeg firmware only supports at the bitstream
level, the later tier 2 support will be at the buffers level with
newer hardware.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 15:54:22 +0000 (11:54 -0400)]
st/va: add slice parameter handling for MJPEG
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 15:52:26 +0000 (11:52 -0400)]
st/va: add huffman table handling for MJPEG
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 15:01:35 +0000 (11:01 -0400)]
st/va: add iq matrix handling for MJPEG
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 14:53:22 +0000 (10:53 -0400)]
st/va: add picture parameter handling for MJPEG
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 16:43:35 +0000 (12:43 -0400)]
st/va: add handles for MJPEG Buffers
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 16:06:24 +0000 (12:06 -0400)]
st/va: create decoder for MJPEG format
Mjpeg doesn't need reference
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 14:43:38 +0000 (10:43 -0400)]
st/va: add MJPEG picture to context
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 16 Aug 2017 15:49:33 +0000 (11:49 -0400)]
radeon/video: add MJPEG support
v2: add ASIC and Kernel version check
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 15:25:08 +0000 (11:25 -0400)]
radeon/uvd: add MJPEG support
There is no need of dpb buffer for mjpeg codec
v2: check dpb_size instead of format
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 18:26:15 +0000 (14:26 -0400)]
radeon/uvd: add MJPEG stream type
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 14:31:30 +0000 (10:31 -0400)]
vl: add MJPEG picture description
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 15 Aug 2017 18:21:16 +0000 (14:21 -0400)]
vl: add MJPEG profile and format
v2: move util video change to here
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Leo Liu [Fri, 18 Aug 2017 16:03:19 +0000 (12:03 -0400)]
radeon/uvd: get the target buffer pitch correct for different format
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Samuel Pitoiset [Wed, 9 Aug 2017 13:47:22 +0000 (15:47 +0200)]
radeonsi: update non-resident bindless descriptors if needed
Only resident bindless descriptors are currently updated and
re-uploaded, this makes sure that the non-resident ones are
also updated.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Louis-Francis Ratté-Boulianne [Fri, 7 Jul 2017 06:53:28 +0000 (02:53 -0400)]
dri3: Move up fourcc utility function
It will be needed in next patches.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Mon, 31 Jul 2017 14:09:16 +0000 (15:09 +0100)]
egl: Add dma_buf_import_modifiers for glvnd
Make sure we advertise the new entrypoints to libglvnd's EGL dispatch.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reported-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101982
Fixes:
4c412293d0e ("egl: advertise EGL_EXT_image_dma_buf_import_modifiers")
Topi Pohjolainen [Sat, 19 Aug 2017 06:22:22 +0000 (09:22 +0300)]
intel/blorp: Adjust intra-tile x when faking rgb with red-only
v2 (Jason): Adjust directly in surf_fake_rgb_with_red()
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101910
CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Dave Airlie [Wed, 16 Aug 2017 01:39:31 +0000 (02:39 +0100)]
ac/nir: fixup layer/viewport export for GFX9.
GFX9 moved where the viewport index export goes.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jason Ekstrand [Sat, 19 Aug 2017 22:03:39 +0000 (15:03 -0700)]
i965/bufmgr: s/BO_ALLOC_FOR_RENDER/BO_ALLOC_BUSY/
"Alloc for render" is a terrible name for a flag because it means
basically nothing. What the flag really does is allocate a busy BO
which someone theorized at one point in time would be more efficient if
you're planning to immediately render to it. If the flag really means
"alloc a busy BO" we should just call it that.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Sat, 19 Aug 2017 21:54:42 +0000 (14:54 -0700)]
i965/tex: Change the flags type on create_for_teximage
This matches the actual function declaration.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Christoph Haag [Sat, 19 Aug 2017 23:59:43 +0000 (01:59 +0200)]
mesa: only copy requested compressed teximage cubemap faces
This is analogous to commit 2259b11 which only fixed the regular case
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102308
Signed-off-by: Christoph Haag <haagch+mesadev@frickel.club>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Jason Ekstrand [Sat, 19 Aug 2017 18:03:38 +0000 (11:03 -0700)]
i965/tex: Don't pass samples to miptree_create_for_teximage
In
76e2f390f9863a35, when Topi switched num_samples from 0 to 1 for
single-sampled, he accidentally switched the last parameter in the call
to miptree_create_for_teximage from 0 to 1 thinking it was num_samples
when it was actually layout_flags. Switching from 0 to 1 added the
MIPTREE_LAYOUT_ACCELERATED_UPLOAD flag which causes us to allocate a
busy BO instead of an idle one. This caused the subsequent CPU upload
to consistently stall. The end result was a 15% performance drop in the
SynMark v7 DrvRes microbenchmark. This restores the old behavior and
fixes the performance regression.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Fixes:
76e2f390f9863a356d1419982dec705260d67eff
Bugzilla: https://bugs.freedesktop.org/102260
Cc: mesa-stable@lists.freedesktop.org
Kenneth Graunke [Thu, 17 Aug 2017 07:50:08 +0000 (00:50 -0700)]
anv: Use ISL for emitting null surface states.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Thu, 17 Aug 2017 07:44:41 +0000 (00:44 -0700)]
i965: Use ISL for emitting null surface states.
We handle the Sandybridge multisampled 2D surface hack here, rather
than in ISL, because it requires allocating a BO, and is kind of messy.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Thu, 17 Aug 2017 07:17:05 +0000 (00:17 -0700)]
isl: Add a null surface fill function.
ISL already offers functions to fill out most kinds of SURFACE_STATE,
so why not handle null surfaces too?
Null surfaces are simple, so we can just take the dimensions, rather
than an entirte fill structure.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Thu, 20 Jul 2017 23:33:15 +0000 (16:33 -0700)]
i965: Remove tabs in intel_batchbuffer.c.
Our coding style is to use spaces. Some of this was also messed up
during my bufmgr import series.
(Trivial, just whitespace changes.)
Jason Ekstrand [Thu, 17 Aug 2017 22:27:25 +0000 (15:27 -0700)]
i965/miptree: Return NONE from texture_aux_usage when fully resolved
This little optimization improves the performance of SynMark v7
TexFilterTri by almost 10% on Sky Lake GT4 among other improvements.
We've been doing it for some time but somehow it got dropped during
the miptree refactoring.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/102258
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Jason Ekstrand [Fri, 18 Aug 2017 23:10:39 +0000 (16:10 -0700)]
i965: Stop looking at NewDriverState when emitting 3DSTATE_URB
Looking at NewDriverState is not safe in general. The state atom system
is set up to ensure that new bits that get added to NewDriverState get
accumulated into the set of bits used when emitting atoms but it doesn't
go the other way. If we read NewDriverState, we may not get the full
picture because the per-pipeline state (3D or compute) does not get
added to NewDriverState before state emit is done. It's especially
dangerous to do this from BLORP (either explicitly or implicitly when
BLORP calls gen7_upload_urb) because that does not happen during one of
the normal state upload paths.
This commit solves the problem by whacking all of the per-shader-stage
URB sizes to zero whenever we change the total URB size. We still have
to flag BRW_NEW_URB_SIZE to ensure that the gen7_urb atom triggers but
the actual decision in gen7_upload_urb can now be based entirely on URB
sizes rather than on state atoms. This also makes BLORP correct because
it just asks for a new URB config whenever the vsize is too small and so
any change to the total URB size will trigger blorp to re-emit as well
because 0 < vs_entry_size.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Bugzilla: https://bugs.freedesktop.org/102289
Cc: mesa-stable@lists.freedesktop.org
Kenneth Graunke [Wed, 16 Aug 2017 18:15:24 +0000 (11:15 -0700)]
i965: Mark all EGLimages as non-coherent.
EGLimages are shared with external users, and we don't know what they're
going to do with them. They might scan them out. They might access
them in a way that doesn't work with our explicit clflushing.
It's safest to simply mark them non-coherent.
Chris Wilson caught this problem and wrote a similar (though less
aggressive) patch to solve it; the miptree code has since undergone
a lot of refactoring so I had to rewrite it.
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Eric Anholt [Fri, 3 Feb 2017 00:20:15 +0000 (16:20 -0800)]
broadcom/genxml: Add V3D 3.3 packet definitions.
This will be used by the new vc5 gallium driver, and a future Vulkan
driver.
Eric Anholt [Thu, 13 Jul 2017 20:20:29 +0000 (13:20 -0700)]
broadcom/genxml: Check the sub-id field when decoding instructions.
VC5 introduces packet variants where the same opcode has behavior that is
decided by a sub-id field in the early bits of the packet. Keep iterating
over packets until we find the one with the matching sub-id.
Eric Anholt [Mon, 19 Dec 2016 19:11:44 +0000 (11:11 -0800)]
broadcom/genxml: Emit code for default headers for structs as well.
In the vc5 NIR backend, I want to use the XML code-generation to set up
pack/unpack of structs for the texture uniforms, and setting up the
unpacked copy needs a default header.
Eric Anholt [Sat, 21 Jan 2017 05:22:15 +0000 (16:22 +1100)]
anv: Move a comment that got left behind in the u_vector refactor.
Marek Olšák [Tue, 15 Aug 2017 00:50:22 +0000 (02:50 +0200)]
gallium/radeon: remove old_fence parameter from r600_gfx_write_event_eop
just use the new scratch buffer.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 15 Aug 2017 00:40:30 +0000 (02:40 +0200)]
radeonsi/gfx9: prevent a GPU hang after a timestamp event
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 15 Aug 2017 15:51:05 +0000 (17:51 +0200)]
radeonsi: don't use CLEAR_STATE on SI
This fixes random hangs with Unigine Valley.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102201
Fixes:
064550238ef0 ("radeonsi: use CLEAR_STATE to initialize some registers")
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Jon Turney [Thu, 17 Aug 2017 21:10:52 +0000 (22:10 +0100)]
Fix build when HAVE_LIBDRM isn't defined
make[4]: Entering directory '/wip/mesa/build/src/gallium/targets/dri'
CXXLD gallium_dri.la
../../../../src/gallium/auxiliary/pipe-loader/.libs/libpipe_loader_static.a(libpipe_loader_static_la-pipe_loader.o): In function `pipe_loader_get_driinfo_xml':
/mesa/build/src/gallium/auxiliary/pipe-loader/../../../../../src/gallium/auxiliary/pipe-loader/pipe_loader.c:117: undefined reference to `pipe_loader_drm_get_driinfo_xml'
b4ff5e90 uses pipe_loader_get_driinfo_xml() unconditionally in
pipe_loader.c, but it's definition in pipe_loader_get_driinfo_xml() is only
built if HAVE_LIBDRM.
Arrange to always use the default XML if HAVE_LIBDRM isn't defined.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Kenneth Graunke [Fri, 18 Aug 2017 06:41:50 +0000 (23:41 -0700)]
i965: Fix missing newlines in perf_debug messages.
perf_debug() doesn't append a newline for you.
Ilia Mirkin [Thu, 17 Aug 2017 02:18:39 +0000 (22:18 -0400)]
glsl: add a few missing int64 constant propagation cases
Fixes KHR-GL45.shader_ballot_tests.ShaderBallotAvailability, which
causes some silly swizzles to appear, triggering this optimization to
get hit.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable@lists.freedesktop.org
Timothy Arceri [Thu, 17 Aug 2017 23:32:15 +0000 (09:32 +1000)]
glsl: set old ldexp operand to NULL when lowering
This fixes an assert during IR validation in LLVMpipe.
Fixes:
e2e2c5abd279 (glsl: calculate number of operands in an expression once)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102274
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
Jason Ekstrand [Thu, 17 Aug 2017 21:57:06 +0000 (14:57 -0700)]
intel/isl: Replace switch statements of doom with a macro
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Thu, 17 Aug 2017 21:56:46 +0000 (14:56 -0700)]
intel/isl: Reduce header file duplication
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dave Airlie [Thu, 17 Aug 2017 23:33:41 +0000 (09:33 +1000)]
radv: disable support for VEGA for now.
I'm working on this, but I'm not sure I'll make 17.2 at this stage,
maybe 17.2.1.
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jeremy Huddleston Sequoia [Thu, 17 Aug 2017 22:08:36 +0000 (15:08 -0700)]
glxcmds: Fix a typo in the __APPLE__ codepath
s/DummyContext/dummyContext/
Regressed-in:
5d9b50e596c9d81c37ce0844ae0f8c9da3f6bea6
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Roland Scheidegger [Tue, 15 Aug 2017 15:53:49 +0000 (17:53 +0200)]
llvmpipe: enable PIPE_CAP_QUERY_SO_OVERFLOW
The driver supported this since way before the GL spec for it existed.
Just need to support both the per-stream and for all streams variants
(which are identical due to only supporting 1 stream).
Passes piglit arb_transform_feedback_overflow_query-basic.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Roland Scheidegger [Tue, 15 Aug 2017 15:52:41 +0000 (17:52 +0200)]
softpipe: enable PIPE_CAP_QUERY_SO_OVERFLOW
The driver was supposed to support this since way before the GL spec for it
existed, albeit it was apparently broken, so fix and enable it.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Gwan-gyeong Mun [Thu, 10 Aug 2017 16:18:57 +0000 (01:18 +0900)]
dri: fix typo in comment
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Vinson Lee [Sat, 5 Aug 2017 20:31:50 +0000 (13:31 -0700)]
configure.ac: Check for expat21 if expat is not found.
Fixes build error on CentOS 6.9.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102052
Fixes:
5c007203b73d ("configure.ac: drop manual detection of expat header/library")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Michel Dänzer [Tue, 15 Aug 2017 00:41:57 +0000 (09:41 +0900)]
configure: Check llvm-config --shared-mode
https://bugs.llvm.org/show_bug.cgi?id=6823 still affects current LLVM.
llvm-config --libs only reports the single shared library if LLVM was
built with -DLLVM_LINK_LLVM_DYLIB=ON. llvm-config --shared-mode reports
"shared" in that case, "static" otherwise (even if LLVM was built with
-DLLVM_BUILD_LLVM_DYLIB=ON).
v2: Keep the LLVM < 4.0 test. (llvm-config --shared-mode is actually
available since LLVM 3.8, but that would make the test too
complicated :)
Fixes:
3d8da1f678e1 ("configure: Trust LLVM >= 4.0 llvm-config --libs
for shared libraries")
Bugzilla: https://bugs.freedesktop.org/102247
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Thomas Hellstrom [Fri, 11 Aug 2017 07:49:54 +0000 (09:49 +0200)]
loader_dri3: Make sure we have an updated back v3
With GLX_SWAP_COPY_OML and GLX_SWAP_EXCHANGE_OML it may happen in situations
when glXSwapBuffers() is immediately followed by for example another
glXSwapBuffers() or glXCopyBuffers() or back buffer age querying, that we
haven't yet allocated and initialized a new back buffer because there was
no GL rendering in between.
Make sure that we have a back buffer in those situations.
v2: Eliminate the drawable have_back_format member.
v3: Make sure we re-initialize the back even if it exists.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Thomas Hellstrom [Thu, 10 Aug 2017 15:34:05 +0000 (17:34 +0200)]
loader_dri3: Support GLX_SWAP_EXCHANGE_OML
Add support for the exchange swap method. Since we're now forcing a fake front
buffer and we exchange the back and fake front on swaps, we don't need to add
much code.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Thomas Hellstrom [Thu, 10 Aug 2017 15:20:49 +0000 (17:20 +0200)]
loader_dri3: Eliminate the back-to-fake-front copy
Eliminate the back-to-fake-front copy by exchanging the previous back buffer
and the fake front buffer. This is a gain except when we need to preserve
the back buffer content but in that case we still typically gain by replacing
a server-side blit by a client side non-flushing blit.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Thomas Hellstrom [Wed, 28 Jun 2017 06:31:56 +0000 (08:31 +0200)]
loader_dri3: Remove buffer_type from buffer metadata
It's not used anywhere and now that we're about to exchange back- and
fake fronts it doesn't serve a purpose.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Thomas Hellstrom [Thu, 10 Aug 2017 15:10:47 +0000 (17:10 +0200)]
loader_dri3: Support GLX_SWAP_COPY_OML
Support the GLX_SWAP_COPY_OML method. When this method is requested, we use
the same swapbuffer code path as EGL_BUFFER_PRESERVED.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Thomas Hellstrom [Thu, 10 Aug 2017 14:14:23 +0000 (16:14 +0200)]
loader_dri3: Honor the request to preserve back buffer content
EGL uses the force_copy parameter to loader_dri3_swap_buffers_msc() to indicate
that it wants to preserve back buffer contents across a buffer swap.
While the loader then turns off server-side page-flipping there's nothing to
guarantee that a new backbuffer isn't chosen when EGL starts to render again,
and that buffer's content is of course undefined.
So rework the functionality:
If the client supports local blits, allow server-side page flipping and when
a new back is grabbed, if needed, blit the old back's content to the new back.
If the client doesn't support local blits, disallow server-side page-flipping
to avoid a client deadlock and then, when grabbing a new back buffer, sleep
until the old back is idle, which may take a substantial time depending on
swap interval.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Thomas Hellstrom [Thu, 10 Aug 2017 13:59:58 +0000 (15:59 +0200)]
loader_dri3: Increase the likelyhood of reusing the current swap buffer
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Thomas Hellstrom [Thu, 10 Aug 2017 13:35:39 +0000 (15:35 +0200)]
loader_dri3/glx/egl: Optionally use a blit context for blitting operations
The code was relying on us always having a current context for client local
image blit operations. Otherwise the blit would be skipped. However,
glxSwapBuffers, for example, doesn't require a current context and that was a
common problem in the dri1 era. It seems the problem has resurfaced with dri3.
If we don't have a current context when we want to blit, try creating a private
dri context and maintain a context cache of a single context.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Thomas Hellstrom [Fri, 11 Aug 2017 07:57:51 +0000 (09:57 +0200)]
loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callback
It's not very usable since in the rare, but definitely existing case that
we don't have a current context, it will return NULL.
Presumably it will always be safe to use the dri screen the drawable was
created with for operations on that drawable.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Ilia Mirkin [Wed, 16 Aug 2017 04:33:34 +0000 (00:33 -0400)]
nv50/ir: fix TXQ srcMask
src0.x is always read for the LOD, irrespective of which outputs are
read.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Ilia Mirkin [Wed, 16 Aug 2017 04:25:40 +0000 (00:25 -0400)]
nv50/ir: fix srcMask computation for TG4 and TXF
This affects which inputs are marked as used. In a situation where only
the texture instruction uses an input, it might have been ignored as
unused due to input masks.
Affects subtests of KHR-GL45.texture_cube_map_array.sampling
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Jason Ekstrand [Thu, 17 Aug 2017 01:43:11 +0000 (18:43 -0700)]
anv/gem: Add a stub for sync_file_merge
This fixes make check
Fixes:
5c4e4932e02164e18cba9ae2cf3ec56afa2f2a6b
Dave Airlie [Wed, 16 Aug 2017 23:17:20 +0000 (00:17 +0100)]
radv: disable texture gather workaround on gfx9.
Not required anymore.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Wed, 16 Aug 2017 15:50:34 +0000 (09:50 -0600)]
st/mesa: remove Windows hack for glFinish
I see no evidence that opengl32.dll's wglSwapBuffers calls glFinish.
It looks like Jose removed that dependency years ago, but this hack
remained.
Removing this code also fixes the Piglit sync_api test since commit
eceb6710024716.
No piglit regressions. No glretrace regressions, per Charmaine.
Fixes VMware bug 1937990.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Frank Richter [Tue, 15 Aug 2017 13:46:35 +0000 (15:46 +0200)]
gallium/os: fix os_time_get_nano() to roll over less
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102241
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Frank Richter [Mon, 14 Aug 2017 14:05:22 +0000 (16:05 +0200)]
st/wgl: check for negative delta in wait_swap_interval()
This can happen because of rollover. See bug report for details.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102241
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Frank Richter [Wed, 7 Jun 2017 12:40:23 +0000 (14:40 +0200)]
st/mesa: fix a null pointer access
Fixes crash with llvmpipe on Windows.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102148
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
Kenneth Graunke [Wed, 16 Aug 2017 23:09:29 +0000 (16:09 -0700)]
i965: Alphabetize TCS image dirty bits
Trivial.
Chris Wilson [Sat, 5 Aug 2017 09:39:59 +0000 (10:39 +0100)]
i965: Always allow CPU readback of the scanout on LLC platforms
LLC platforms are magic in that reads from the CPU are always cache
coherent, or rather GPU writes that bypass LLC do still invalidate the
appropriate cache line.
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tim Rowley [Tue, 8 Aug 2017 01:33:24 +0000 (20:33 -0500)]
swr/rast: Fix invalid casting for calls to Interlocked* functions
CID: 1416243, 1416244, 1416255
CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
Boyuan Zhang [Wed, 16 Aug 2017 18:24:29 +0000 (14:24 -0400)]
radeon/vce: support all firmwares with major ver 53
The vce firmware interface should now be stable, all firmwares with
major version equals to 53 are supported.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
Tapani Pälli [Tue, 15 Aug 2017 06:26:09 +0000 (09:26 +0300)]
i965: make sure check_and_emit_atom gets inlined
Improves performance of 3DMark "Ice Storm Unlimited" benchmark
by 1-2% on Apollolake (on Android-IA using clang 3.8.256229).
Change is based on the performance profiling work and results
by Aravindan Muthukumar and Yogesh Marathe.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Aravindan Muthukumar <aravindan.muthukumar@intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Ilia Mirkin [Tue, 15 Aug 2017 05:38:17 +0000 (01:38 -0400)]
a2xx: only update rasterizer settings when they're there
The rasterizer being empty can happen e.g. during clears
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Tue, 15 Aug 2017 03:38:52 +0000 (23:38 -0400)]
a2xx: add logicop support
This passes both gl-1.0-logicop and gl-1.1-xor piglits.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Tue, 15 Aug 2017 17:47:08 +0000 (13:47 -0400)]
glsl/ast: update rhs in addition to the var's constant_value
We continue in the code to do some more things with the rhs, including
setting a constant initializer. If the type is wrong, this causes some
confusion down the line, leading to assertions. This makes sure that the
rhs processing continues to flow as-if the type was correct to start
with (even though the state has been marked as an error state).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101766
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
Jason Ekstrand [Thu, 13 Jul 2017 22:23:21 +0000 (15:23 -0700)]
anv: Advertise VK_KHR_external_semaphore
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Tue, 11 Apr 2017 01:36:42 +0000 (18:36 -0700)]
anv: Use DRM sync objects for external semaphores when available
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Tue, 11 Apr 2017 01:27:46 +0000 (18:27 -0700)]
anv/gem: Add a drm syncobj support
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Fri, 30 Jun 2017 17:26:58 +0000 (10:26 -0700)]
intel/drm: Pull in the i915 fence array API
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Wed, 10 May 2017 21:28:33 +0000 (14:28 -0700)]
anv: Implement support for exporting semaphores as FENCE_FD
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Tue, 28 Feb 2017 02:02:02 +0000 (18:02 -0800)]
anv/gem: Use EXECBUFFER2_WR when the FENCE_OUT flag is set
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Tue, 28 Feb 2017 00:34:13 +0000 (16:34 -0800)]
anv: Submit a dummy batch when only semaphores are provided.
Vulkan allows you to do a submit whose only job is to wait on and
trigger semaphores. The easiest way for us to support that right
now is to insert a dummy execbuf.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Jason Ekstrand [Thu, 13 Jul 2017 22:14:31 +0000 (15:14 -0700)]
anv: Add a basic implementation of VK_KHX_external_semaphore
This patch adds an implementation based on DRM BOs. We don't actually
advertise the extension yet because we want to add a couple more paths
first.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Aaron Watry [Fri, 4 Aug 2017 01:55:18 +0000 (20:55 -0500)]
clover/event: Include additional event statuses for clSetEventCallback
From CL 2.0 Section 5.11 (Event Objects):
clSetEventCallback returns CL_SUCCESS if the function is executed successfully. Otherwise, it
returns one of the following errors:
...
CL_INVALID_VALUE if pfn_event_notify is NULL or if command_exec_callback_type is
not CL_SUBMITTED , CL_RUNNING or CL_COMPLETE .
Fixes: OpenCL CTS test_conformance/events/test_events callbacks
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Jonas Pfeil [Sat, 29 Jul 2017 19:23:52 +0000 (21:23 +0200)]
broadcom/vc4: Port NEON-code to ARM64
Changed all register and instruction names, works the same.
v2: Rebase on build system changes (by anholt)
v3: Fix build on clang (by anholt, reported by Rob)
Signed-off-by: Jonas Pfeil <pfeiljonas@gmx.de>
Tested-by: Rob Herring <robh@kernel.org>
Eric Anholt [Mon, 31 Jul 2017 21:59:38 +0000 (14:59 -0700)]
broadcom/vc4: Build the vc4_tiling_lt_neon.c with -mfpu=neon on ARM.
If you don't pass this, the compiler refuses to compile the assembly for
pre-v7 CPUs. This also keeps us from building identical, non-NEON code on
aarch64 and x86.
Fixes:
a373f77662c5 ("vc4: Use a wrapper file to set VC4_BUILD_NEON instead of CFLAGS.")
v2: Fix Android build by just appending NEON_C_SOURCES when
ARCH_ARM_HAVE_NEON.
Tested-by: Rob Herring <robh@kernel.org>
Eric Anholt [Mon, 31 Jul 2017 22:15:14 +0000 (15:15 -0700)]
configure.ac: Introduce HAVE_ARM_ASM/HAVE_AARCH64_ASM and the -D flags.
I've been trying to get away without these conditionals in vc4's NEON
code, but it meant compiling extra unused code on x86, and build failing
on ARMv6.
v2: Use the _arm/_arm64 flags to simplify detection (suggested by Rob),
but hide the _arm version under ARCH_ARM_HAVE_NEON to keep from trying
to build this stuff for armv5te.
Tested-by: Rob Herring <robh@kernel.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Mon, 31 Jul 2017 21:47:12 +0000 (14:47 -0700)]
util: Fix build on old glibc.
We need to link librt for u_thread.h's clock_gettime() call.
Fixes:
b822d9dd67b5 ("gallium/util: move u_queue.{c,h} to src/util")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Mon, 31 Jul 2017 22:04:02 +0000 (15:04 -0700)]
broadcom: Add v3d_xml.h to gitignore.
Eric Anholt [Mon, 31 Jul 2017 21:35:53 +0000 (14:35 -0700)]
broadcom: Add missing libexpat cflags for the decoder.
The Raspbian ARMv6 cross compiler wasn't picking up my (amd64) system copy
of the header the way that the system gcc and armhf cross-compile did.
Dave Airlie [Tue, 15 Aug 2017 05:28:09 +0000 (15:28 +1000)]
radv/gfx9: for fast clear use is_linear flag.
The legacy test won't work on gfx9.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
David Airlie [Tue, 15 Aug 2017 02:40:41 +0000 (12:40 +1000)]
radv/gfx9: fix tile swizzle handling for gfx9
This sets the tile swizzle up properly for gfx9.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
David Airlie [Tue, 15 Aug 2017 04:02:54 +0000 (14:02 +1000)]
radv/gfx9: handle GFX9 opaque metadata
port the opaque metadata changes from radeonsi for gfx9.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
David Airlie [Tue, 15 Aug 2017 04:20:16 +0000 (14:20 +1000)]
radv: emit db_htile_surface reg on gfx9 as well
This is also a GFX9 register.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 15 Aug 2017 05:18:04 +0000 (15:18 +1000)]
radv/gfx9: remove some leftover gfx6 descriptor setup.
We set this later in the non-gfx9 path, just remove these
bits from here.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 15 Aug 2017 05:17:38 +0000 (15:17 +1000)]
radv/gfx9: fix set predication packet.
The predication packet changed format on GFX9, update the driver.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Scott D Phillips [Fri, 4 Aug 2017 22:21:43 +0000 (22:21 +0000)]
intel/genxml: Fix gen10 BLEND_STATE variable length packing
BLEND_STATE packing was modified to be variable-length in:
9670124e31 genxml: Make BLEND_STATE command support variable length array.
The initial gen10.xml still had the old, fixed-length style
definition for BLEND_STATE. So gen10_upload_blend_state would
overwrite the packed BLEND_STATE_ENTRYs with its own fixed array
of all-zero entries when packing BLEND_STATE. This caused
BLEND_STATE upload to not work at all.
Fixes:
aa416f515a ("i965/genxml: Add gen10.xml")
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Timothy Arceri [Tue, 15 Aug 2017 10:42:29 +0000 (20:42 +1000)]
mesa: count uniform against storage when its bindless
Gallium drivers use this code path so we need to account for
bindless after all.
Fixes:
365d34540f33 ("mesa: correctly calculate the storage offset for i915")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Sun, 13 Aug 2017 17:22:06 +0000 (19:22 +0200)]
radeonsi: disable CE by default
It makes performance worse by a very small (hard to measure) amount.
We've done extensive profiling of this feature internally.
Cc: 17.1 17.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Christian König <christian.koenig@amd.com>
Dave Airlie [Mon, 14 Aug 2017 06:01:54 +0000 (07:01 +0100)]
radeonsi: initialise imported surface to 0.
For memobj imports we weren't setting the surface to 0, which
meant sometimes we'd end up with tile_swizzle garbage, which
would corrupt rendering.
This seems to fix the image corruption on the imported memory
objects in vrdashboard for me.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>