summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* anv/pass: Use anv_multialloc for allocating the anv_passJason Ekstrand2017-04-072-63/+44
| | | | Reviewed-by: Nanley Chery <[email protected]>
* anv/descriptor_set: Use anv_multialloc for descriptor set layoutsJason Ekstrand2017-04-071-11/+10
| | | | Reviewed-by: Nanley Chery <[email protected]>
* anv: Add a helper for doing mass allocationsJason Ekstrand2017-04-071-0/+96
| | | | | | | | | | | We tend to try to reduce the number of allocation calls the Vulkan driver uses by doing a single allocation whenever possible for a data structure. While this has certain downsides (usually code complexity), it does mean error handling and cleanup is much easier. This commit adds a nice little helper struct for getting rid of some of that complexity. Reviewed-by: Nanley Chery <[email protected]>
* anv: Add helpers for converting access flags to pipe bitsJason Ekstrand2017-04-072-45/+62
| | | | Reviewed-by: Nanley Chery <[email protected]>
* mesa: simplify and optimise vertex bindings trackingTimothy Arceri2017-04-081-5/+3
| | | | | | | | We only need to update it if something changes. Also _mesa_bind_vertex_buffer() will update the mask when binding to a NULL or default buffer so no need to do that update here. Reviewed-by: Juan A. Suarez Romero <[email protected]>
* glsl: fix lower jumps for nested non-void returnsTimothy Arceri2017-04-082-1/+10
| | | | | | | | Fixes the case were a loop contains a return and the loop is nested inside an if. Reviewed-by: Roland Scheidegger <[email protected]> https://bugs.freedesktop.org/show_bug.cgi?id=100303
* gallium: fix some math formulas to display betterIlia Mirkin2017-04-071-16/+16
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* nvc0/ir: fix LSB/BFE/BFI implementationsIlia Mirkin2017-04-071-8/+11
| | | | | | | | | Overwriting the src register is a very bad idea - it logically maps onto the TGSI registers, and so is effectively overwriting the source values. Reported-by: Boyan Ding <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* util: fix swizzle of INSTANCEID system valueNicolai Hähnle2017-04-081-1/+1
| | | | | | | | radeonsi added stricter checking for correct swizzles in debug builds. Reported-by: Michel Dänzer <[email protected]> Fixes: 4cf29427770f ("radeonsi: support 64-bit system values") Reviewed-by: Marek Olšák <[email protected]>
* st/glx: Add awareness for multisample pixel formats to st/glx-xlib.Bruce Cherniak2017-04-073-15/+30
| | | | | | | | | | | | | In preparation for enabling MSAA in OpenSWR, the state trackers need to be aware of multisample pixel formats for software renderers. This patch allows glx-xlib to query the renderer for support of pixel formats with multisample, and create multisample resources. This change is benign to softpipe and llvmpipe, as is_format_supported returns FALSE for any sample_count > 1. OpenSWR does the same at the moment, but that will change soon. Reviewed-by: Roland Scheidegger <[email protected]>
* swr: fix unused variable warningsTim Rowley2017-04-072-2/+0
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* glx: silence uninitialized var warningBrian Paul2017-04-071-1/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* st/mesa: silence unused/uninitialized var warningsBrian Paul2017-04-071-1/+2
| | | | Signed-off-by: Brian Paul <[email protected]>
* gallivm: init vars to silence gcc warningsBrian Paul2017-04-071-2/+2
| | | | | | Silence warnings about using possibly uninitialized values. Signed-off-by: Brian Paul <[email protected]>
* svga: add context pointer to the invalidate surface interfaceCharmaine Lee2017-04-078-27/+35
| | | | | | | | | | | | | | With this patch, we will specify the current context when we invalidate the surface before the surface is put back to the recycled surface pool. This allows the winsys layer to use the specified context to do the invalidation rather than using the last context that referenced the surface. This prevents race condition if the last referenced context is now made current in another thread. Tested with MTT glretrace, NobelClinicianViewer. Reviewed-by: Sinclair Yeh <[email protected]>
* winsys/svga: use c11 thread types/functionsBrian Paul2017-04-073-13/+13
| | | | | | Gallium no longer has wrappers for mutexes and condition variables. Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga: Resolve command submission buffer contention v3Thomas Hellstrom2017-04-073-2/+38
| | | | | | | | | | | | | | | | | | | | | If two contexts wanted to access the same buffer at the same time, it would end up on two validation lists simultaneously, which might cause a PIPE_ERROR_RETRY when trying to validate it from one context while the other context already had it validated but not yet fenced. In that situation we could spin until the error goes away, or apply various more or less expensive locking schemes to save cpu. Here we use a scheme that briefly locks after fencing but avoids locking on validation in the non-contended case. v2: Make sure we broadcast not only on releasing buffers after fencing, but also after releasing buffers in the pb_validate_validate error path. v3: Don't broadcast on PIPE_ERROR_RETRY because that would increase the chance of starvation. Signed-off-by: Thomas Hellstrom <[email protected]>
* svga: remove pre-SVGA3D_HWVERSION_WS8_B1 codeBrian Paul2017-04-071-71/+5
| | | | | | | | 3D wasn't officially supported before virtual HW version 8 so we can remove this old code. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* st/wgl: sort strings in stw_extension_string[] arrayBrian Paul2017-04-071-3/+3
| | | | Trivial.
* svga: remove redundant surface propagationCharmaine Lee2017-04-072-12/+8
| | | | | | | | | | | Currently, surface propagation for colliding render target resource is done at framebuffer emit time for vgpu10. This patch adds the surface propagation for non-vgpu10 path to emit_fb_vgpu9() and removes the redundant surface copy at set time. Tested with MTT glretrace, piglit, NobelClinicianViewer, Turbine, Cinebench. Reviewed-by: Neha Bhende <[email protected]>
* svga: Fix zslice index to svga_texture_copy_handle_resource()Charmaine Lee2017-04-071-7/+10
| | | | | | | | | | | The zslice index to svga_texture_copy_handle_resource() is not adjusted and should be a signed integer. This patch fixes piglit tests for non-vgpu10 including spec@arb_framebuffer_object@fbo-generatemipmap-3d [email protected]@execution@tex-miplevel-selection gl2:texture* 3d Tested with MTT piglit and glretrace
* svga: specify include path for git_sha1.h for out-of-src buildsBrian Paul2017-04-071-0/+3
| | | | | | | If we're doing an out-of-src build, we need to specify the #include patch to find git_sha1.h Reviewed-by: Charmaine Lee <[email protected]>
* st/wgl: pseudo-implementation of WGL_EXT_swap_controlBrian Paul2017-04-077-12/+86
| | | | | | | | | | | | | | | | | | | | | This implementation is based on querying the time just before swap/present and doing a Sleep() if needed. There is no sync to vblank or actual coordination with the GPU. This isn't perfect, but basically works. We've had some request for this functionality, and it sounds like there are some Windows GL apps that refuse to start if the driver doesn't advertise this extension. Note: NVIDIA's Windows OpenGL driver advertises the WGL_EXT_swap_control string both with wglGetExtensionsStringEXT() and with glGetString(GL_EXTENSIONS). We're only advertising it with the former at this time. Tested with asst. Mesa demos, Google Earth, Lightsmark, etc. VMware bug 1591534. Reviewed-by: José Fonseca <[email protected]>
* svga: Fix out-of-sync backing surfaceCharmaine Lee2017-04-071-21/+70
| | | | | | | | | | | | | | | When a backing surface is reused, it is possible that the original surface has been changed. So before the backing surface is bound again, we need to sync up the surface. This patch creates a new helper function svga_texture_copy_handle_resource() to sync up the backing surface resource. This patch, together with the backing surface dirty bit fix, fixes the rendering corruption in NobelClinicianViewer when rotating the model. Also tested with MTT glretrace, piglit, Cinebench, Turbine. Reviewed-by: Brian Paul <[email protected]>
* svga: add a reset flag to svga_propagate_surface()Charmaine Lee2017-04-074-8/+19
| | | | | | | | | The reset flag specifies if the dirty bit needs to be reset after the surface is propagated to the texture. This is used to make sure that the dirty bit is not reset and stay unset before the surface is unbound. Reviewed-by: Brian Paul <[email protected]>
* svga: add the has_backed_views flagCharmaine Lee2017-04-073-0/+15
| | | | | | | | | The new has_backed_views flag specifies if any of the render target views or depth stencil view is a backing surface view. The flag is used in svga_propagate_rendertargets() so it can return early if there is no surface to propagate. Reviewed-by: Brian Paul <[email protected]>
* svga: only destroy render target view from a context that created itCharmaine Lee2017-04-071-12/+23
| | | | | | | | | | | | | | A texture can be destroyed from a different context from which it is created, but destroying the render target view from a different context will cause svga device errors. Similar to shader resource view, this patch skips destroying render target view or depth stencil view from a non-parent context. Fixes driver errors running NobelClinician Viewer application. Tested with NobelClinician Viewer, MTT piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* svga: disable rasterization if rasterizer_discard is set or FS undefinedCharmaine Lee2017-04-076-39/+128
| | | | | | | | | | | | | | | | | | | With this patch, rasterization will be disabled if the rasterizer_discard flag is set or the fragment shader is undefined due to missing position output from the vertex/geometry shader. Tested with piglit test glsl-1.50-geometry-primitive-id-restart. Also tested with full MTT glretrace and piglit. v2: As suggested by Roland, to properly disable rasterization, besides setting FS to NULL, we will also need to disable depth and stencil test. v3: As suggested by Brian, set SVGA_NEW_DEPTH_STENCIL_ALPHA dirty bit in svga_bind_rasterizer_state() if the rasterizer_discard flag is changed. Reviewed-by: Brian Paul <[email protected]>
* svga: do not emulate wide points in GS when doing transform feedbackCharmaine Lee2017-04-071-3/+5
| | | | | | | | | | Emulating wide points in geometry shader when doing transform feedback is problematic. This patch disables the emulation. Tested with piglit test ext_transform_feedback-points. Also tested with MTT glretrace, mesa demos pointblast and spriteblast. Reviewed-by: Brian Paul <[email protected]>
* anv/query: Use snooping on !LLC platformsJason Ekstrand2017-04-071-13/+11
| | | | | | | | | | | | | | Commit b2c97bc789198427043cd902bc76e194e7e81c7d which made us start using a busy-wait for individual query results also messed up cache flushing on !LLC platforms. For one thing, I forgot the mfence after the clflush so memory access wasn't properly getting fenced. More importantly, however, was that we were clflushing the whole query range and then waiting for individual queries and then trying to read the results without clflushing again. Getting the clflushing both correct and efficient is very subtle and painful. Instead, let's side-step the problem by just snooping. Reviewed-by: Chris Wilson <[email protected]>
* anv: provide anv_gem_busy() stub for the testsEmil Velikov2017-04-071-0/+6
| | | | | | | | | | | Otherwise linking way fail. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100600 Fixes: f195d40eca4 ("anv/device: Add a helper for querying whether a BO is busy") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Juan A. Suarez Romero <[email protected]> Tested-by: Vinson Lee <[email protected]>
* gallium/util: tweak backtrace format with libunwindRob Clark2017-04-071-10/+16
| | | | | | | To work with addr2line.sh we also need the relative offset within the DSO. And addr2line.sh gets confused by the leading stackframe number. Signed-off-by: Rob Clark <[email protected]>
* gallium/util: cache symbol lookup with libunwindRob Clark2017-04-072-27/+94
| | | | Signed-off-by: Rob Clark <[email protected]>
* gallium/util: fix missing limit check in libunwind backtraceRob Clark2017-04-071-1/+1
| | | | | Fixes: 70c272004f ("gallium/util: libunwind support") Signed-off-by: Rob Clark <[email protected]>
* mesa: fix renderbuffer leakTimothy Arceri2017-04-072-1/+6
| | | | | | | | | | | We don't need to call _mesa_reference_renderbuffer() for the first assignment as refCount starts at 1. For swrast we work around the fact we will indirectly call _mesa_reference_renderbuffer() by resetting refCount to 0. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/blorp: sample input attachments with resolves on BDWSamuel Iglesias Gonsálvez2017-04-071-0/+11
| | | | | | | | | | | | | | On Broadwell we still need to do a resolve between the subpass that writes and the subpass that reads when there is a self-dependency because HW could not see fast-clears and works on the render cache as if there was regular non-fast-clear surface. Fixes 16 tests on BDW: dEQP-VK.renderpass.formats.*.input.clear.store.self_dep* Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv: don't call radeon_check_space in radv_BindDescriptorSetsFredrik Höglund2017-04-071-5/+0
| | | | | | | | This appears to be a leftover from an earlier version of this function. Nothing is emitted into the CS. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: implement VK_KHR_descriptor_update_templateFredrik Höglund2017-04-075-0/+231
| | | | | | | | | | | All offsets and strides are precomputed by radv_CreateDescriptorUpdateTemplateKHR and stored in the template. v2: Move the new struct declarations from radv_descriptor_set.h to radv_private.h (Bas) Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: implement VK_KHR_push_descriptorFredrik Höglund2017-04-076-2/+128
| | | | | Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: replace an assertion with a conditionalFredrik Höglund2017-04-071-3/+3
| | | | | | | | | | | | | | | | Replace the !binding_layout->immutable_samplers assertion in radv_update_descriptor_sets with a conditional. The Vulkan specification does not say that it is illegal to update a sampler descriptor when it is immutable; only that pImageInfo is ignored. This change is also needed for push descriptors, because valid descriptors must be pushed for all bindings accessed by shaders, including immutable sampler descriptors. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: refactor radv_UpdateDescriptorSetsFredrik Höglund2017-04-072-12/+52
| | | | | | | | | | | | | Move the implementation into a separate function that takes a cmd_buffer and a dstSetOverride parameter. When cmd_buffer is not NULL, radv_update_descriptor_sets calls cs_add_buffer directly instead of updating the buffer list. This will be used to implement VK_KHR_push_descriptor. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/radeon: fix typo in radeon_winsys.hSamuel Pitoiset2017-04-071-1/+1
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/main: simplify _mesa_IsRenderbuffer()Samuel Pitoiset2017-04-071-7/+6
| | | | | | | _mesa_lookup_renderbuffer() already checks if 'id' is non-zero. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: stop abstracting texture object hashtable lockingTimothy Arceri2017-04-073-23/+5
| | | | | | | This doesn't do anything useful so just remove it. Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: stop abstracting buffer object hashtable lockingTimothy Arceri2017-04-073-31/+12
| | | | | | | This doesn't do anything useful so just remove it. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* i965/blorp: Bump the batch space estimateJason Ekstrand2017-04-061-1/+1
| | | | | | | | | | | | | | Commit f938354362655a378d474c5f79c52cea9852ab91 recently increased the alignment on vertex buffer data from 32 to 64. This caused us to consume a bit more batch than we were before and we now go over the estimate by a small amount on certain blits on gen8+. This commit bumps then gen8 batch estimate by a bit to compensate. Haswell and older still seems to be well within the limit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100582 Reviewed-by: Iago Toral Quiroga <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Cc: "13.0 17.0" <[email protected]>
* intel/aubinator: Stop searching after a custom handler is foundJordan Justen2017-04-061-1/+3
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/gen_decoder: return -1 for unknown command formatsJordan Justen2017-04-064-17/+27
| | | | | | | | | | | | | | | | | Decoding with aubinator encountered a command of 0xffffffff. With the previous code, it caused aubinator to jump 255 + 2 dwords to start decoding again. Instead we can attempt to detect the known instruction formats. If the format is not recognized, then we can advance just 1 dword. v2: * Update aubinator_error_decode * Actually convert the length variable returned into a *signed* integer in aubinator.c, intel_batchbuffer.c and aubinator_error_decode.c. Signed-off-by: Jordan Justen <[email protected]> Acked-by: Lionel Landwerlin <[email protected]>
* intel/gen_decoder: Fix length for Media State/Object commandsJordan Justen2017-04-061-2/+10
| | | | | | | | From BDW PRM, Volume 6: Command Stream Programming, 'Render Command Header Format'. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/aubinator_error_decode: Fix structure decode dataJordan Justen2017-04-061-1/+1
| | | | | | | | | | The call to gen_print_group should provide a pointer to the beginning of the the structure data, not the start of the batch data. Cc: Lionel Landwerlin <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>