summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_private.h
Commit message (Collapse)AuthorAgeFilesLines
* anv: Remove unused anv_render_pass membersChad Versace2015-11-041-5/+0
| | | | | | | | | Remove members num_color_clear_attachments has_depth_clear_attachment has_stencil_clear_attachment The new clear code in anv_meta_clear.c does not use them.
* anv/meta: Rewrite clear codeChad Versace2015-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Crucible test "func.clear.load-clear.attachments-8". The old clear code, when clearing attachments for VK_ATTACHMENT_LOAD_OP_CLEAR, suffered from some fundamental bugs. The bugs were not fixable with the old code's approach. - It assumed that a VkRenderPass contained at most one depthstencil attachment. - It tried to clear all attachments (color and the sole depthstencil) with a single instanced draw call, using the VUE header's RenderTargetArrayIndex to specify the instance's target color attachment. But the RenderTargetArrayIndex does not select entries in the binding table; it only selects an array index of a singled layered surface. - If at least one attachment of VkRenderPass had VK_ATTACHMENT_LOAD_OP_CLEAR, then the old code cleared *all* attachments. This was a consequence of using a single draw call and single pipeline for the clear. The new clear code fixes those bugs by making a separate draw call for each attachment, and using one pipeline when clearing color attachments and a different pipeline for depth attachments. The new code, like the old code, does not clear stencil attachments. It is left as a FINISHME.
* anv: Move struct anv_vue_header to anv_private.hChad Versace2015-11-041-0/+10
| | | | | Move it from anv_meta.c to the common header anv_private.h. This allows us to split the meta blit and meta clear code into separate files.
* anv: Report 0 physical devices when not on Broadwell or Ivy BridgeJason Ekstrand2015-11-021-1/+1
| | | | | | Right now, Broadweel and Ivy Bridge are the only supported platforms. Hopefully, this reduces the chances that someone will try the driver on unsupported hardware and be confused that it doesn't work.
* anv/pipeline: Bump the size of the pipeline batch to accomodate GSJason Ekstrand2015-10-231-1/+1
| | | | | The 1k batch size wasn't big enough for a full pipeline setup including geometry shaders. Some day we should make it dynamic.
* anv: Completely rework shader compilationJason Ekstrand2015-10-201-7/+5
| | | | | | | | | | | Now that we have a decent interface in upstream mesa, we can get rid of all our hacks. As of this commit, we no longer use any fake GL state objects and all of shader compilation is moved into anv_pipeline.c. This should make way for actually implementing a shader cache one of these days. As a nice side-benifit, this commit also gains us an extra 300 passing CTS tests because we're actually filling out the texture swizzle information for vertex shaders.
* anv: Move the brw_compiler from anv_compiler to physical_deviceJason Ekstrand2015-10-201-0/+1
|
* anv/meta: Use the actual render pass for creating blit pipelinesJason Ekstrand2015-10-201-0/+2
|
* vk: Use consistent names for anv_cmd_state dirty bitsChad Versace2015-10-201-15/+17
| | | | | | | | | | | | 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: Define anv_validate macroChad Versace2015-10-201-0/+10
| | | | | If a block of code is annotated with anv_validate, then the block runs only in debug builds.
* vk/meta: Add required renderpass to pipelineChad Versace2015-10-201-0/+2
| | | | | | The Vulkan spec (20 Oct 2015, git-aa308cb) requires that VkGraphicsPipelineCreateInfo::renderPass be a valid handle. To satisfy that, define a static dummy render pass used for all meta operations.
* anv: Add support for immutable descriptorsJason Ekstrand2015-10-171-1/+4
|
* anv: Add facilities for dumping an image to a fileJason Ekstrand2015-10-161-0/+4
| | | | | | The ability to dump an arbitrary miplevel or array slice of an anv_image to a file is very useful for debugging. Nothing inside of the driver calls this right now, but it's very useful to call from GDB.
* anv/pipeline: Rework dynamic state handlingJason Ekstrand2015-10-161-0/+1
| | | | | | Aparently, we had the dynamic state array in the pipeline backwards. Instead of enabling the bits in the pipeline, it disables them and marks them as "dynamic".
* anv: Add support for BufferInfo in descriptor setsJason Ekstrand2015-10-151-5/+17
|
* anv/cmd_buffer: Add an alloc_surface_state helperJason Ekstrand2015-10-151-0/+2
|
* anv: Get rid of the descriptor_set_binding structJason Ekstrand2015-10-141-6/+1
| | | | 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-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | 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/queue: Get rid of the serialJason Ekstrand2015-10-081-14/+0
| | | | | | This was a remnant of the object tagging implementation we had at one point. We haven't used it for a long time so there's no good reason to keep it around.
* vk/0.170.2: Update to the new VK_EXT_KHR_swapchain extensionsJason Ekstrand2015-10-081-3/+3
|
* anv/pipeline: Add support for dynamic state in pipelinesJason Ekstrand2015-10-071-0/+3
|
* vk/0.170.2: Switch to the new dynamic state modelJason Ekstrand2015-10-071-57/+16
|
* anv: Add a dynamic state data structure and basic helpersJason Ekstrand2015-10-071-3/+53
|
* anv/private: Add a typed_memcpy macroJason Ekstrand2015-10-071-0/+5
| | | | This is amazingly helpful when copying arrays of things around.
* vk: Embed two surface states in anv_image_viewChad Versace2015-10-061-22/+11
| | | | | | | | | | | | | 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: Add anv_image::usageChad Versace2015-10-061-0/+1
| | | | | It's a copy of VkImageCreateInfo::usage. Will be used for the VkAttachmentView/VkImageView merge.
* vk: Merge anv_attachment_view into anv_image_viewChad Versace2015-10-061-16/+5
| | | | This prepares for merging VkAttachmentView into VkImageView.
* vk: Update comments for anv_image_viewChad Versace2015-10-061-3/+3
| | | | | - Document the extent member. It's the extent of the view's base level. - s/VkAttachmentView/VkImageView/
* vk: Merge anv_*_attachment_view into anv_attachment_viewChad Versace2015-10-051-15/+6
| | | | | | 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_attachment_view::extentChad Versace2015-10-051-1/+0
| | | | It's duplicated by anv_attachment_view::image_view::extent.
* vk: Drop anv_surface_viewChad Versace2015-10-051-15/+13
| | | | | | | | | | | 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-10/+10
| | | | | | | | | | | | | 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-2/+12
| | | | | | | 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: Return anv_image_view_info by valueChad Versace2015-10-051-1/+1
| | | | | The struct is only 2 bytes. Returning it on the stack is better than returning a reference into the ELF .data segment.
* vk: Annotate anv_cmd_state::gen7::index_typeChad Versace2015-10-051-1/+1
| | | | It's the value of 3DSTATE_INDEX_BUFFER.IndexFormat.
* vk: Better types for VkShaderStage, VkShaderStageFlags varsChad Versace2015-10-051-4/+4
| | | | In most places, the variable type was the uninformative uint32_t.
* vk/0.170.2: Update VkImageSubresourceRangeChad Versace2015-10-051-1/+2
| | | | Replace 'aspect' with 'aspectMask'.
* anv: Add a back-door for passing NIR shaders directly into the pipelineJason Ekstrand2015-10-021-0/+4
| | | | | This will allow us to use NIR directly for meta operations rather than having to go through SPIR-V.
* anv/batch_chain: Use the surface state pool for binding tablesJason Ekstrand2015-09-281-9/+14
|
* anv/util: Add helpers for getting the first and last elements of a vectorJason Ekstrand2015-09-281-0/+15
|
* anv/batch_chain: Add a _alloc_binding_table functionJason Ekstrand2015-09-281-0/+3
|
* anv: Make anv_state.offset an int32_tJason Ekstrand2015-09-281-1/+1
| | | | | | Binding tables will have a negative offset and we need a way to express that. Besides, the chances of a state offset being larger than 2 GB is so remote it's not worth thinking about.
* vk: Also define vk_errorf in non-debug buildsKristian Høgsberg Kristensen2015-09-251-0/+1
|
* anv: Add support for the ICD loaderJason Ekstrand2015-09-241-0/+17
|
* anv: Add a global dispatch table for use in meta operationsJason Ekstrand2015-09-241-0/+10
|
* anv/entrypoints: Expose the anv_resolve_entrypoint functionJason Ekstrand2015-09-241-0/+4
|
* anv/batch_chain: Remove the current_surface_bo helperJason Ekstrand2015-09-241-2/+0
| | | | | | It's no longer used outside anv_batch_chain so we certainly don't need to be exporting. Inside anv_batch_chain, it's only used twice and it can be replaced by a single line so there's really no point.
* anv/cmd_buffer: Add a helper for getting the surface state base addressJason Ekstrand2015-09-241-0/+2
|
* anv/allocator: Delete the unused center_fd_offset from anv_block_poolJason Ekstrand2015-09-241-3/+0
|
* anv/allocator: Make the block pool double-endedJason Ekstrand2015-09-171-3/+31
| | | | | | | | This allows us to allocate from either side of the block pool in a consistent way. If you use the previous block_pool_alloc function, you will get offsets from the start of the pool as normal. If you use the new block_pool_alloc_back function, you will get a negative index that corresponds to something in the "back" of the pool.