summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* anv: query CS timestamp frequency from the kernelLionel Landwerlin2017-12-041-0/+13
| | | | | | | | | The reference value in gen_device_info isn't going to be acurate on Gen10+. We should query it from the kernel, which reads a couple of register to compute the actual value. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* i965: read CS timestamp frequency from the kernel on Gen10+Lionel Landwerlin2017-12-041-0/+24
| | | | | | | | | | | | | | | We cannot figure this value out of the PCI-id anymore. Let's read it from the kernel (which computes this from a few registers). When running on a (upcoming) 4.16-rc1+ kernel, this will fixes piglit tests on CNL : spec@arb_timer_query@query gl_timestamp spec@arb_timer_query@timestamp-get spec@ext_timer_query@time-elapsed Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* drm-uapi: Update drm/i915 headers from drm-nextLionel Landwerlin2017-12-044-6/+151
| | | | | | | Taken from drm-next ca797d29cd63e7b71b4eea29aff3b1cefd1ecb59 Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* radv: Implement VK_KHR_get_surface_capabilities2Jason Ekstrand2017-12-042-0/+27
| | | | | | | | The WSI core code does all the hard work. Just add the wrappers and turn it on. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Initialize individual WSI interfaces in wsi_device_initJason Ekstrand2017-12-045-74/+64
| | | | | | | | Now that we have anv_device_init/finish functions, there's no reason to have the individual driver do any more work than that. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Drop some unneeded cruft from the APIJason Ekstrand2017-12-045-56/+10
| | | | | | | | This drops the unneeded callbacks struct as well as the queue_get_family callback we were using before we'd pulled QueuePresent inside. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add wrappers for all of the surface queriesJason Ekstrand2017-12-045-83/+192
| | | | | | | This lets us move wsi_interface to wsi_common_private.h Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Drop the can_handle_different_gpu parameter from get_supportJason Ekstrand2017-12-045-9/+2
| | | | | | | Both anv and radv can handle prime now. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Move wsi_swapchain to wsi_common_private.hJason Ekstrand2017-12-042-45/+47
| | | | | | | The drivers no longer poke at this directly. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add a helper for AcquireNextImageJason Ekstrand2017-12-044-13/+43
| | | | | | | | | Unfortunately, due to the fact that AcquireNextImage does not take a queue, the ANV trick for triggering the fence won't work in general. We leave dealing with the fence up to the caller for now. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: move swapchain create/destroy to common codeDave Airlie2017-12-044-64/+63
| | | | | | | | | | v2 (Jason Ekstrand): - Rebase - Alter the names of the helpers to better match the vulkan entrypoints - Use the helpers in anv Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Move prime blitting into queue_presentJason Ekstrand2017-12-045-62/+19
| | | | | | | | This lets us save a QueueSubmit and it also makes prime a lot less X11-specific. Also, it means we can only wait on the semaphores once instead of on every blit. Reviewed-by: Dave Airlie <[email protected]>
* vulkan/wsi: Move get_images into common codeJason Ekstrand2017-12-046-57/+40
| | | | | | | | | This moves bits out of all four corners (anv, radv, x11, wayland) and into the wsi common code. We also switch to using an outarray to ensure we get our return code right. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/wsi: Enable prime supportJason Ekstrand2017-12-041-1/+1
| | | | | | | | Now that we're using the same common code as radv, we get prime support for free. Just enable it. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/wsi: Use the common QueuePresent codeJason Ekstrand2017-12-041-57/+6
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Set a proper pWaitDstStageMask on the dummy submitJason Ekstrand2017-12-041-0/+17
| | | | | | | | Neither mesa driver really cares, but we should set it none the less for the sake of correctness. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Only wait on semaphores on the first swapchainJason Ekstrand2017-12-041-2/+7
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Refactor result handling in queue_presentJason Ekstrand2017-12-041-26/+28
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radv/wsi: Move the guts of QueuePresent to wsi commonDave Airlie2017-12-043-87/+93
| | | | | | | | | | | | v2 (Jason Ekstrand): - Better comit message - Rebase - Re-indent to follow wsi_common style - Drop the unneeded _swapchain from the newly added helper - Make the clone more true to the original (as per the rebase) Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add a WSI_FROM_HANDLE macroJason Ekstrand2017-12-041-0/+3
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radv/wsi: drop allocate memory special caseDave Airlie2017-12-042-20/+6
| | | | | | | | | | | Just check if image has scanout flag set v2 (Jason Ekstrand): - Rebase - Also drop the now unused radv_mem_flag_bits enum Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Do image creation in common codeJason Ekstrand2017-12-047-303/+146
| | | | | | | | | | | This uses the mock extension created in a previous commit to tell the driver that the image it's just been asked to create is, in fact, a window system image with whatever assumptions that implies. There was a lot of redundant code between the two drivers to do basically exactly the same thing. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Implement prime in a completely generic wayJason Ekstrand2017-12-047-180/+475
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radv: Move wsi initialization later in physical_device_initJason Ekstrand2017-12-041-6/+7
| | | | | | | | We need it to happen after memory type setup so that we can query memory types in wsi_device_init. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radv/image: Implement the wsi "extension"Jason Ekstrand2017-12-042-2/+12
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/image: Implement the wsi "extension"Jason Ekstrand2017-12-042-4/+37
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv: Require a dedicated allocation for modified imagesJason Ekstrand2017-12-041-4/+49
| | | | | | | | This lets us set the BO tiling when we allocate the memory. This is required for GL to work properly. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/image: Add a drm_format_mod fieldJason Ekstrand2017-12-042-0/+7
| | | | | | | At the moment, this is always initialized to DRM_FORMAT_MOD_INVALID. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radv: Implement VK_EXT_external_memory_dma_bufJason Ekstrand2017-12-043-12/+29
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv: Implement VK_EXT_external_memory_dma_bufJason Ekstrand2017-12-043-17/+34
| | | | | | | | | This is a modified version of the patch originally sent by Chad Versace. The primary difference is that this version claims that OPQAUE_FD and DMA_BUF are compatible handle types. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add a mock image creation extensionJason Ekstrand2017-12-041-0/+18
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add wsi_swapchain_init/finish functionsJason Ekstrand2017-12-047-4/+83
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add a wsi_device_init functionJason Ekstrand2017-12-046-2/+60
| | | | | | | | This gives the opportunity to collect some function pointers if we'd like which will be very useful in future. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi/x11: Handle the geometry check earlier in create_swapchainJason Ekstrand2017-12-041-9/+10
| | | | | | | | | This fixes a potential leak if allocating the swapchain fails. Since geometry checking and bit-depth fetching is self-contained, it makes sense to just do it first so we can delete the geometry reply. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: Add a wsi_image structureDaniel Stone2017-12-045-93/+65
| | | | | | | | | | | | | This is used to hold information about the allocated image, rather than an ever-growing function argument list. v2 (Jason Ekstrand): - Rename wsi_image_base to wsi_image Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi: use function ptr definitions from the spec.Dave Airlie2017-12-044-6/+8
| | | | | | | This just seems cleaner, and we may expand this in future. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Emit CS stall before MEDIA_VFE_STATE.Kenneth Graunke2017-12-041-0/+12
| | | | | | | | | | | This fixes hangs on GFXBench 5's Aztec Ruins benchmark. Unfortunately, it regresses OglCSCloth performance by about 10%. There are some ideas for fixing that. The Vulkan driver already emits this stall. Reviewed-by: Matt Turner <[email protected]>
* i965: Move PIPE_CONTROL defines and prototypes to brw_pipe_control.h.Kenneth Graunke2017-12-044-62/+90
| | | | | | | | | We need to be able to emit PIPE_CONTROLs from genX_state_upload.c, which can't safely include brw_defines.h because it conflicts with genxml. Move all the PIPE_CONTROL related stuff together into a separate header. Reviewed-by: Matt Turner <[email protected]>
* spirv: Replace unreachable with vtn_failJason Ekstrand2017-12-046-111/+118
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* spirv: Replace assert with vtn_assertJason Ekstrand2017-12-045-249/+251
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* spirv: Add vtn_fail and vtn_assert helpersJason Ekstrand2017-12-042-0/+67
| | | | | | | | | | | | | These helpers are much nicer than just using assert because they don't kill your process. Instead, it longjmps back to spirv_to_nir(), cleans up all the temporary memory, and nicely returns NULL. While crashing is completely OK in the Vulkan world, it's not considered to be quite so nice in GL. This should help us to make SPIR-V parsing much more robust. The one downside here is that vtn_assert is not compiled out in release builds like assert() is so it isn't free. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* util: Add a NORETURN macroJason Ekstrand2017-12-043-0/+11
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* spirv: Do something useful with OpSourceJason Ekstrand2017-12-041-1/+21
| | | | | | | We may as well log the source language and file name. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* spirv: Rework loggingJason Ekstrand2017-12-044-18/+119
| | | | | | | | | | | | | | | | This commit reworks the way that logging works in SPIR-V to provide richer and more detailed logging infrastructure. This commit contains several improvements over the old mechanism: 1) Log messages are now more detailed. They contain the SPIR-V byte offset as well as source language information from OpSource and OpLine. 2) There is now a logging callback mechanism so that errors can get propagated to the client through debug callbak extensions. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* spirv: Re-arrange vtn_builder initializationJason Ekstrand2017-12-041-6/+7
| | | | | | | | This simply moves allocating the vtn_builder and initializing it to the very beginning before we even parse the header. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* spirv: Parent the nir_shader to the builder while buildingJason Ekstrand2017-12-041-1/+4
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* freedreno: mark stencil buffer valid too in case of z32x24s8Rob Clark2017-12-042-2/+4
| | | | | | | | | | | | The separate stencil buffer was not also getting marked as valid if written by a draw/clear, resulting in gmem2mem getting skipped. Move this into fd_batch_resource_used() which also handles the separate stencil case. Also fix restore_buffers typo. Fixes: 4ab6ab80365 freedreno: avoid mem2gmem for invalidated buffers Signed-off-by: Rob Clark <[email protected]>
* freedreno: remove use of u_transferRob Clark2017-12-0411-41/+30
| | | | | | | Freedreno doesn't treat buffers and images differently, so it's use was kind of pointless. Signed-off-by: Rob Clark <[email protected]>
* freedreno: add -Wno-packed-bitfield-compat for meson buildEric Engestrom2017-12-041-2/+12
| | | | | | | | | | | Otherwise huge amount of spam from instr-a2xx.h.. gcc has no way to know that freedreno was never built with such an old gcc version to care about the bugs in old gcc ;-) Reported-by: Rob Clark <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> [added commit message] Signed-off-by: Rob Clark <[email protected]>
* glsl: don't run intrastage array validation when the interface type is not ↵Samuel Iglesias Gonsálvez2017-12-041-1/+1
| | | | | | | | | | | | | | | | | an array We validate that the interface block array type's definition matches. However, previously, the function could be called if an non-array interface block has different type definitions -for example, when the precision qualifier differs in a GLSL ES shader, we would create two different types-, and it would return invalid as both definitions are non-arrays. We fix this by specifying that at least one definition should be an array to call the validation. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>