| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The 1k batch size wasn't big enough for a full pipeline setup including
geometry shaders. Some day we should make it dynamic.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
If a block of code is annotated with anv_validate, then the block runs
only in debug builds.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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".
|
| |
|
| |
|
|
|
|
| |
We no longer need it as we have a better way to deal with dynamic offsets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This is amazingly helpful when copying arrays of things around.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
It's a copy of VkImageCreateInfo::usage. Will be used for the
VkAttachmentView/VkImageView merge.
|
|
|
|
| |
This prepares for merging VkAttachmentView into VkImageView.
|
|
|
|
|
| |
- Document the extent member. It's the extent of the view's base level.
- s/VkAttachmentView/VkImageView/
|
|
|
|
|
|
| |
Remove anv_color_attachment_view and anv_depth_stencil_view, merging
them into anv_attachment_view. This prepares for merging
VkAttachmentView into VkImageView.
|
|
|
|
| |
It's duplicated by anv_attachment_view::image_view::extent.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The struct is only 2 bytes. Returning it on the stack is better than
returning a reference into the ELF .data segment.
|
|
|
|
| |
It's the value of 3DSTATE_INDEX_BUFFER.IndexFormat.
|
|
|
|
| |
In most places, the variable type was the uninformative uint32_t.
|
|
|
|
| |
Replace 'aspect' with 'aspectMask'.
|
|
|
|
|
| |
This will allow us to use NIR directly for meta operations rather than
having to go through SPIR-V.
|