summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* meson: sort gallium drivers after winsysDylan Baker2017-12-041-8/+8
| | | | | | | | | | This is a requirement of the next patch. Since meson does not have forward declarations, and we're going to define the driver dependencies in the drivers folder they need to be after the winsys so that the winsys libs are defined first. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Combine gallium target subdirsDylan Baker2017-12-041-10/+4
| | | | | | | | | So that state trackers, targets, and special winsys requirements are all in a single if statement. This is a cosmetic only cleanup with no functional changes. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i965/cnl: Avoid fast-clearing sRGB render buffersNanley Chery2017-12-041-2/+12
| | | | | | | | | | | | | | Gen10 doesn't automatically decode the clear color of sRGB buffers. To get correct rendering, avoid fast-clearing such buffers for now. The driver now passes the following piglit tests: * spec@arb_framebuffer_srgb@msaa-fast-clear * spec@ext_texture_srgb@multisample-fast-clear gl_ext_texture_srgb Suggested-by: Kenneth Graunke <[email protected]> Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* meson: Fix overlinkage of dri3 loaderDylan Baker2017-12-041-2/+1
| | | | | | | | | | | | This was covering for underinkage elsewhere. With that fixed these can be removed. v2: - sort dependencies Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jon Turney <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]>
* meson: fix underlinkage without dri3Dylan Baker2017-12-042-2/+3
| | | | | | | | | | | | | There are some case where the dri3 loader is covering for underlinkage for GLX and EGL, provide the linkage that they actually need. v2: - remove dep_xcb_dri3 from glx. This was an oversight in v1 and is not needed. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jon Turney <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]>
* meson: Reformat glx code to match more common styleDylan Baker2017-12-041-5/+8
| | | | | | | | | | | | | | | Generally in our meson build large arrays are formated in the form: [ ..., ..., ..., $ ..., ] So use that form Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jon Turney <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* radv: fix a crash in radv_can_dump_shader()Samuel Pitoiset2017-12-041-2/+2
| | | | | | | module can be NULL, oops. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* intel/isl: Declare private array as static constChad Versace2017-12-041-1/+1
| | | | | | | | It's array isl_drm.c:modifier_info[] . Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* meson: Install dri.pc file when building gallium dri driversDylan Baker2017-12-041-7/+11
| | | | | | | | | | | Currently this pkg-config file is only installed if a classic dri driver is built. This is wrong, it should be installed if any dri driver is installed, which includes the gallium dri target. Reported-by: Marc Dietrich <[email protected]> Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* 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]>
* 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-041-0/+6
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>