Commit Graph

129004 Commits

Author SHA1 Message Date
Eric Anholt 4f37161a8f util/xmlconfig: Indent to Mesa style.
I'm heavily editing this code, and having Mesa's style not apply sucks.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916>
2020-10-02 23:59:52 +00:00
Eric Anholt 91ccbb399f util/xmlconfig: Drop silly open-coded strdup.
The comment about using "malloc"?  The strdup man page says 'Memory for
the new string is obtained with malloc(3), and can be freed with free(3)'

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916>
2020-10-02 23:59:52 +00:00
Eric Anholt df3d3ea33e driconf: Make a DRI_CONF_OPT_S() for string options.
This gets rid of most of the remaining special case option definitions.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916>
2020-10-02 23:59:52 +00:00
Eric Anholt 4a57384959 r200: Reuse DRI_CONF_OPT_F for texture_blend_quality.
I missed this one in the nested macros conversion.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916>
2020-10-02 23:59:52 +00:00
Eric Anholt c47c08fa72 driconf: Fix extra quoting on "Jimenez'".
We're in a "" C string, no need to add extra '\'.  Fixes an extra '\' in
adriconf's interface.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916>
2020-10-02 23:59:52 +00:00
Eric Anholt b1e730b3b4 driconf: Eliminate the DRI_CONF_OPT_BEGIN_B macro.
Since the nested-sections rework, this use in the testcase was the only
remaining one.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916>
2020-10-02 23:59:52 +00:00
Jason Ekstrand 8427e56067 intel/fs: Don't use NoDDClk/NoDDClr for split SHUFFLEs
When I copied and pasted the code from MOV_INDIRECT for handling the
dependency controls, I missed a subtle difference between MOV_INDIRECT
and SHUFFLE.  Specifically, MOV_INDIRECT gets lowered to a narrow
instruction on Gen7 by the SIMD width lowering whereas SHUFFLE has to
split it in the generator.  Therefore, the check safety check for
whether or not we can use dependency control has to be based on the
lowered width rather than the width of the original instruction.

Fixes: a8ac61b0ee "intel/fs: NoMask initialize the address..."
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3593
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6989>
2020-10-02 19:53:56 +00:00
Mauro Rossi b23541c4d3 android: util: add log.c to Makefile.sources
Fixes the following building errors:

external/mesa/src/intel/vulkan/anv_android.c:627: error: undefined reference to 'mesa_log'
...
external/mesa/src/intel/vulkan/anv_device.c:164: error: undefined reference to 'mesa_log'

Fixes: 13ea7db76 ("mesa: Promote Intel's simple logging façade for Android to util/")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6972>
2020-10-02 21:23:25 +02:00
Boris Brezillon f9977f8729 panfrost: decode: Flag pandecode_log_typed() as PRINTFLIKE
This way we can catch mismatch between the format string and the
arguments.

Suggested-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6886>
2020-10-02 16:29:26 +00:00
Boris Brezillon 12b00b77c6 panfrost: decode: Fix decode_bifrost_constant() prototype
We expect a float, not an integer.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6886>
2020-10-02 16:29:26 +00:00
Bas Nieuwenhuizen 7568c97df1 radv: Use atomics to read query results.
The volatile pattern gives me flaky results for 32-bit builds on
ChromeOS Android. This is because on 32-bit the volatile 64-bit
loads gets split into 2 32-bit loads each.

So if we read the lower dword first and then the upper dword, it
can happen that the upper dword is already changed but the lower
dword isn't yet. In particular for occlusion queries this gives
false readings, as the upper dword commonly only constains the
ready bit.

With the GCC atomic intrinsics we get a call to __atomic_load_8
in libatomic.so which does the right thing.

An alternative fix would be to  explicitly split the 32-bit loads
in the right order and do a bunch of retries if things change, though
that gets messy quickly and for 32-bit builds only doesn't feel worth
it that much.

CC: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6933>
2020-10-02 16:16:27 +00:00
Alyssa Rosenzweig 7cc55df938 pan/bi: Fix assert when writing vertex outputs
Varying stores require us to generate a LEA_ATTR_IMM instruction, which
is a load.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 0aa08ae2f6 ("nir: Split NIR_INTRINSIC_TYPE into separate src/dest indices")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6985>
2020-10-02 12:03:53 -04:00
Mike Blumenkrantz 447cef4a71 zink: use sizeof(vec4) multiplier for nir_lower_uniforms_to_ubo
we do everything ubo-related padded out to the size of a vec4, so ensure
that we're getting load offsets using the same alignment

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
2020-10-02 13:07:42 +00:00
Mike Blumenkrantz 1c8e80a07b zink: correctly set up ubo bindings and buffer indices
var->data.binding is only set for vulkan drivers (though it also will
get incremented after nir_lower_uniforms_to_ubo), so we have to generate
our own values here.

to do this, we iterate backwards over the ubos to account for the
"first" ubos being at the end of the list, and we must also ensure that we
remap the buffer index correctly based on whether we're running our
nir_lower_uniforms_to_ubo pass

note that running nir_lower_uniforms_to_ubo unconditionally would require
us to add a number of checks in this patch for !shader->num_uniforms in
order to properly adjust to the altered instructions which become 1-indexed
instead of 0-indexed when this pass is run with no uniforms present

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
2020-10-02 13:07:42 +00:00
Mike Blumenkrantz 59027a2682 zink: don't emit ubos or bindings for ubo variables
we want to only emit the full ubo block here to be used in the binding
table, not each ubo member variable, the likes of which are denoted by
having var->data.location != 0

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
2020-10-02 13:07:42 +00:00
Mike Blumenkrantz d369c00c83 zink: emit ubo variables sized based on the overall ubo block size
if we're creating a block containing multiple variables, we want to create
the whole block at once, not just each individual variable, as we have no
way to reference individual variables in vulkan due to the requirement
for VkDescriptorSetLayoutBinding members to have different binding values

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
2020-10-02 13:07:42 +00:00
Mike Blumenkrantz 76ac341675 zink: always emit descriptor set 0 in ntv
the nir_variable value is only set for vulkan drivers and will always
be 0 here

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
2020-10-02 13:07:42 +00:00
Mike Blumenkrantz 9a8539206f zink: fix shader buffer size caps to use 65536
using max(Uniform|Storage)BufferRange yields some insane values that aren't
consistent with reality

affects PIPE_CAP_MAX_SHADER_BUFFER_SIZE and PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
2020-10-02 13:07:42 +00:00
Mike Blumenkrantz 0e3e323224 zink: run nir_lower_uniforms_to_ubo conditionally
if a shader has no uniforms then this pass just messes with the instructions
pointlessly and forces us to need workarounds later on in ntv

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
2020-10-02 13:07:42 +00:00
Mike Blumenkrantz 7767c3dae3 zink: correctly handle ARB_arrays_of_arrays in ntv for samplers
this extension allows for array nesting with no clear limitations, so we need
to ensure that we use the "unrolled" array size in a couple places in order to
correctly bind and access these types of arrays in shaders

fixes spec@arb_separate_shader_objects@active sampler conflict and others

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
2020-10-02 13:07:42 +00:00
Samuel Pitoiset 18fd6274b2 aco/tests: add disassembler tests to reproduce the add3+clamp crash
Like some other v_add instructions, LLVM fails to disassemble
v_add3_u32 + clamp.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6961>
2020-10-02 14:21:33 +02:00
Samuel Pitoiset 01704dd1a4 aco: apply the clamped integer addition disassembly workaround for v_add3
LLVM fails to disassemble v_add3 + clamp.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3563
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6961>
2020-10-02 14:21:31 +02:00
Italo Nicola c9192d1083 pan/mdg: map uabs_i/usub to i/uabsdiff
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6823>
2020-10-02 12:12:50 +00:00
Italo Nicola cea032a345 pan/mdg: remove unused arg from ALU_CHECK_CMP and ALU_CASE_CMP
Since commit eb28a366 there's no need for the sext parameter.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6837>
2020-10-02 11:57:52 +00:00
Rhys Perry 37c1b9c54b aco: fix get_buffer_resource_flags()
Looks like a rebase error. After switching to derefs, we have to look
through a nir_op_mov.

fossil-db (Navi):
Totals from 846 (0.62% of 137413) affected shaders:
SGPRs: 36856 -> 44144 (+19.77%); split: -0.20%, +19.97%
VGPRs: 35968 -> 27852 (-22.56%); split: -22.64%, +0.08%
SpillSGPRs: 1366 -> 1662 (+21.67%); split: -0.95%, +22.62%
SpillVGPRs: 1909 -> 1893 (-0.84%)
CodeSize: 5209588 -> 5146536 (-1.21%); split: -1.89%, +0.68%
Scratch: 221184 -> 217088 (-1.85%)
MaxWaves: 11488 -> 14266 (+24.18%); split: +24.20%, -0.02%
Instrs: 994831 -> 974318 (-2.06%); split: -2.53%, +0.47%
Cycles: 45719692 -> 45843260 (+0.27%); split: -0.99%, +1.26%
VMEM: 147562 -> 94468 (-35.98%); split: +9.75%, -45.74%
SMEM: 32122 -> 66023 (+105.54%); split: +120.34%, -14.80%
VClause: 41051 -> 20565 (-49.90%); split: -50.00%, +0.09%
SClause: 18076 -> 40142 (+122.07%)
Copies: 100092 -> 103521 (+3.43%); split: -0.98%, +4.40%
Branches: 51244 -> 51533 (+0.56%); split: -0.02%, +0.58%
PreSGPRs: 32290 -> 34267 (+6.12%)
PreVGPRs: 27458 -> 25290 (-7.90%); split: -7.91%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 05b6612b4e ('radv: do not lower UBO/SSBO access to offsets')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6966>
2020-10-02 10:21:34 +00:00
Jason Ekstrand b2e1fc8976 nir: Add a pass to lower vec3s to vec4s
LLVM loves take advantage of the fact that vec3s in OpenCL are 16B
aligned and so it can just read/write them as vec4s.  This results in a
LOT of vec4->vec3 casts on loads and stores.  One solution to this
problem is to get rid of all vec3 variables.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
2020-10-02 07:30:49 +00:00
Jason Ekstrand 9190f82d57 nir/opt_deref: Add an optimization for bitcasts
LLVM loves take advantage of the fact that vec3s in OpenCL are 16B
aligned so it can just read/write them as vec4s.  This is questionably
legal except that it uses a xyz write-mask when it does it.  The result
is a LOT of vec4->vec3 casts on loads and stores.  This optimization
detects this case as well as other bit-cast cases and rewrites them to
get rid of the cast.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
2020-10-02 07:30:49 +00:00
Jason Ekstrand 80e6ac3341 nir/opt_deref: Add an instruction type switch
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
2020-10-02 07:30:49 +00:00
Jason Ekstrand 769ede2de4 nir: Add component mask re-interpret helpers
These are based on the ones which already existed in the load/store
vectorization pass but I made some improvements while moving them.  In
particular,

 1. They're both faster if the bit sizes are equal
 2. The check is faster if old_bit_size > new_bit_size
 3. The check now fails if it would use more than NIR_MAX_VEC_COMPONENTS

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
2020-10-02 07:30:49 +00:00
Jason Ekstrand 57e7c5f05e nir/opt_load_store_vectorize: Use bit sizes when checking mask compatibility
Without this, it was checking bit size compatibility with bit sizes such
as 96 which is clearly invalid.

No shader-db changes on Ice Lake

Fixes: ce9205c03b "nir: add a load/store vectorization pass"
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
2020-10-02 07:30:49 +00:00
Jason Ekstrand f6667cb0ce nir: Add a memcpy optimization pass
This pass attempts to optimize three broad categories of memcpy:

 1. Self-copies: These we can discard out-of-hand.

 2. Vector copies: It doesn't matter what the vector size is or if the
    source and destination have different vector types, it's still easy
    enough to emit a load/store pair.

 3. Tightly packed copies:  In the case where a type is tightly packed
    (no padding bits), we can replace the memcpy with a copy_deref
    instruction which the optimizer is far better at handling.

This has proven capable of getting rid of many of the memcpy instances
in some rather gnarly OpenCL C kernels I've been looking at, even after
coming out of LLVM's optimizer.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
2020-10-02 07:30:49 +00:00
Jason Ekstrand e363da3bdd nir: Handle memcpy in copy_prop_vars and combine_stores
Fixes: b2899f7265 "nir: Add a new memcpy intrinsic"
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
2020-10-02 07:30:49 +00:00
Jason Ekstrand 100a5ace63 nir/find_array_copies: Properly discard copies for casts
In 9f3c595dfc, we attempted to handle casts in opt_find_array_copies
but missed a critical case.  In particular, in the case where we begin
finding a copy but then encounter a cast, we need to discard everything
which might alias that cast.

Fixes: 9f3c595dfc "nir/find_array_copies: Handle cast derefs"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>
2020-10-02 07:30:49 +00:00
Erik Faye-Lund 1c49299535 gallium/util: allow scissored blits for stencil-fallback
It's also useful to be able to use scissor-testing for fallback-blits,
as an CTS test-case does just that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6960>
2020-10-02 07:14:18 +00:00
Erik Faye-Lund e7e0468f73 gallium/util: fix memory-leak
When I originally wrote this code, I forgot to release the views the
code creates, leaking a bit of memory that never gets cleaned up. That's
not great, so let's plug it.

Fixes: e8a40715a8 ("gallium/util: add blitter-support for stencil-fallback")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6960>
2020-10-02 07:14:18 +00:00
Philipp Zabel 03bea54e02 meson: fix power8 option
Do not throw a deprecation warning if the power8 option is set to the
new 'disabled' value. Instead, warn if it is still set to the legacy
value 'false'.

Fixes: 138c003d22 ("meson: deprecated 'true' and 'false' in combo options for 'enabled' and 'disabled'")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6370>
2020-10-02 05:49:18 +00:00
Samuel Iglesias Gonsálvez 57b4f60add turnip: don't initialize GRAS_LRZ_CNTL/RB_LRZ_CNTL tu6_init_hw()
They will be initialized when emitting the draw state.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:47 +00:00
Samuel Iglesias Gonsálvez 3c07a14998 turnip: enable LRZ
v2:

* Use sub_cs when creating the IB in tu6_build_lrz(). (Jonathan Marek)
* Emit tu6_build_lrz() only when pipeline state changes or there is a
clear. (Jonathan Marek)

v3:

* Don't modify tu_pipeline object, track the changes in command buffer
state.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:47 +00:00
Samuel Iglesias Gonsálvez 1d83f5ae84 turnip: disable LRZ on vkCmdClearattachments() 3D fallback path
Partial clears are not supported and we may end up having LRZ enabled
from past commands.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:47 +00:00
Samuel Iglesias Gonsálvez 2f79e00664 turnip: disable LRZ on vkCmdClearAttachments()
We don't support partial clears on LRZ. Blob disables them too.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:47 +00:00
Samuel Iglesias Gonsálvez 27743b029d turnip: emit correct LRZ fast clear setup
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:47 +00:00
Samuel Iglesias Gonsálvez 0ca87ed506 turnip: add support to clear LRZ
v2:

* Don't emit tu6_clear_lrz() using a IB but in the command stream
provided. (Jonathan Marek)
* Valid_clear_ib is always false if TU_DEBUG_NOLRZ is set. Remove the
useless condition. (Jonathan Marek)
* Added more comments.
* Use r2d function for blitting LRZ. (Jonathan Marek)

v3:
* Do LRZ tracking in the command buffer state (Connor).

v4:

* Simplify the emission of source setup (Jonathan Marek)

v5:

* Separate LRZ setup in a different function.
* Not hide LRZ setup inside GMEM path (Jonathan Marek)
* Fix iova address emission in tu6_clear_lrz() (Jonathan Marek)
* Add CCU sysmem flushes (Jonathan Marek)

v6:

* Fixed bug related to storing a VkClearValue pointer that could be
  out-of-scope when we access to it for emitting LRZ clear.

v7:

* Merge tu6_clear_lrz() and tu6_clear_lrz_setup() into the same
function and emit LRZ clear at the beginning of the renderpass.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:47 +00:00
Samuel Iglesias Gonsálvez 0b2cfd0668 turnip: add LRZ valid tracking for secondary command buffers
After a secondary command buffer is executed, LRZ is not valid
until it is cleared again.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:47 +00:00
Samuel Iglesias Gonsálvez 517b26bdd1 turnip: add LRZ tracking to command buffer state
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:47 +00:00
Samuel Iglesias Gonsálvez fdad1ca256 turnip: disable LRZ depending on fragment changes
Disable LRZ write if the fragment shader discard the fragments, modify
its position or if early-Z is disabled.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:46 +00:00
Samuel Iglesias Gonsálvez d1fa40bdcf turnip: disable LRZ writes when blend is enabled
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:46 +00:00
Samuel Iglesias Gonsálvez 38f008e07b turnip: disable LRZ on specific cases
There are depth compare op modes that are not supported by LRZ in the
HW. Also, it is not supported when blend or stencil are enabled.

v2:

* Set pipeline->lrz.write to the same value than depthWriteEnable.
* Improve comment on disabling LRZ write on blend.
* Remove pipeline's lrz invalidation when there is no clear mask in
render pass. It is confusing. (Jonathan Marek)
* Mark the pipeline state as changed.
* Add comment on not using GREATER flag.

v3:

* Replace {rb,gras}_lrz_cntl by flags in struct tu_pipeline.
* Added z_test_enable flag.

v4:

* Created struct tu_lrz_pipeline to avoid modifying immutable objects.

v5:

* Fixed crashes when pDepthStencilState pointer is NULL.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:46 +00:00
Samuel Iglesias Gonsálvez 6089b00e89 turnip: create LRZ buffer
v2:
- Add missing vulkan subpass support. (Jonathan Marek)
- When creating the BO, mark it as not valid until it is cleared.
- Move LRZ struct to tu_image. (Jonathan Marek)
- Destroy BO when we destroy the image. (Jonathan Marek)

v3:
- Allocate the buffer as part of the image's BO (Connor)
- Moved image's LRZ values to its layout.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:46 +00:00
Samuel Iglesias Gonsálvez 138d2928cd turnip: add environment variable to disable LRZ
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>
2020-10-02 03:46:46 +00:00
Eric Anholt e3c7748b2e ci/bare-metal: Move the "POWER_GOOD not seen in time" check to the right time.
The poweron failure happens before we get to the bootloader
("load_archive: loading locale_en.bin") not after we're trying to boot the
kernel and we're waiting for the deqp run to complete.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6970>
2020-10-02 02:41:37 +00:00