We have an issue with occlusion queries (PIPE_CONTROL depth writes)
after using the pipeline with the VS disabled. We work around it by
using a depth cache flush PIPE_CONTROL before doing a depth write.
Fixes dEQP-VK.query_pool.*
The helper didn't help much. It looks like a leftover from past
code-reuse. Now it's called from exactly one location,
gen7_CmdBeginRenderPass(). So fold it into its caller.
This exposes a case where we want to anv_CmdCopyBufferToImage() on an
image that wasn't created with VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT and
end up using uninitialized color_rt_surface_state from the meta image
view.
If VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not set in
pBeginInfo->flags, we don't have a render pass or framebuffer. Change
the condition that guard looking up render pass and framebuffer to test
for VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT instead of
VK_COMMAND_BUFFER_LEVEL_SECONDARY.
Fixes all remaining crashes in dEQP-VK.api.command_buffers.*.
These are working as well as Broadwell and Cherryiew. The recent merge
from mesa master brings in Kabylake device info and that should be all
we need to enable that.
This is needed because compute push constant data is replicated per
invocation. For gen7, this can be up to 64. With a push constant data
max of 128 bytes, this is 8k of data. We need additional space for
local-id payloads, so we are going with 16k for now.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
For gen9 SURFTYPE_CUBE, the RENDER_SURFACE_STATE's Depth,
MinimumArrayElement, and RenderTargetViewExtent is in units of full
cubes and so must be divided by 6.
Fixes 'dEQP-VK.pipeline.image.view_type.cube_array.cube_array.*'.
Now all of 'dEQP-VK.pipeline.image.*' passes.
Drop the temporary variables for RENDER_SURFACE_STATE's Depth and
RenderTargetViewExtent. Instead, assign them in-place.
This simplifies the next commit, which fixes gen9 cube surfaces.
SKL needs this to make sure we flush the push constants. It gets a
little tricky, since we also need to emit binding tables before push
constants, since that may affect the push constants (dynamic buffer
offsets and storage image parameters). This patch splits emitting
binding tables from emitting the pointers so that we can emit push
constants after binding tables but before emitting binding table
pointers.
When looping through VkBufferImageCopy regions, for each region we
incremented the offset into the VkBuffer assuming the format size was 4.
Fixes CTS tests dEQP-VK.pipeline.image.view_type.cube_array.3d.* on
Skylake.
QPitch is usually expressed as rows of surface elements (where a surface
element is an compression block or a single surface sample. Skylake 1D
is an outlier; there QPitch is expressed as individual surface
elements.
For 1D surfaces and for surfaces with Yf or Ys tiling, the hardware
ignores SurfaceVerticalAlignment and SurfaceHorizontalAlignment.
Moreover, the anv_halign[] and anv_valign[] lookup tables may not even
contain the surface's actual alignment values. So don't do the lookup
for those surfaces.
This is not really a cache yet, but it allows us to share one state
stream for all pipelines, which means we can bump the block size without
wasting a lot of memory.
Previously, anv_image_view had a anv_format pointer that we used for
everything. This commit replaces that pointer with a VkFormat enum copied
from the API and an isl_format. In order to implement RGB formats, we have
to use a different isl_format for the actual surface state than the obvious
one from the VkFormat. Separating the two helps us keep things streight.
It now calls get_isl_format to get both linear and tiled views of the
format and determines linear/tiled properties from that. Buffer properties
are determined from the linear format.
This commit does two things. First, it introduces choose_* functions for
chosing formats and aspects. Second, it changes the copy (not blit) code
to use appropreately sized UINT formats for everything except depth. There
are two main reasons for this: First, it means that compressed and other
non-renderable texture upload should "just work" because it won't be
tripping over non-renderable formats. Second, it allows us to easly copy
an RGB buffer to and from an RGBX image because the formats will get
switched over to their UINT variants and the shader will deal with the
extra channel for us.
We've been trying to move away from anv_format for a while and this should
help with the transition. There are cases (mostly in meta) where we need
the original format for the image and not the isl_format. These will be
moved over to the new vk_format and everythign else will use the isl_format
from the particular anv_surface.
This avoids making a lot of small allocations and handles allocation
failure correctly.
Fixes dEQP-VK.api.object_management.alloc_callback_fail.* failures.