summaryrefslogtreecommitdiffstats
path: root/src/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* anv: Use enum isl_format in anv_formatChad Versace2015-11-122-181/+179
| | | | | | | 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.
* isl: Generate isl_format_layout.cChad Versace2015-11-124-3/+209
| | | | | | | | | | | | | | | | | | | | | | | | Generate an array of struct isl_format_layout, using isl_format_layout.csv as input. Each entry follows the patten: [ISL_FORMAT_R32G32B32A32_FLOAT] = { ISL_FORMAT_R32G32B32A32_FLOAT, .bs = 16, .bpb = 128, .bw = 1, .bh = 1, .bd = 1, .channels = { .r = { ISL_SFLOAT, 32 }, .g = { ISL_SFLOAT, 32 }, .b = { ISL_SFLOAT, 32 }, .a = { ISL_SFLOAT, 32 }, .l = {}, .i = {}, .p = {}, }, .colorspace = ISL_COLORSPACE_LINEAR, .txc = ISL_TXC_NONE, },
* isl: Add CSV of format layoutsChad Versace2015-11-121-0/+287
| | | | | Add file isl_format_layout.csv, which describes the block layout, channel layout, and colorspace of all hardware surface formats.
* isl: Add enum isl_formatChad Versace2015-11-121-0/+270
|
* anv/gen7: Implement the VS state depth-stall workaroundJason Ekstrand2015-11-104-0/+38
|
* anv/gen7: Properly handle a GS with zero invocationsJason Ekstrand2015-11-101-1/+1
|
* anv/gen7: Add push constant supportJason Ekstrand2015-11-101-0/+37
|
* anv/device: Use an actual int64_t in WaitForFencesJason Ekstrand2015-11-101-1/+3
|
* anv/meta: Create a sampler in meta_emit_blitJason Ekstrand2015-11-101-9/+25
|
* anv/gen7: Properly handle VS with VertexID but no verticesJason Ekstrand2015-11-101-4/+5
|
* anv/device: Work around the i915 kernel driver timeout bugJason Ekstrand2015-11-101-3/+11
| | | | | | | | | | | There is a bug in some versions of the i915 kernel driver where it will return immediately if the timeout is negative (it's supposed to wait indefinitely). We've worked around this in mesa for a few months but never implemented the work-around in the Vulkan driver. I rediscovered this bug again while working on Ivy Bridge becasuse the drive in my Ivy Bridge currently has Fedora 21 installed which has one of the offending kernels.
* anv/nir: Fix codegen in lower_push_constantsJason Ekstrand2015-11-091-1/+2
|
* anv/gen7: Fix the length of 3DSTATE_SFJason Ekstrand2015-11-091-1/+1
|
* anv/gen7: Properly handle missing color-blend stateJason Ekstrand2015-11-091-42/+54
|
* anv/device: Add a newline to the end of a commentJason Ekstrand2015-11-091-1/+1
|
* anv/formats: Define ETC2 formatsNanley Chery2015-11-091-10/+10
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/image: Determine the alignment units for compressed formatsNanley Chery2015-11-091-2/+4
| | | | | | | | | Alignment units, i and j, match the compressed format block width and height respectively. v2: Don't assert against HALIGN* and VALIGN* enums (Chad) Reviewed-by: Chad Versace <[email protected]>
* anv/image: Handle compressed format qpitch and paddingNanley Chery2015-11-091-3/+8
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/image: Handle compressed format stride and sizeNanley Chery2015-11-091-2/+4
| | | | | | These formulas did not take compressed formats into account. Reviewed-by: Chad Versace <[email protected]>
* anv/formats: Add fields for block dimensionsNanley Chery2015-11-092-1/+4
| | | | | | | | 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/formats: Add surface_format initializerNanley Chery2015-11-091-2/+2
| | | | | | | v2: Rename __brw_fmt to __hw_fmt (Chad) Suggested-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace [email protected]
* anv: Rename cpp variable to "bs"Nanley Chery2015-11-095-117/+117
| | | | | | | | | | | 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/apply_dynamic_offsets: Use the right sized immediate zeroJason Ekstrand2015-11-061-1/+4
|
* anv/pipeline: Set the right SSBO binding table start index for FSJason Ekstrand2015-11-061-0/+1
|
* anv/cmd_buffer: Rework the way we emit UBO surface stateJason Ekstrand2015-11-065-19/+51
| | | | | | 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-062-5/+9
|
* anv: Use VkDescriptorType instead of anv_descriptor_typeJason Ekstrand2015-11-063-21/+26
|
* anv: Do range-checking in the shader for dynamic buffersJason Ekstrand2015-11-065-73/+118
|
* anv/device: Increase the block size for instructionsJason Ekstrand2015-11-061-1/+1
|
* anv: Remove all support for BufferViewsJason Ekstrand2015-11-065-99/+6
| | | | | | 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/device: Only support binding UBOs through BufferInfoJason Ekstrand2015-11-061-20/+11
|
* anv: Rework UpdateDescriptorSetsJason Ekstrand2015-11-061-18/+18
| | | | | Previously, UpdateDescriptorSets was wrong because it assumed that the binding was the offset into the descriptor set.
* anv: Add a descriptor_index to anv_descriptor_set_binding_layoutJason Ekstrand2015-11-063-3/+5
|
* anv: Add a layout to anv_descriptor_setJason Ekstrand2015-11-062-0/+3
|
* anv/meta: Finish load clears for stencil attachmentsChad Versace2015-11-052-30/+88
| | | | | | | | | 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/cmd_buffer: Fix SURFACE_STATE for non-view buffer bindingsJason Ekstrand2015-11-041-3/+4
| | | | | We were treating it as if it's a BufferView and weren't taking the offset into account properly.
* anv/cmd_buffer: Don't use an anv_state pointer in emit_binding_tableJason Ekstrand2015-11-041-8/+7
| | | | | | The anv_state is supposed to be a flyweight so we're not really saving anything by using a pointer. Also, we were creating one, setting a pointer to it, and then having it go out-of-scope which is bad.
* anv: Remove unused anv_render_pass membersChad Versace2015-11-042-21/+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-044-292/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/meta: Clear color attribute is always flatChad Versace2015-11-041-4/+3
| | | | | No behavioral change. This patch just removes an unneeded function parameter.
* anv/meta: Use consistent naming for dynamic state maskChad Versace2015-11-042-7/+13
| | | | | | | Consistently rename bitmasks of Vulkan dynamic state to 'dynamic_mask'. anv_meta_saved_state::dynamic_flags -> dynamic_mask anv_meta_save(dynamic_state) -> dynamic_mask
* anv/meta: Rename anv_cmd_buffer_save/restoreChad Versace2015-11-043-21/+19
| | | | | | | | As the functions are now exposed in anv_meta.h, let's rename them to clarify that they are meta functions. anv_cmd_buffer_save -> anv_meta_save anv_cmd_buffer_restore -> anv_meta_restore
* anv: Move meta clear code to new file anv_meta_clear.cChad Versace2015-11-045-512/+656
| | | | | | anv_meta.c currently handles blits, copies, clears, and resolves. The clear code is about to grow, and anv_meta.c is already busting at the seams.
* anv: Move struct anv_vue_header to anv_private.hChad Versace2015-11-042-12/+15
| | | | | 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.
* Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-11-031-1/+1
|
* 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.
* anv: Report 0 physical devices when not on Broadwell or Ivy BridgeJason Ekstrand2015-11-022-7/+21
| | | | | | 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: Add better push constant supportJason Ekstrand2015-10-294-13/+113
| | | | | | | What we had before was kind of a hack where we made certain untrue assumptions about the incoming data. This new support, while it still doesn't support indirects properly (that will come), at least pulls the offsets and strides from SPIR-V like it's supposed to.
* anv/pass: Remove redundant assertChad Versace2015-10-291-1/+0
| | | | Trivial fix.
* anv/pass: Move VkRenderPass code to new fileChad Versace2015-10-293-137/+162
| | | | | Move it from anv_device.c to new file anv_pass.c. Because it will soon grow bigger.