summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: update non-resident bindless descriptors if neededSamuel Pitoiset2017-08-211-30/+55
| | | | | | | | | | 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 <[email protected]> Cc: "17.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* dri3: Move up fourcc utility functionLouis-Francis Ratté-Boulianne2017-08-211-21/+21
| | | | | | | It will be needed in next patches. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl: Add dma_buf_import_modifiers for glvndDaniel Stone2017-08-211-0/+4
| | | | | | | | | | Make sure we advertise the new entrypoints to libglvnd's EGL dispatch. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reported-by: Emmanuel Gil Peyrot <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101982 Fixes: 4c412293d0e ("egl: advertise EGL_EXT_image_dma_buf_import_modifiers")
* intel/blorp: Adjust intra-tile x when faking rgb with red-onlyTopi Pohjolainen2017-08-211-0/+1
| | | | | | | | | | v2 (Jason): Adjust directly in surf_fake_rgb_with_red() Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101910 CC: [email protected] Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* ac/nir: fixup layer/viewport export for GFX9.Dave Airlie2017-08-211-7/+25
| | | | | | | | GFX9 moved where the viewport index export goes. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965/bufmgr: s/BO_ALLOC_FOR_RENDER/BO_ALLOC_BUSY/Jason Ekstrand2017-08-204-19/+18
| | | | | | | | | | "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 <[email protected]>
* i965/tex: Change the flags type on create_for_teximageJason Ekstrand2017-08-201-1/+1
| | | | | | This matches the actual function declaration. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: only copy requested compressed teximage cubemap facesChristoph Haag2017-08-201-2/+2
| | | | | | | | | 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* i965/tex: Don't pass samples to miptree_create_for_teximageJason Ekstrand2017-08-191-1/+1
| | | | | | | | | | | | | | | | | 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 <[email protected]> Fixes: 76e2f390f9863a356d1419982dec705260d67eff Bugzilla: https://bugs.freedesktop.org/102260 Cc: [email protected]
* anv: Use ISL for emitting null surface states.Kenneth Graunke2017-08-191-16/+4
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Use ISL for emitting null surface states.Kenneth Graunke2017-08-197-351/+49
| | | | | | | 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 <[email protected]>
* isl: Add a null surface fill function.Kenneth Graunke2017-08-194-0/+40
| | | | | | | | | | 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 <[email protected]>
* i965: Remove tabs in intel_batchbuffer.c.Kenneth Graunke2017-08-181-7/+7
| | | | | | | Our coding style is to use spaces. Some of this was also messed up during my bufmgr import series. (Trivial, just whitespace changes.)
* i965/miptree: Return NONE from texture_aux_usage when fully resolvedJason Ekstrand2017-08-181-1/+14
| | | | | | | | | | | 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 <[email protected]> Bugzilla: https://bugs.freedesktop.org/102258 Cc: "17.2" <[email protected]>
* i965: Stop looking at NewDriverState when emitting 3DSTATE_URBJason Ekstrand2017-08-183-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Bugzilla: https://bugs.freedesktop.org/102289 Cc: [email protected]
* i965: Mark all EGLimages as non-coherent.Kenneth Graunke2017-08-181-5/+3
| | | | | | | | | | | | | | | | 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" <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chris Wilson <[email protected]>
* broadcom/genxml: Add V3D 3.3 packet definitions.Eric Anholt2017-08-183-0/+802
| | | | | This will be used by the new vc5 gallium driver, and a future Vulkan driver.
* broadcom/genxml: Check the sub-id field when decoding instructions.Eric Anholt2017-08-181-5/+26
| | | | | | 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.
* broadcom/genxml: Emit code for default headers for structs as well.Eric Anholt2017-08-181-14/+13
| | | | | | 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.
* anv: Move a comment that got left behind in the u_vector refactor.Eric Anholt2017-08-182-8/+9
|
* gallium/radeon: remove old_fence parameter from r600_gfx_write_event_eopMarek Olšák2017-08-185-12/+17
| | | | | | just use the new scratch buffer. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: prevent a GPU hang after a timestamp eventMarek Olšák2017-08-185-8/+44
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't use CLEAR_STATE on SIMarek Olšák2017-08-184-10/+63
| | | | | | | | | 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 <[email protected]>
* Fix build when HAVE_LIBDRM isn't definedJon Turney2017-08-181-0/+4
| | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* i965: Fix missing newlines in perf_debug messages.Kenneth Graunke2017-08-172-3/+3
| | | | perf_debug() doesn't append a newline for you.
* glsl: add a few missing int64 constant propagation casesIlia Mirkin2017-08-182-0/+8
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Cc: [email protected]
* glsl: set old ldexp operand to NULL when loweringTimothy Arceri2017-08-181-0/+1
| | | | | | | | | 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 <[email protected]> Tested-by: Brian Paul <[email protected]>
* intel/isl: Replace switch statements of doom with a macroJason Ekstrand2017-08-171-96/+39
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/isl: Reduce header file duplicationJason Ekstrand2017-08-174-101/+78
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* radv: disable support for VEGA for now.Dave Airlie2017-08-181-0/+5
| | | | | | | | | 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" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glxcmds: Fix a typo in the __APPLE__ codepathJeremy Huddleston Sequoia2017-08-171-1/+1
| | | | | | | s/DummyContext/dummyContext/ Regressed-in: 5d9b50e596c9d81c37ce0844ae0f8c9da3f6bea6 Signed-off-by: Jeremy Huddleston Sequoia <[email protected]>
* llvmpipe: enable PIPE_CAP_QUERY_SO_OVERFLOWRoland Scheidegger2017-08-172-1/+4
| | | | | | | | | 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 <[email protected]>
* softpipe: enable PIPE_CAP_QUERY_SO_OVERFLOWRoland Scheidegger2017-08-172-2/+8
| | | | | | | 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 <[email protected]>
* loader_dri3: Make sure we have an updated back v3Thomas Hellstrom2017-08-172-10/+50
| | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3: Support GLX_SWAP_EXCHANGE_OMLThomas Hellstrom2017-08-171-3/+5
| | | | | | | | | 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3: Eliminate the back-to-fake-front copyThomas Hellstrom2017-08-171-19/+31
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3: Remove buffer_type from buffer metadataThomas Hellstrom2017-08-172-4/+0
| | | | | | | | 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3: Support GLX_SWAP_COPY_OMLThomas Hellstrom2017-08-172-1/+10
| | | | | | | | 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3: Honor the request to preserve back buffer contentThomas Hellstrom2017-08-172-3/+52
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3: Increase the likelyhood of reusing the current swap bufferThomas Hellstrom2017-08-171-0/+6
| | | | | Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3/glx/egl: Optionally use a blit context for blitting operationsThomas Hellstrom2017-08-176-67/+196
| | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callbackThomas Hellstrom2017-08-174-35/+1
| | | | | | | | | | | 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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* nv50/ir: fix TXQ srcMaskIlia Mirkin2017-08-161-0/+2
| | | | | | | | src0.x is always read for the LOD, irrespective of which outputs are read. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nv50/ir: fix srcMask computation for TG4 and TXFIlia Mirkin2017-08-161-0/+2
| | | | | | | | | | | 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 <[email protected]> Cc: [email protected]
* anv/gem: Add a stub for sync_file_mergeJason Ekstrand2017-08-161-0/+6
| | | | | | This fixes make check Fixes: 5c4e4932e02164e18cba9ae2cf3ec56afa2f2a6b
* radv: disable texture gather workaround on gfx9.Dave Airlie2017-08-171-1/+1
| | | | | | | | Not required anymore. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: remove Windows hack for glFinishBrian Paul2017-08-161-12/+0
| | | | | | | | | | | | | | 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 <[email protected]>
* gallium/os: fix os_time_get_nano() to roll over lessFrank Richter2017-08-161-1/+8
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102241 Cc: [email protected] Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* st/wgl: check for negative delta in wait_swap_interval()Frank Richter2017-08-161-2/+5
| | | | | | | | | This can happen because of rollover. See bug report for details. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102241 Cc: [email protected] Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: fix a null pointer accessFrank Richter2017-08-161-1/+1
| | | | | | | | Fixes crash with llvmpipe on Windows. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102148 Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>