| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only difference between this and `const_state->num_ubos` was that
the latter is counting # of ubos loaded via `ldg` (based on UBO addrs
in push-consts). But turns out there isn't really any reason to care.
Instead just add an early return in the one code-path that cares about
the number of `ldg` UBOs.
This gets rid of one more thing we need to move from `ir3_shader` to
`ir3_shader_variant`.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5508>
|
|
|
|
|
|
|
|
|
| |
As with const_state, this will also need to move into the variant. To
simplify that, just move it into the const_state itself, since after all
it is related.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5508>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are going to want to move this back to the variant, and come up with
a different strategy for binning/nonbinning to share the same constant
layout, in order to implement shader-cache support. (Since then we
can have a mix of dynamically compiled variants and cache hits, so there
is no good place to serialize the const-state.)
To reduce the churn as we re-arrange things, move direct access to the
const-state to a helper fxn. This patch is the boring churny part.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5508>
|
|
|
|
|
|
|
|
|
| |
Deduplicate a bit of hand-building of ir3_shader/_variant from
computerator and delay test. This also removes the need for
external things to depend on generated ir3_parser header.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5508>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having these functions sprinkled around the driver (and ending
with a duplicated tu6_compare_func for example), move everything to a
common header (using the previously unused tu_util.h).
Also applied some simplifications: using a cast when the HW enum matches
the VK enum, and using a lookup table when it makes sense (which is IMO
nicer than the switch case way).
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5538>
|
|
|
|
|
|
|
|
|
| |
Some CTS tests don't run because of this.
Fixes: 91c757b7963f458 ("turnip: use the common code for generating extensions and dispatch tables")
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5522>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since a value of at least "align" is used for nblocks, we might end up
with nblocks greater than the number of GMEM blocks remaining. Check for
this case and bail out, sysmem rendering will be used for such cases.
Fixes some of these tests:
dEQP-VK.pipeline.render_to_image.core.*.huge.*
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check pipeline's sampleShadingEnable to enable sample shading.
Also fix behavior of gl_Fragcoord with sample shading.
Fixes at least:
dEQP-VK.pipeline.multisample.min_sample_shading.min_0_5.samples_4.primitive_triangle
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>
|
|
|
|
|
|
|
|
|
|
|
|
| |
pMultisampleState needs to be ignored when rasterizerDiscardEnable, so the
current code can crash when trying to load msaa_info->pNext.
At the same time this simplifies tu_pipeline_shader_key_init a bit, by not
calling it for the compute shader case (which doesn't need to set anything
in the key struct).
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>
|
|
|
|
|
| |
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
| |
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
| |
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than assuming a6xx+ means mergedregs. We can actually (mostly?)
do splitregs on a6xx as well. And GS/DS/HS currently require it, which
might be papering over a bug, or might be something to do with how
chaining shaders works. At any rate, we should at least be consistent,
and not have the compiler thinking we are doing mergedregs when we are
actually doing splitregs.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
|
|
|
| |
Just pass thru the variant, since it has everything we need. And
will be needed in the next patch.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
|
|
| |
Prep for the next patch.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
|
|
|
| |
Allow different regset's to coexist, so we can make mergedregs vs split
reg file a variant property.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
|
|
| |
It is only needed one place, let's move it there.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
|
|
|
| |
Prep to make merged/split register file mode a property of the regmask,
rather than the ir3_register.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5458>
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce linear alignment, and rework the layout code a bit.
This rework has a side effect of also increasing the alignment on linear
levels of tiled (non-ubwc) cpp=1 and cpp=2 layouts. Since we should be
UBWC for those cases anyway, its not a big loss.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5013>
|
|
|
|
|
|
|
|
|
|
| |
"FETCHSIZE" is actually a "minimum pitch" or "pitchalign" value that's
relevant for mipmaps. The 0 value means 64-bytes. Understanding this allows
some simplifications and will make it possible to use less alignment on
linear formats.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5013>
|
|
|
|
|
|
|
| |
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
|
|
|
|
|
|
|
|
|
|
|
| |
All squashed into a single commit because it shouldn't have any
behaviour change, except that it might work now on platforms where it
was broken because F_DUPFD_CLOEXEC is not supported but FD_CLOEXEC is.
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
|
|
|
|
|
| |
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5485>
|
|
|
|
|
| |
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement GMEM input attachments by using non-bindless texture state which
is emitted at the start of every subpass.
This achieves two things:
* More vulkan-like CmdBindDescriptorSets
* Fixing secondary command buffer input attachments with GMEM
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>
|
|
|
|
|
|
|
|
|
| |
This reworks dynamic states to use draw states, and reworks draw states.
This moves towards doing as little as possible in bind_draw_states.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>
|
|
|
|
|
|
|
| |
Remove unused code, split this out to reduce the diff in the next patch.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves some logic out of bind_draw_states, moving towards the eventual
goal of doing very little in bind_draw_states.
Split this out as a separate patch to make the DIRTY_INPUT_ATTACHMENTS more
visible: it can be safely removed because pipelines are subpass specific,
so there will always be a pipeline change to go with the CmdBeginRenderPass
and CmdNextSubpass (the CmdBindPipeline may not be in the subpass, but the
draw that flushes the pipeline update will be).
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>
|
|
|
|
|
|
|
| |
This avoids the duplicated code.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>
|
|
|
|
|
|
|
|
|
| |
The comment about fragment shader state overwriting compute shader state
is wrong, if either path is overwriting the other's state then it is a
mistake.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>
|
|
|
|
|
|
|
| |
I forgot that their derefs would still be lying around, so we need to
eliminate them first.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5519>
|
|
|
|
|
|
|
| |
In addition to duplicating what core NIR does better, this was wrong for
Vulkan, where it should be 0 as there are no non-bindless samplers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5519>
|
|
|
|
|
| |
Fixes: 167fa288 (" nir/validate: validate intr->num_components")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5520>
|
|
|
|
|
|
|
|
|
| |
The only two fields were always true, and I don't think we'd ever have
use for them. If we want to disable optimizations then we'd need a
different approach, and I don't even know what include_binning_pass was
for.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5500>
|
|
|
|
|
|
|
|
| |
This will be necessary once we start compiling multiple variants due to
different const size limits, and it will also be necessary for properly
implementing the pipeline cache.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5500>
|
|
|
|
|
|
|
| |
Delete the variables so that ir3 thinks there are no samplers and
images instead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5500>
|
|
|
|
|
|
|
|
|
|
| |
ir3_shader_from_nir() calls ir3_optimize_nir(), which currently sets up
the const state. However, we need to know the number of user consts
reserved by the driver before setting up the const state, which means
that this information needs to be passed into ir3_shader_from_nir()
somehow rather than being set in the shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5500>
|
|
|
|
|
|
|
|
|
|
| |
This fixes the newly added cubic blit_image tests for A650, by falling back
to the 3D path and setting the filter correctly.
Note: there are still failures with the texture filtering tests.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5509>
|
|
|
|
|
|
|
|
|
|
| |
This change accidentally made it into 72d7df40a5e5b50, and started causing
blit_image flakes (because of the issue fixed in the previous patch)
Fixes: 72d7df40a5e5b50 ("turnip: add layered 3D path clear for CmdClearAttachments")
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5509>
|
|
|
|
|
|
|
|
| |
This was missing an causing flakes when used after a test that set it to
a non-zero value.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5509>
|
|
|
|
|
|
|
|
|
|
| |
A pass to eliminate extra mov's from an array. We need to do this after
scheduling so we know that there are not any potentially conflicting
array writes between the original `mov` and it's use(s).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2124
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
|
|
| |
We'll also need this in the postsched-cp pass.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
| |
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
|
|
|
|
| |
A bit cleaner than open coding the list manipulation. Plus I want to
use it in the next patch, rather than adding more open coded list
futzing.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
|
|
|
|
| |
When a sequence of same instruction is encoded with repeat flag,
destination registers are written on successive cycles. Teach the
delay calculation about this.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
| |
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
| |
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
|
|
|
|
| |
These two encodings are mutually exclusive. If the instruction is a
vector(ish) `(rptN)` instruction, then we can't fold a `(nopN)` post-
delay into it.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the `try_swap_mad_two_srcs()` case, valid_flags() gets called both
for the src that we want to try to fold, and for the other src that we
are trying to swap to make that possible. It can happen in the 2nd case
that a RELATIV src has already been folded. Since `ssa()` returns non-
null in both the `IR3_REG_SSA` and `IR3_REG_ARRAY` cases (in the later
case, it is the dependent array access that the current instruction
cannot be moved ahead of), we need to explicitly check that the src
reg we are looking at is still an SSA src.
Reported-by: Jonathan Marek <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|
|
|
|
|
|
|
|
| |
Verify that instructions which have a relative src and/or dest, have
`instr->address`.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
|