| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
While we're at it, we do a bunch of the VkResult -> void updates
|
| |
|
|
|
|
| |
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Instead, use the equivalent fields in anv_format::isl_layout.
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
| |
Reviewed-by: Chad Versace <[email protected]>
|
|
|
|
|
|
| |
These formulas did not take compressed formats into account.
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]>
|
| |
|
| |
|
|
|
|
|
|
| |
Version 0.170.2 removes most of the error enums. In many cases, I had to
replace an error with a less accurate (or even incorrect) one.
In other cases, the error path is replaced with an assertion.
|
| |
|
|
|
|
|
|
|
|
| |
If anv_image_get_surface_for_aspect_mask() is given a combined
depthstencil aspect mask, and the image has a stencil surface but no
depth surface, then return the stencil surface.
Hacks on hacks.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
They don't work completely. But they work well enough to satisfy
Crucible.
|
|
|
|
|
| |
It's a copy of VkImageCreateInfo::usage. Will be used for the
VkAttachmentView/VkImageView merge.
|
|
|
|
|
| |
We don't fully handle mipmapped, array depthstencil attachments. But we
handle the well enough for Crucible's miptree tests.
|
| |
|
|
|
|
| |
This prepares for merging VkAttachmentView into VkImageView.
|
| |
|
|
|
|
|
|
| |
Remove anv_color_attachment_view and anv_depth_stencil_view, merging
them into anv_attachment_view. This prepares for merging
VkAttachmentView into VkImageView.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The struct is only 2 bytes. Returning it on the stack is better than
returning a reference into the ELF .data segment.
|
|
|
|
|
| |
The Vulkan spec (git a511ba2) requires support for some combined depth
stencil formats.
|
|
|
|
| |
Replace 'aspect' with 'aspectMask'.
|
|
|
|
|
| |
Calling vkCreateImage() with VK_IMAGE_TYPE_1D now succeeds and computes
the surface layout correctly.
|
|
|
|
|
|
| |
Calling vkCreateImage() with VK_IMAGE_TYPE_3D now succeeds and computes
the surface layout correctly. However, 3D images do not yet work for
many other Vulkan entrypoints.
|
|
|
|
| |
Move the code that calculates the layout of 2D surfaces into a switch case.
|
|
|
|
|
|
| |
This allows us to annotate error cases in debug builds.
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
|
|
|
|
| |
Suggested-by: Nanley Chery <[email protected]>
|
|
|
|
|
|
|
| |
The hardware requires that stencil buffer memory be W-tiled.
From the Sandybridge PRM:
This buffer is supported only in Tile W memory.
|
|
|
|
|
| |
When creating a stencil image view, log a FINISHME but don't abort.
We're sooooo close to having this working.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In anv_depth_stencil_view, replace the members
bo
depth_offset
depth_stride
depth_format
depth_qpitch
stencil_offset
stencil_stride
stencil_qpitch
with the single member
const struct anv_image *image
The removed members duplicated data in anv_image::depth_surface and
anv_image::stencil_surface.
|
|
|
|
|
|
| |
The format of the view itself and of the view's image may differ.
Moreover, if the view's format has no depth aspect but the image's
format does, we must not program the depth buffer. Ditto for stencil.
|
|
|
|
|
| |
Split anv_image::primary_surface into two: anv_image::color_surface and
depth_surface.
|
|
|
|
|
|
|
| |
With all the previous commits in place, we can now drop in support for
multiple platforms. First up is gen7 (Ivybridge).
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
|
|
|
|
|
|
|
|
|
| |
I'd prefer to move anv_CreateAttachmentView() as well, but it's a little
too much generic code to just duplicate for each gen. For now, we'll
add a anv_color_attachment_view_init() to dispatch to the gen specific
implementation, which we then call from anv_CreateAttachmentView().
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
|
|
|
|
|
|
|
| |
We'll probably want to move some code back into a shared init function,
but this gets one GEN8 surface state initialization out of anv_image.c.
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
|
|
|
|
|
| |
It was set twice a few lines apart, and the second setting always
overrode the first.
|
|
|
|
|
|
|
| |
Change type of anv_render_pass_attachment::format from VkFormat to const
struct anv_format*. This elimiates the repetitive lookups into the
VkFormat -> anv_format table when looping over attachments during
anv_cmd_buffer_clear_attachments().
|
|
|
|
|
|
| |
Stop creating a temporary VkImageCreateInfo with overriden
format=VK_FORMAT_S8_UINT. Instead, just pass the format override
directly to anv_image_make_surface().
|