summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_private.h
Commit message (Collapse)AuthorAgeFilesLines
* vk/0.210.0: Rework allocation to use the new pAllocator'sJason Ekstrand2015-12-031-28/+66
|
* vk/0.210.0: More fun with flags fieldsJason Ekstrand2015-12-031-1/+1
|
* vk/0.210.0: Rework dynamic statesJason Ekstrand2015-11-301-1/+1
|
* vk/0.210.0: Rename CmdBuffer to CommandBufferJason Ekstrand2015-11-301-4/+4
|
* vk/0.210.0: Switch to the new-style handle declarationsJason Ekstrand2015-11-301-2/+2
|
* vk: Fix 3DSTATE_WM_DEPTH_STENCIL for gen8Kristian Høgsberg Kristensen2015-11-261-2/+6
| | | | | | | | | This packet is a different size on gen8 and we hit an assertion when we try to merge a gen9 size dword array from the pipeline with the gen8 sized array we create from dynamic state. Use a static assert in the merge macro and fix this issue by using different wm_depth_stencil arrays on gen8 and gen9.
* vk: Add SKL supportKristian Høgsberg Kristensen2015-11-251-1/+36
| | | | Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* gen8_state: Clamp sampler values to HW limitationsJason Ekstrand2015-11-201-0/+13
|
* anv/cmd_buffer: Add a new genX_cmd_buffer file for shared codeJason Ekstrand2015-11-181-0/+1
| | | | | | | | | | | This file contains code that can be shared across gens modulo recompiling. In particular, we can share STATE_BASE_ADDRESS setup and handling of the vkPipelineBarrier call. Not sharing STATE_BASE_ADDRESS setup has already been a source of bugs and the gen7 and gen8 implementations of PipelineBarrier were line-for-line identical. Incidentally, this should fix MOCS settings for dynamic and surface state on Haswell.
* anv/gen7: A bunch of depth-stencil fixesJason Ekstrand2015-11-181-0/+1
| | | | | | There are various bits which move around between Haswell and Ivy Bridge that we weren't taking into account. This also makes us actually set the StencilWriteEnable in a sane way.
* anv: Add initial Haswell supportJason Ekstrand2015-11-171-0/+24
|
* anv: Add macros for doing per-gen compilationJason Ekstrand2015-11-171-11/+23
|
* anv/cmd_buffer: Pack the 3DSTATE_VF packet on-demandJason Ekstrand2015-11-171-2/+1
|
* anv: Only include the pack headers where neededJason Ekstrand2015-11-161-17/+12
| | | | | | | Previously, we were including gen7_pack.h, gen75_pack.h, and gen8_pack.h in anv_private.h. As we add more gens, this is going to become untenable. This commit moves things around so that we only use the pack headers when and if we need them.
* anv/cmd_buffer: Move gen-specific stuff into the appropreate filesJason Ekstrand2015-11-161-3/+3
|
* anv: Use enum isl_tiling everywhereChad Versace2015-11-131-3/+3
| | | | | | | | | In anv_surface and anv_image_create_info, replace member 'uint8_t tile_mode' with 'enum isl_tiling'. As a nice side-effect, this patch also reduces bug potential because the hardware enum values for tile modes are unstable across hardware generations.
* anv/device: Embed isl_deviceChad Versace2015-11-131-0/+2
| | | | | Embed struct isl_device into anv_physical_device and anv_device. It will later be used for surface layout calculations.
* anv: Strip trailing space in anv_private.hChad Versace2015-11-121-1/+1
|
* anv: Remove redundant fields anv_format::bs,bw,bh,bdChad Versace2015-11-121-4/+1
| | | | Instead, use the equivalent fields in anv_format::isl_layout.
* 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.