summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_private.h
Commit message (Collapse)AuthorAgeFilesLines
* anv: Use enum isl_format in anv_formatChad Versace2015-11-121-2/+2
| | | | | | | This patch begins using isl.h in Anvil. More refactors will follow. Change type of anv_format::surface_format from uint16_t -> enum isl_format.
* anv/gen7: Implement the VS state depth-stall workaroundJason Ekstrand2015-11-101-0/+2
|
* anv/formats: Add fields for block dimensionsNanley Chery2015-11-091-0/+3
| | | | | | | | A non-compressed texture is a 1x1x1 block. Compressed textures could have values which vary in different dimensions WxHxD. Reviewed-by: Chad Versace <[email protected]>
* anv: Rename cpp variable to "bs"Nanley Chery2015-11-091-1/+1
| | | | | | | | | | | cpp (chars-per-pixel) is an integer that fails to give useful data about most compressed formats. Instead, rename it to "bs" which stands for block size (in bytes). v2: Rename vk_format_for_bs to vk_format_for_size (Chad) Use "block size" instead of "bs" in error message (Chad) Reviewed-by: Chad Versace <[email protected]>
* anv/cmd_buffer: Rework the way we emit UBO surface stateJason Ekstrand2015-11-061-3/+6
| | | | | | The new mechanism should be able to handle SSBOs as well as properly handle emitting surface state on gen7 where we need different strides depending on shader stage.
* anv/pipeline: Expose is_scalar_shader_stageJason Ekstrand2015-11-061-0/+3
|
* anv: Use VkDescriptorType instead of anv_descriptor_typeJason Ekstrand2015-11-061-9/+1
|
* anv: Do range-checking in the shader for dynamic buffersJason Ekstrand2015-11-061-2/+5
|
* anv: Remove all support for BufferViewsJason Ekstrand2015-11-061-15/+0
| | | | | | We never *actually* supported them, we just used them for binding UBOs. Now that we have BufferInfo and we aren't supporting texture buffers yet, we should get rid of them until we can do them properly.
* anv: Add a descriptor_index to anv_descriptor_set_binding_layoutJason Ekstrand2015-11-061-0/+3
|
* anv: Add a layout to anv_descriptor_setJason Ekstrand2015-11-061-0/+1
|
* anv/meta: Finish load clears for stencil attachmentsChad Versace2015-11-051-1/+3
| | | | | | | | | Tested by Crucible "func.depthstencil.stencil_triangles.*" in commit c194292d5eadb84e9d7489fc01ce0b653cdd4ca5 (HEAD -> master) Author: Chad Versace <[email protected]> Date: Wed Nov 4 16:19:24 2015 -0800 Subject: func.depthstencil: Remove stencil clear workaround for Mesa
* 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.