Commit Graph

140936 Commits

Author SHA1 Message Date
Alyssa Rosenzweig 9d7e25a9a9 pan/bi: Allow IADD.u32 on FMA as *IADDC
There's a common special case, slight boost in scheduler freedom.

total nops in shared programs: 101130 -> 101048 (-0.08%)
nops in affected programs: 1677 -> 1595 (-4.89%)
helped: 13
HURT: 0
helped stats (abs) min: 6 max: 8 x̄: 6.31 x̃: 6
helped stats (rel) min: 3.24% max: 25.00% x̄: 7.42% x̃: 4.48%
95% mean confidence interval for nops value: -6.76 -5.85
95% mean confidence interval for nops %-change: -12.02% -2.81%
Nops are helped.

total clauses in shared programs: 27076 -> 27075 (<.01%)
clauses in affected programs: 8 -> 7 (-12.50%)
helped: 1
HURT: 0

total quadwords in shared programs: 113142 -> 113113 (-0.03%)
quadwords in affected programs: 1935 -> 1906 (-1.50%)
helped: 13
HURT: 0
helped stats (abs) min: 2 max: 4 x̄: 2.23 x̃: 2
helped stats (rel) min: 0.95% max: 7.50% x̄: 2.16% x̃: 1.26%
95% mean confidence interval for quadwords value: -2.59 -1.87
95% mean confidence interval for quadwords %-change: -3.45% -0.88%
Quadwords are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig 7aefd6c1ba pan/bi: Track liveness while scheduling
If we know that a value is killed in the next tuple, there is no need to
write it out to the register file. We already handled this as a packing
fixup. However, avoiding this write also frees up an extra slot in the
register block, which offers additional scheduling freedom. To take
advantage of this, we extend liveness analysis to work while scheduling,
and modify the schedulable predicate accordingly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig 20809daa9a pan/bi: Add post-RA optimizer
Delete coalesced moves. Now this is trivial! See e.g shaders/tesseract/118.shader_test

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig 4ed000cf3f pan/bi: Bundle after RA
Flag day change to swap the order of the "scheduler" with the register
allocator. This gives RA much more freedom without significantly
hndering bundling.

It also opens up the door to Adult-level Scheduling which would occur
prior to bundling.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig afa4a1d496 pan/bi: Fix bi_rewrite_passthrough ordering
The ordering is irrelevant for SSA form input, but is very relevant for
register input.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
2021-06-10 18:06:10 +00:00
Alyssa Rosenzweig 246beb15cf pan/bi: Simplify TEXC codegen for sr_count=0
Obscure case.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
2021-06-10 18:06:09 +00:00
Alyssa Rosenzweig de8fe8c0b1 pan/bi: Use TEXS_2D for rect textures
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
2021-06-10 18:06:09 +00:00
Alyssa Rosenzweig 6f51bd99f2 pan/bi: Pull out bi_count_write_registers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
2021-06-10 18:06:09 +00:00
Yiwei Zhang 02832f9d03 vulkan: fix back compat with Android Oreo and below
buffer_handle_t definition was previously inside the deprecated
system/core/include/system/window.h.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11301>
2021-06-10 17:41:34 +00:00
Neha Bhende 8a3fa2c4d5 svga: Initialize pipe_shader_state for transform shaders
This fixes crashes for opengl apps. Issue is found in vmware
internal testing

Fixes: f01c0565bb ("draw: free the NIR IR.")

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11274>
2021-06-10 17:28:41 +00:00
Mike Blumenkrantz e39b6951cc util/blitter: remove duplicated set_sample_mask calls
it doesn't make sense to have both, so just keep the simpler one

no functional changes because this was redundant

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11294>
2021-06-10 16:58:14 +00:00
Adam Jackson f535ab59e2 swrast: Fix a warning from gcc 11
gcc 11 dixit:

   In function ‘sample_2d_ewa’,
       inlined from ‘sample_lambda_2d_aniso’ at ../src/mesa/swrast/s_texfilter.c:1995:10:
   ../src/mesa/swrast/s_texfilter.c:1729:13: warning: ‘sample_2d_nearest’ reading 16 bytes from a region of size 8 [-Wstringop-overread]
    1729 |             sample_2d_nearest(ctx, samp, img, newCoord, rgba);
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../src/mesa/swrast/s_texfilter.c: In function ‘sample_lambda_2d_aniso’:
   ../src/mesa/swrast/s_texfilter.c:1729:13: note: referencing argument 4 of type ‘const GLfloat *’ {aka ‘const float *’}

Indeed, newCoord is GLfloat[2] but the argument is typed GLfloat[4],
even though only the first two (s and t) are ever read. Fix the array
size in the function signature to reflect the maximum element actually
addressed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11273>
2021-06-10 16:20:09 +00:00
Roman Stratiienko 5987f71cb1 nouveau: Don't require RTTI and use it only when enabled
The only case RTTI is used in nouveau is type assertion at:
File src/gallium/drivers/nouveau/codegen/nv50_ir.cpp:

    assert(typeid(*i) == typeid(*this));

This assertion is used 'to be on the safe side' only and not mandatory.

In Android we do not have rtti for libLLVM therefore this assertion
has to be skipped.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11069>
2021-06-10 15:10:04 +00:00
Charlie f389676173 v3dv: enable KHR_uniform_buffer_standard_layout
We already support this memory layout. All relevant CTS tests seem to
pass

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11276>
2021-06-10 15:04:23 +01:00
Charlie c8dffda633 v3dv: enable KHR_incremental_present
All bits should already be provided by wsi/common.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11276>
2021-06-10 15:04:12 +01:00
Charlie 1c97d06a68 v3dv: enable KHR_sampler_mirror_clamp_to_edge
This is already implemented

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11276>
2021-06-10 15:03:04 +01:00
Charlie be2b11003a v3dv: enable KHR_image_format_list
There's nothing checking for mutable formats, so this needs no changes

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11276>
2021-06-10 15:03:03 +01:00
Rhys Perry 7c63ec70ef nir: document that ACCESS_RESTRICT is not set at intrinsics
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7295>
2021-06-10 13:17:22 +00:00
Rhys Perry 938098c98d nir/opt_load_store_vectorize: only require one variable to be restrict
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7295>
2021-06-10 13:17:22 +00:00
Rhys Perry 865ca3af2b nir/opt_load_store_vectorize: check for restrict at the variable
SPIR-V -> NIR doesn't set ACCESS_RESTRICT at the intrinsic.

fossil-db (GFX10.3):
Totals from 3 (0.00% of 139391) affected shaders:
CodeSize: 12364 -> 12356 (-0.06%)
Instrs: 2493 -> 2494 (+0.04%); split: -0.04%, +0.08%
Cycles: 15279372 -> 15295756 (+0.11%); split: -0.11%, +0.21%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7295>
2021-06-10 13:17:22 +00:00
Rhys Perry 2e7bceb220 nir/load_store_vectorizer: fix check_for_robustness() with indirect loads
fossil-db (GFX10.3, robustness2 enabled):
Totals from 13958 (9.54% of 146267) affected shaders:
VGPRs: 609168 -> 624304 (+2.48%); split: -0.05%, +2.53%
CodeSize: 48229504 -> 48488392 (+0.54%); split: -0.02%, +0.56%
MaxWaves: 354426 -> 349448 (-1.40%); split: +0.00%, -1.41%
Instrs: 9332093 -> 9375053 (+0.46%); split: -0.03%, +0.49%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7295>
2021-06-10 13:17:22 +00:00
Charlie Birks 674b0af3b3 v3dv: document two supported extensions
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11268>
2021-06-10 13:13:03 +00:00
Rhys Perry 6204e17b44 radv: increase maxComputeSharedMemorySize
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11262>
2021-06-10 12:55:53 +00:00
Rhys Perry 9162963f0a aco: fix emit_mbcnt() with a VGPR mask
Found by inspection. Should be possible with nir_intrinsic_mbcnt_amd.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11295>
2021-06-10 11:21:47 +00:00
Iago Toral Quiroga f884c2e3be v3dv: implement VK_KHR_get_display_properties2
This is entirely implemented in the common WSI code, we just need to
implement the API entry points.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11287>
2021-06-10 11:01:28 +00:00
Michel Zou 30115d0038 glapi: fix Warray-parameter
Fixes these new gcc11 warnings:

In file included from ../src/mapi/glapi/glapi_dispatch.c:174:
src/mapi/glapi/gen/glapitemp.h:3191:68: warning: argument 1 of type 'const GLdouble *' {aka 'const double *'} declared as a pointer [-Warray-parameter=]
 3191 | KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixd)(const GLdouble * m)
      |                                                   ~~~~~~~~~~~~~~~~~^
In file included from ../src/mapi/glapi/glapi_priv.h:31,
                 from ../src/mapi/glapi/glapi_dispatch.c:40:
../include/GL/gl.h:1901:62: note: previously declared as an array 'const GLdouble[16]' {aka 'const double[16]'}
 1901 | GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11198>
2021-06-10 10:31:55 +00:00
Timur Kristóf 18337fbcf2 aco: Use as_vgpr for the second source of mbcnt_amd.
Fixes: 1e49018ced
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11292>
2021-06-10 10:13:02 +00:00
Samuel Pitoiset 3a643a9ce1 ci: add expected list of failures for Bonaire (RADV)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11239>
2021-06-10 09:36:55 +00:00
Mike Blumenkrantz eb12f7f11e zink: fix caching of shader variants with inlined uniforms
attempting to read the inlined uniforms directly after the variant key
using the size of the variant is not going to work since the variant union
is (sometimes) much larger than the size of the actual struct being used,
meaning that this would just copy a bunch of zeroes instead of the actual
inlined uniforms

Fixes: 7f28775edc ("zink: implement uniform inlining")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11003>
2021-06-10 09:24:24 +00:00
Samuel Pitoiset cfe7e81214 radv/winsys: add a small comment explaining the CHAIN bit
Without it the hardware launches an IB2 which might hang in some
rare situations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11214>
2021-06-10 08:31:11 +02:00
Samuel Pitoiset a234840e60 radv: do not launch an IB2 for secondary cmdbuf with INDIRECT_MULTI on GFX7
It's illegal to emit DRAW_{INDEX}_INDIRECT_MULTI from an IB2 on GFX7.

PAL applies this workaround for indirect dispatches and also on
GFX8-9 but it doesn't seem needed.

This fixes various GPU hangs on Bonaire (GFX7).

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11214>
2021-06-10 08:31:08 +02:00
Tomeu Vizoso 0208cadc2a panfrost/ci: Add some failures that crept in
For a few days the CI wasn't reporting failures, and these crept in.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11218>
2021-06-10 06:04:57 +00:00
Tomeu Vizoso 2f3785253c iris/ci: Update the checksums for the pixmark-piano trace
The rendering changed while the CI was down. The rendering still looks
good, only some pixels in the edges have changed, probably due to
blending?

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11218>
2021-06-10 06:04:57 +00:00
Daniel Stone b902c901f4 ci/lava: Handle proxy download failures
LAVA doesn't consider failure to download a kernel/initramfs as an
infrastructure error, rather just a user error for supplying a broken
URL. We know our URLs aren't broken (because we're perfect), so assume
that failures in download validation are network issues and retry when
we hit them.

LAVA itself has been fixed to retry internally, so we'll get that when
upgrade in a couple of weeks, but gloss over it for now.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11218>
2021-06-10 06:04:56 +00:00
Daniel Stone f8c4f32558 ci/lava: Iterate all job results, not just the first
Each step in a LAVA job returns separate results; a successfully-retired
job can have about 12 entries. Make sure we iterate through all of them
when we're looking for infrastructure errors.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11218>
2021-06-10 06:04:56 +00:00
Gustavo Padovan 08600ef40c ci/lava: do not save lava.yaml in the artifacts
We want to avoid leaking private data used in merge process.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11218>
2021-06-10 06:04:56 +00:00
Gustavo Padovan a477dcf56a ci/lava: propely report test failure through sys.exit()
We added lava_job_submitter.py to improve our robusteness, but
the final result reporting was not handled correctly by the script.

This change fix it by properly calling sys.exit() on failures.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11218>
2021-06-10 06:04:56 +00:00
Iago Toral Quiroga 21b0a4c80c v3dv: don't lower vulkan resource index result to scalar
The intrinsic produces a vec2, so let's honor that and avoid the weird
lowering to scalar and later reconstruction to vec2 when we find
load vulkan descriptor intrinsics.

It fixes tests like this (which require that we expose KHR_spirv_1_4):
dEQP-VK.spirv_assembly.instruction.spirv1p4.opptrequal.null_comparisons_ssbo_equal
that otherwise produce bad code that tries to access a vec2 from the result of
that intrinsic, leading to NIR validation errors.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11257>
2021-06-10 05:47:29 +00:00
Iago Toral Quiroga d84cd611eb v3dv: expose KHR_variable_pointers
We only support the VariablePointersStorageBuffer feature for now,
which is the only one that is mandatory, and for which we seem to
be passing all the relevant tests already.

Exposing the optional VariablePointers feature would require that
we support non-constant indexing on UBO/SSBO first.

Relevant CTS tests:
dEQP-VK.*pointer*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11257>
2021-06-10 05:47:29 +00:00
Dave Airlie f05dfddeb1 u_blitter: fix stencil blit fallback for crocus.
crocus needs the sampler view decl to know it's a uint return value.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11280>
2021-06-10 02:37:19 +00:00
Dave Airlie 7e07f7f900 u_blitter: fix fs used when no color emitted
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11280>
2021-06-10 02:37:19 +00:00
Rob Clark 38dd2e6e41 freedreno: Remove assert
In multi-context scenarios, one context writing to a resource can race
with a pctx->flush_resource() on another context/thread.  Which means
that by the end of flush_resource() we can have a new write_batch.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11200>
2021-06-09 19:09:09 -07:00
Rob Clark cbb5280a00 freedreno: Add tid to DBG() msgs
I keep hacking this up locally when debugging TC sort of issues.  Which
is maybe a sign that we should just add this upstream.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11200>
2021-06-09 19:09:06 -07:00
Rob Clark 97222bcd36 freedreno: Move assert
The batch can be flushed immediately after unlocking, so this assert
needs to move.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11200>
2021-06-09 19:09:03 -07:00
Rob Clark 93b540c72e freedreno: Add string-marker debug trace
This is useful in combination with --markers arg to apitrace.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11200>
2021-06-09 19:08:58 -07:00
Rob Clark 256938e2a1 gallium/u_threaded: Missing driver-thread marking
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11200>
2021-06-09 19:08:53 -07:00
Rob Clark 3f758afe6a freedreno: Fix fdperf flush
We created and initialized the fence, but forgot to pass it to
fd_submit_flush().

Fixes: aafcd8aacb ("freedreno: Re-work fd_submit fence interface")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11200>
2021-06-09 19:08:53 -07:00
Rob Clark 507f701d9e freedreno: Fix batch flush race condition
We need to remove the batch cache entry before marking as flushed.

Note that we are already holding the batch lock, to prevent flushing
something that another context is emitting cmdstream to, but there is
a window between batch cache lookup (under screen lock) and acquiring
the batch lock that could previously result in batch cache lookup
returning a flushed batch.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11200>
2021-06-09 19:08:53 -07:00
Jason Ekstrand 36414fb4db iris: Move target_to_isl_surf_dim to iris_resource.c
It's only remaining caller lives there.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11235>
2021-06-09 23:26:04 +00:00
Jason Ekstrand 2ccdd639c2 iris: Use isl_surf_get_image_surf instead of hand-rolling it
For the 3D RT read case on BDW, we can use the ISL helper.  For the 1D
array case, we don't actually need to flatten; we can just smash it to a
2D array surface because the layout for 1D and 2D is the same on BDW.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11235>
2021-06-09 23:26:04 +00:00