summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_cmd_buffer.c
Commit message (Collapse)AuthorAgeFilesLines
* anv: Drop stale comment in anv_cmd_buffer_emit_binding_table()Chad Versace2015-11-031-11/+5
| | | | | | | | | | | When emitting the binding table for the fragment shader stage, we no longer "walk all of the attachments, [inserting only] the color attachments into the binding table". Instead, we iterate only over the subpass's color attachments, which is the minimal possible iteration. While killing the comment, also rename the variable 'attachments' to 'color_count', as it's no longer a count of all framebuffer attachments but only the subpass's color attachment count.
* vk: Use consistent names for anv_cmd_state dirty bitsChad Versace2015-10-201-12/+11
| | | | | | | | | | | | Prefix all anv_cmd_state dirty bit tokens with ANV_CMD_DIRTY. For example: old -> new ANV_DYNAMIC_VIEWPORT_DIRTY -> ANV_CMD_DIRTY_DYNAMIC_VIEWPORT ANV_CMD_BUFFER_PIPELINE_DIRTY -> ANV_CMD_DIRTY_PIPELINE Change type of anv_cmd_state::dirty and ::compute_dirty from uint32_t to the self-documenting type anv_cmd_dirty_mask_t.
* anv/cmd_buffer: Reset the command buffer in BeginCommandBufferJason Ekstrand2015-10-151-0/+2
|
* anv/device: Add support for combined image and sampler descriptorsJason Ekstrand2015-10-151-3/+6
|
* anv: Add support for BufferInfo in descriptor setsJason Ekstrand2015-10-151-1/+16
|
* anv: Get rid of the descriptor_set_binding structJason Ekstrand2015-10-141-4/+4
| | | | We no longer need it as we have a better way to deal with dynamic offsets.
* anv: Completely rework descriptor set layoutsJason Ekstrand2015-10-141-55/+43
| | | | | | | | | | | | | | | | | | | | | | | | This patch reworks a bunch of stuff in the way we do descriptor set layouts. Our previous approach had a couple of problems. First, it was based on a misunderstanding of arrays in descriptor sets. Second, it didn't properly handle descriptor sets where some bindings were missing stages. The new apporach should be correct and also makes some operations, particularly those on the hot-path, a bit easier. We use the descriptor set layout for four things: 1) To determine the map from bindings to the actual flattened descriptor set in vkUpdateDescriptorSets(). 2) To determine the descriptor <-> binding table entry mapping to use in anv_cmd_buffer_flush_descriptor_sets(). 3) To determine the mappings of dynamic indices. 4) To determine the (set, binding, array index) -> binding table entry mapping inside of shaders. The new approach is directly taylored towards these operations.
* anv/pipeline: Add support for dynamic state in pipelinesJason Ekstrand2015-10-071-0/+6
|
* vk/0.170.2: Switch to the new dynamic state modelJason Ekstrand2015-10-071-28/+244
|
* anv: Add a dynamic state data structure and basic helpersJason Ekstrand2015-10-071-0/+72
|
* vk: Embed two surface states in anv_image_viewChad Versace2015-10-061-3/+3
| | | | | | | | | | | | | This prepares for merging VkAttachmentView into VkImageView. The two surface states are: anv_image_view::color_rt_surface_state: RENDER_SURFACE_STATE when using image as a color render target. anv_image_view::nonrt_surface_state; RENDER_SURFACE_STATE when using image as a non render target. No Crucible regressions.
* vk: Merge anv_attachment_view into anv_image_viewChad Versace2015-10-061-8/+5
| | | | This prepares for merging VkAttachmentView into VkImageView.
* vk/0.170.2: Make destructors return voidJason Ekstrand2015-10-051-6/+2
|
* vk/0.170.2: Add the subpass field to VkCmdBufferBeginInfoJason Ekstrand2015-10-051-3/+4
|
* vk: Merge anv_*_attachment_view into anv_attachment_viewChad Versace2015-10-051-7/+3
| | | | | | Remove anv_color_attachment_view and anv_depth_stencil_view, merging them into anv_attachment_view. This prepares for merging VkAttachmentView into VkImageView.
* vk: Drop anv_surface_viewChad Versace2015-10-051-10/+24
| | | | | | | | | | | Push the members of struct anv_surface_view into anv_image_view and anv_buffer_view, then remove struct anv_surface_view. Observe that anv_surface_view::range is not needed for anv_image_view, and so was dropped there. This prepares for the merge of VkAttachmentView into VkImageView. Remove the common parent of anv_buffer_view and anv_image_view (that is, anv_surface_view) will make the merge easier.
* vk: Use consistent names for anv_*_view variablesChad Versace2015-10-051-11/+14
| | | | | | | | | | | | | Rename all anv_*_view variables to follow this convention: - sview -> anv_surface_view - bview -> anv_buffer_view - iview -> anv_image_view - aview -> anv_attachment_view - cview -> anv_color_attachment_view - ds_view -> anv_depth_stencil_attachment_view This clarifies existing code. And it will reduce noise in the upcoming commits that merge VkAttachmentView into VkImageView.
* vk: Unionize anv_desciptorChad Versace2015-10-051-6/+10
| | | | | | | For a given struct anv_descriptor, all members are NULL (in which case the descriptor is empty) or exactly one member is non-NULL. To make struct anv_descriptor better reflect its set of valid states, convert the struct into a tagged union.
* vk: Better types for VkShaderStage, VkShaderStageFlags varsChad Versace2015-10-051-7/+8
| | | | In most places, the variable type was the uninformative uint32_t.
* anv/batch_chain: Use the surface state pool for binding tablesJason Ekstrand2015-09-281-27/+12
|
* anv/batch_chain: Add a _alloc_binding_table functionJason Ekstrand2015-09-281-3/+3
|
* anv: Add support for the ICD loaderJason Ekstrand2015-09-241-0/+1
|
* vk: Use push constants for dynamic buffersJason Ekstrand2015-09-111-23/+21
|
* vk/pipeline_layout: Move surface/sampler start from SoA to AoSJason Ekstrand2015-09-111-2/+2
| | | | | This makes more sense to me and it's more consistent with anv_descriptor_set_layout.
* vk: Rework the push constants data structureJason Ekstrand2015-09-111-9/+37
| | | | | | Previously, we simply had a big blob of stuff for "driver constants". Now, we have a very specific data structure that contains the driver constants that we care about.
* vk: Add func anv_cmd_buffer_get_depth_stencil_view()Chad Versace2015-08-281-0/+20
| | | | | This function removes some duplicated code from genN_cmd_buffer_emit_depth_stencil().
* vk/gen8: Add support for push constantsJason Ekstrand2015-08-271-0/+28
|
* vk: Add initial API support for setting push constantsJason Ekstrand2015-08-261-1/+20
| | | | | This doesn't add support for actually uploading them, it just ensures that we have and update the shadow copy.
* vk: Add gen7 supportKristian Høgsberg Kristensen2015-08-241-4/+15
| | | | | | | With all the previous commits in place, we can now drop in support for multiple platforms. First up is gen7 (Ivybridge). Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Make anv_cmd_buffer_begin_subpass() switch on genKristian Høgsberg Kristensen2015-08-241-1/+7
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Add generic wrapper for filling out buffer surface stateKristian Høgsberg Kristensen2015-08-241-2/+3
| | | | | | | We need this for generating surface state on the fly for dynamic buffer views. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Add helper for adding surface state relocKristian Høgsberg Kristensen2015-08-241-12/+13
| | | | | | | We're going to have to do this differently for earlier gens, so lets do it in place only. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move vkCmdPipelineBarrier to gen8_cmd_buffer.cKristian Høgsberg Kristensen2015-08-241-138/+0
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Downgrade state packet to gen7 where they're commonKristian Høgsberg Kristensen2015-08-241-2/+2
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Reorder gen8 specific code into three new filesKristian Høgsberg Kristensen2015-08-241-493/+16
| | | | | | | | | | | | | | | We'll organize gen specific code in three files per gen: pipeline, cmd_buffer and state, eg: gen8_cmd_buffer.c gen8_pipeline.c gen8_state.c where gen8_cmd_buffer.c holds all vkCmd* entry points, gne8_pipeline.c all gen specific code related to pipeline building and remaining state code (sampler, surface state, dynamic state) in gen8_state.c. Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move gen8_CmdBindIndexBuffer() to anv_gen8.cKristian Høgsberg Kristensen2015-08-241-29/+0
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move gen8_cmd_buffer_emit_state_base_address() to anv_gen8.cKristian Høgsberg Kristensen2015-08-241-76/+6
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Move anv_CreateBufferView to anv_gen8.cKristian Høgsberg Kristensen2015-08-241-2/+2
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* vk: Add anv_format reference t anv_surface_viewChad Versace2015-08-171-4/+1
| | | | | | Change type of anv_surface_view::format from VkFormat to const struct anv_format*. This reduces the number of lookups in the VkFormat -> anv_format table.
* vk: Pass anv_format to anv_fill_buffer_surface_state()Chad Versace2015-08-171-1/+4
| | | | | | | This moves the translation of VkFormat to anv_format from anv_fill_buffer_surface_state() to its caller. A prep commit to reduce more VkFormat -> anv_format translations.
* vk/cmd_buffer: Allow for null VkCmdPool'sJason Ekstrand2015-08-041-1/+8
|
* vk: Add and use an anv_block_pool_size() helperJason Ekstrand2015-08-031-1/+2
|
* vk: Re-name command buffer implementation filesJason Ekstrand2015-07-301-661/+1160
| | | | | | | | Previously, the command buffer implementation was split between anv_cmd_buffer.c and anv_cmd_emit.c. However, this naming convention was confusing because none of the Vulkan entrypoints for anv_cmd_buffer were actually in anv_cmd_buffer.c. This changes it so that anv_cmd_buffer.c is what you think it is and the internals are in anv_batch_chain.c.
* vk/cmd_buffer: Add support for zero-copy batch chainingJason Ekstrand2015-07-301-7/+70
|
* vk: Add initial support for secondary command buffersJason Ekstrand2015-07-301-4/+71
|
* vk/cmd_buffer: Split batch chaining into a helper functionJason Ekstrand2015-07-301-17/+27
|
* vk/cmd_buffer: Add functions for cloning a list of anv_batch_bo'sJason Ekstrand2015-07-301-0/+38
| | | | We'll need this to implement secondary command buffers.
* vk/reloc_list: Actually set the new length in reloc_list_growJason Ekstrand2015-07-301-0/+1
|
* CLONEJason Ekstrand2015-07-301-5/+61
|
* vk/cmd_buffer: Rename emit_batch_buffer_end to end_batch_bufferJason Ekstrand2015-07-301-5/+5
| | | | | | This is more generic and doesn't imply that it emits MI_BATCH_BUFFER_END. While we're at it, we'll move NOOP adding from bo_finish to end_batch_buffer.