summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
Commit message (Collapse)AuthorAgeFilesLines
...
* anv/wsi/wayland: add callback to get device format properties.Dave Airlie2016-10-193-7/+27
| | | | | | This avoids having to know the toplevel API name. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/wl: stop using device in more placesDave Airlie2016-10-193-20/+28
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: split out surface creation to avoid instance APIDave Airlie2016-10-192-29/+64
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: move further away from passing anv displays aroundDave Airlie2016-10-194-39/+35
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: split image alloc/free out to separate fns.Dave Airlie2016-10-194-219/+180
| | | | | | | This moves these outside the wsi platform code, so we can reuse that code Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: switch to using VkDevice in swapchainDave Airlie2016-10-194-14/+14
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/x11: more refactoring to use generic handlesDave Airlie2016-10-191-27/+43
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/x11: start refactoring out the image allocation/free functionalityDave Airlie2016-10-191-22/+52
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: drop device from get formatDave Airlie2016-10-194-5/+5
| | | | | | Just use the wsi_device instead. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: remove device from get_support interfaceDave Airlie2016-10-194-5/+10
| | | | | | replace with wsi_device and allocator. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/x11: abstract WSI interface from internals.Dave Airlie2016-10-191-9/+24
| | | | | | | This allows the API and the internals to be split, and the internals shared. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/x11: push anv_device out of the init/finish routinesDave Airlie2016-10-193-15/+19
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: abstract wsi interfaces away from device a bit more.Dave Airlie2016-10-194-24/+28
| | | | | | This is a step towards separating out the wsi code for sharing Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/x11: push device out of x11 connection fns.Dave Airlie2016-10-191-11/+12
| | | | | | just pass the allocator/wsi_interface instead. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: drop device from get capsDave Airlie2016-10-194-4/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: drop get present modes device argDave Airlie2016-10-194-4/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* radv/anv/wsi: drop unneeded parameterDave Airlie2016-10-194-4/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: drop pointless struct decl.Dave Airlie2016-10-191-2/+0
| | | | | Acked-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* anv: move to using vk_alloc helpers.Dave Airlie2016-10-1918-147/+103
| | | | | | | This moves all the alloc/free in anv to the generic helpers. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* anv: drop local MIN/MAX macros.Dave Airlie2016-10-192-5/+2
| | | | | | | Use the ones from mesa, most places already did. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* anv: port to using new u_vector shared helper.Dave Airlie2016-10-195-154/+35
| | | | | | | This just removes the anv vector code and uses the new helper. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* anv: Get rid of anv_cmd_buffer_emit_state_base_addressJason Ekstrand2016-10-173-21/+1
| | | | | | | | All code that would have once called this can now call the gen-specific version. The switching version is no longer needed. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* anv/cmd_buffer: Move descriptor flushing into genX_cmd_buffer.cJason Ekstrand2016-10-174-359/+327
| | | | | | | | It really should have gone here all along. We were trying a bit too hard to make it gen-agnostic just because it didn't have any #if's. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* anv/cmd_buffer: Expose ensure_push_constant_*Jason Ekstrand2016-10-172-6/+9
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* anv/cmd_buffer: Unify flush_compute_state across gensJason Ekstrand2016-10-173-175/+91
| | | | | | | | | With one small genxml change, the two versions were basically identical. The only differences were one #define for HSW+ and a field that is missing on Haswell but exists everywhere else. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* anv/cmd_buffer: Move Begin/End/Execute to genX_cmd_buffer.cJason Ekstrand2016-10-174-95/+107
| | | | | | | | | vkBeginCommandBuffer and vkCmdExecuteCommands both call into the gen-specific emit_state_base_address function and vkEndCommandBuffer belongs with begin. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* anv/cmd_buffer: Move state base address re-emit into ExecuteCommandsJason Ekstrand2016-10-172-6/+9
| | | | | | | | | | | This has two primary advantages. First, it means that the batch_chain code knows less about the actual command buffer contents which is good because improves separation. Second, it means that it only gets re-emitted once after all of the secondaries instead of once after each secondary which is just wasteful. It also has the advantage of cleaning the code up a bit. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* anv: replace , with ; in anv_batch_emit()Lionel Landwerlin2016-10-172-12/+12
| | | | | Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* anv/pipeline: Remove a meta hack from emit_ds_stateJason Ekstrand2016-10-141-4/+1
| | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/image: Create views directly in VkCreate*ViewJason Ekstrand2016-10-142-66/+34
| | | | | | | Without meta, we no longer need the _init helpers and the ability to back an image view with surface states allocated out of the command buffer. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/image: Get rid of the usage hacks for metaJason Ekstrand2016-10-142-97/+28
| | | | | | | | Now that meta is gone and we're using blorp, we don't need all of the usage hacks. Instead, the usage provided by the app is exactly the usage that we want because the app is the only thing creating image views. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: Move Create*Pipelines into genX_cmd_buffer.cJason Ekstrand2016-10-144-122/+61
| | | | | | | | Now that we don't have meta, we have no need for a gen-agnostic pipeline create path. We can, instead, just generate one Create*Pipelines function per gen and be done with it. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/pipeline: Remove support for direct-from-nir shadersJason Ekstrand2016-10-142-77/+54
| | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: Make entrypoint resolution take a gen_device_infoJason Ekstrand2016-10-143-20/+12
| | | | | | | | | | | | In order for things such as the ANV_CALL and the ifuncs to work, we used to have a singleton gen_device_info structure that got assigned the first time you create a device. Given that the driver will never be used simultaneously on two different generations of hardware, this was fairly safe to do. However, it has caused a few hickups and isn't, in general, a good plan. Now that the two primary reasons for this singleton are gone, we can get rid of it and make things quite a bit safer. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: Get rid of the ANV_CALL macroJason Ekstrand2016-10-144-14/+8
| | | | | | | | This macro was needed by meta in order to make gen-specific calls from gen-agnostic code. Now that we don't have meta, the remaining two uses are fairly trivial to get rid of. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: Get rid of graphics_pipeline_create_info_extraJason Ekstrand2016-10-147-101/+35
| | | | | | | | | Now that we no longer have meta, all pipelines get created via the normal Vulkan pipeline creation mechanics. There is no more need for this bit of extra magic data that we've been passing around. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv: Get rid of metaJason Ekstrand2016-10-147-765/+2
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv: Use blorp for subpass clearsJason Ekstrand2016-10-142-298/+81
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv: Use blorp for ClearAttachmentsJason Ekstrand2016-10-142-24/+113
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/hiz: Perform HiZ resolves for all partial rendersJason Ekstrand2016-10-141-1/+11
| | | | | | | | | | | | | | If we don't, we can end up with corruption in the portion of the depth buffer that lies outside the render area when we do a HiZ resolve at the end. The only reason we weren't seeing this before was that all of the meta-based clears such as VkCmdClearDepthStencilImage were internally using HiZ so the HiZ buffer never truly got out-of-sync. If the CTS ever tested a depth upload (which doesn't care about HiZ) and then a partial render we would have seen problems. Soon, we will be using blorp to do depth clears and it won't bother with HiZ so we would get CTS regressions without this. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
* anv: Use blorp for ClearDepthStencilImageJason Ekstrand2016-10-142-141/+59
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/image: Add an isl_view to anv_image_viewJason Ekstrand2016-10-145-26/+26
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/image: Rework our handling of 3-D image array rangesJason Ekstrand2016-10-141-4/+12
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/blorp: Don't hand-roll flush_pipeline_select_3dJason Ekstrand2016-10-141-38/+1
| | | | | | | | When I initially brought up Vulkan blorp, I completely missed that this was already factored out. There's no good reason for us to hand-roll it. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Add a flag to make blorp not re-emit dept/stencil buffersJason Ekstrand2016-10-141-9/+9
| | | | | | | | | | | In Vulkan, we want to be able to use blorp to perform clears inside of a render pass. If blorp stomps the depth/stencil buffers packets then we'll have to re-emit them. This gets tricky when secondary command buffers get involved. Instead, we'll simply guarantee that the depth and stencil buffers we pass to blorp (if any) match those already set in the hardware. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv: error out if anv_genX.h is included by !anv_private.hEmil Velikov2016-10-141-1/+5
| | | | | | | | Update the comment to reflect the correct filename and add a guard to catch incorrect inclusion of the header. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Chad Versace <chadversary@chromium.org>
* anv: use correct header guardsEmil Velikov2016-10-147-5/+29
| | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Chad Versace <chadversary@chromium.org>
* anv: fix the wayland wsi busy flag settingDave Airlie2016-10-141-1/+1
| | | | | Cc: "12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* anv/wsi: fix apps that acquire multiple images up frontDave Airlie2016-10-142-0/+2
| | | | | | | | | | | | This fix was found in the radv codebase when running dota2, no idea if anyone has reported it on anv, but the same problem occurs. Once an image is acquired we need to mark it busy. Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net> Cc: "12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* anv: initialise and increment send_sbcDave Airlie2016-10-141-0/+2
| | | | | | | At least set this to not be uninitialised memory. Cc: "12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>