| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Embed struct isl_device into anv_physical_device and anv_device. It
will later be used for surface layout calculations.
|
| |
|
|
|
|
| |
Instead, use the equivalent fields in anv_format::isl_layout.
|
|
|
|
|
|
|
| |
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.
|