Pierre-Eric Pelloux-Prayer
87ef970ee6
mesa: move u_idalloc from gallium/aux/util to util
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600 >
2020-09-10 09:07:03 +02:00
Rob Clark
911ce374ca
freedreno/a6xx: Fix MSAA clear
...
We need to do MSAA clear on the 3d pipe, it seems to not work out
properly on 2d pipe (at least for 4x MSAA and heights that are not
multiple of 16).
This matches what blob and tu seem to do. Fixes the following with
DEQP_CONFIG=rgba8888d24s8ms4
dEQP-GLES31.functional.primitive_bounding_box.depth.builtin_depth.per_primitive_bbox_equal
dEQP-GLES31.functional.primitive_bounding_box.depth.builtin_depth.per_primitive_bbox_larger
dEQP-GLES31.functional.primitive_bounding_box.depth.user_defined_depth.per_primitive_bbox_equal
dEQP-GLES31.functional.primitive_bounding_box.depth.user_defined_depth.per_primitive_bbox_larger
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649 >
2020-09-10 02:36:59 +00:00
Rob Clark
6e4d0a48e3
freedreno: Clear gs/tcs/tes state for clear blits
...
Otherwise we could emit a clear blit that is trying to use some random
GS stage, which doesn't go well.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649 >
2020-09-10 02:36:59 +00:00
Rob Clark
18f5d36282
freedreno/a6xx: Fix fd6_draw_vbo() return
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649 >
2020-09-10 02:36:59 +00:00
Rob Clark
46edc08fe5
freedreno/a6xx: Skip empty tile_setup
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649 >
2020-09-10 02:36:59 +00:00
Rob Clark
74f1c50dc3
freedreno: Don't bypass fd_draw_vbo() in clear fallback
...
Otherwise we bypass all the resource-usage tacking.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649 >
2020-09-10 02:36:59 +00:00
Rob Clark
97e49b223c
freedreno: Fix rast state for multisample clear
...
a6xx in particular cares about the multisample bit.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649 >
2020-09-10 02:36:59 +00:00
Dave Airlie
b0722cb670
gallivm: disable brilinear for lod bias and explicit lod.
...
This allows GL 4.5 CTS to pass in full with no flags, other than
that I'm not sure if it's a good or bad idea.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6638 >
2020-09-10 11:38:19 +10:00
Eric Anholt
cd4fb5a434
freedreno/fdl: Add layout test for the Android CTS's MSAA mustpass surface.
...
Rob had a question of if we were laying things out the same as the blob.
This doesn't detect any difference in our layout, though.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6589 >
2020-09-10 00:11:46 +00:00
Eric Anholt
14131ed308
freedreno/cffdec: Add support for texturator's 2DMS layout setup.
...
We can't initialize our MSAA texture with glTexImage2D(), so we have to do
a draw to get its slice's layout into the cmdstream.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6589 >
2020-09-10 00:11:46 +00:00
Eric Anholt
2f39727cc6
freedreno/cffdec: Fix up texturator parsing scripts for XML changes.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6589 >
2020-09-10 00:11:46 +00:00
Vinson Lee
0bc36ef50e
spirv: Initialize spirv_test member shader.
...
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member shader is not initialized in this
constructor nor in any functions that it calls
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6640 >
2020-09-09 22:24:09 +00:00
Vinson Lee
2f61d7c22d
svga: Fix unused printf argument.
...
Fix defect reported by Coverity Scan.
Extra argument to printf format specifier (PRINTF_ARGS)
extra_argument: This argument was not used by the format string:
info->num_outputs.
Fixes: ccb4ea5a43 ("svga: Add GL4.1(compatibility profile) support in svga driver")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6644 >
2020-09-09 15:15:55 -07:00
Vinson Lee
587969154f
freedreno: Fix file descriptor leak.
...
Fix defects reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_handle: Handle variable fd going out of scope leaks the handle.
Argument cannot be negative (NEGATIVE_RETURNS)
negative_returns: fd is passed to a parameter that cannot be negative.
Fixes: 1ea4ef0d3b ("freedreno: slurp in decode tools")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6642 >
2020-09-09 21:56:04 +00:00
Icecream95
a4885d2691
pan/mdg: Fix spilling of non-32-bit types
...
The source argument for mov has index 1, not 0.
Fixes a vertex shader in SuperTuxKart.
Fixes: b4de9e035a ("pan/mdg: Mask spills from texture write")
Reported-by: macc24
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >~
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6659 >
2020-09-09 21:31:58 +00:00
Jesse Natalie
89401e5867
nir: More NIR_MAX_VEC_COMPONENTS fixes
...
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6655 >
2020-09-09 20:19:42 +00:00
Jason Ekstrand
c5dd54e600
nir/idiv_const: Use the modern nir_src_as_* constant helpers
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6655 >
2020-09-09 20:19:42 +00:00
Jason Ekstrand
d86e38af2c
nir: More NIR_MAX_VEC_COMPONENTS fixes
...
A couple of these probably aren't strictly necessary but they won't
hurt. The one that's particularly tricky is a fixed-length array in
nir_search.h. However, to avoid blowing up the binary size of
nir_opt_algebraic by about 2x, we just assert that only small ops are
used.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6655 >
2020-09-09 20:19:42 +00:00
Nanley Chery
14b60ea302
iris: Support I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
dd215c83d0
iris: Support MC modifier in plane count queries
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
80a8bb590a
intel/common: Drop unused gen_aux_map_add_image
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
82720852bd
iris: Support planar resource imports for MC
...
Support importing and mapping multiple planes of aux data for
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
1ddb1a6cf9
intel/common: Add get_aux_map_format_bits()
...
Add a function suitable for planar YUV surfaces. For these surfaces,
drivers remap each plane to an RGB-formatted surface. Enable drivers to
pass the plane index and the original YUV format to get the right
aux-map format bits.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
c3c99f4571
st/mesa: Don't map all P01X DRM formats to P016
...
Allow gallium drivers to distinguish between the P010, P012, and P016
DRM formats.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
9efd71466d
intel/isl: Add YUV format info for the aux-map
...
* Define ISL equivalents for the P010, P012, and P016 formats.
* Add aux-map encodings for the YUV formats iris will soon support.
v2. Replace &&'s with ||'s in isl_format_is_planar() (Lionel)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
1ea3a54366
intel/isl: Support ISL_AUX_USAGE_MC in surface states
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
e15543b71a
intel/isl: Describe I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
d686835171
gallium/dri2: Support I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS import
...
Add support for up to four planes being imported via the
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS modifier. In the four plane
scenario, two planes are used for the compressed surface and two planes
are used for the compression metadata.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Nanley Chery
a42bf9a297
gallium/dri2: Report I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS num_planes
...
Return the expected number of planes in a DMA buffer that has the
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS modifier.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486 >
2020-09-09 20:02:03 +00:00
Jesse Natalie
7ee5da90ed
nir_dominance: Use uint32_t instead of int16_t for dominance counters
...
We're seeing OpenCL kernels that can hit this INT16_MAX block count.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6657 >
2020-09-09 19:01:01 +00:00
Danylo Piliaiev
03eec294b9
st/nir: Call st_glsl_to_nir_post_opts before interface unification
...
Since 95415a54c0 st_finalize_nir_before_variants
calls to nir_shader_gather_info, so finalization should be moved
before interface unification.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3482
Fixes: 95415a54c0
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6647 >
2020-09-09 18:21:44 +00:00
Adam Jackson
cdc025c9ef
mesa: Generate more errors from GetSamplerParameter
...
Not all of the corresponding extensions are enabled unconditionally, and
we should throw INVALID_ENUM in those cases.
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6653 >
2020-09-09 17:45:08 +00:00
Adam Jackson
06c6920a5b
mesa: Fix GL_CLAMP handling in glSamplerParameter
...
GL_CLAMP is only a thing in compat contexts.
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6653 >
2020-09-09 17:45:07 +00:00
Eric Anholt
802d3611dc
turnip: Fix truncation of iovas to 32 bits in queries.
...
Fixes regression when switching to msm-next-pgtables.
Fixes: e34b0d65f9 ("turnip: Implement and enable VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592 >
2020-09-09 17:25:38 +00:00
Eric Anholt
329c317287
turnip: Fix truncation of CS shader iovas to 32 bits.
...
This was invalid, and makes VK break consistently with the
msm-next-pgtbables branch.
Fixes: 13525a9c70 ("turnip: pipeline program state refactor")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592 >
2020-09-09 17:25:38 +00:00
Eric Anholt
3b3772d6e6
freedreno: Make the pack struct have a .qword for wide addresses.
...
Storing a precomputed iova in reg packing wasn't possible because you'd
truncate to 32 bits. Making it be .qword makes it possible.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592 >
2020-09-09 17:25:38 +00:00
Eric Anholt
021523d4ae
turnip: Fix a compiler warning in release builds of the query code.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592 >
2020-09-09 17:25:38 +00:00
Jonathan Marek
5a95cc04de
turnip: remove some unnecessary regs init
...
The removed registers are all set elsewhere when they are relevant, so
there is no need to initialize them in init_hw().
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664 >
2020-09-09 17:01:51 +00:00
Jonathan Marek
3d0ab65b48
turnip: delete unused "tu_cmd_buffer_upload"
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664 >
2020-09-09 17:01:51 +00:00
Jonathan Marek
3b144d5fb8
turnip: fix the type of tu_shader_module code field, delete unused sha1
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664 >
2020-09-09 17:01:51 +00:00
Jonathan Marek
6f51192169
turnip: delete unused tu_image fields
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664 >
2020-09-09 17:01:51 +00:00
Jonathan Marek
bd53a25592
turnip: delete tu_physical_device path field
...
Resolves a "strncpy specified bound 20 equals destination size" warning.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664 >
2020-09-09 17:01:51 +00:00
Rhys Perry
e394ff9b5f
aco: fix validation of sub-dword parallel-copies
...
Only the operands with a sub-dword definition need to be checked.
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/6662 >
2020-09-09 15:00:45 +00:00
Rhys Perry
834b449a46
aco: fix value numbering of reductions
...
Non-ssa definitions caused an assertion in value numbering.
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/6662 >
2020-09-09 15:00:45 +00:00
Rhys Perry
5a8447cbd4
aco: don't apply constant to SDWA on GFX8
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Cc: 20.2 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6662 >
2020-09-09 15:00:45 +00:00
Rhys Perry
29cb3cba9f
aco: workaround disassembler bug of v_writelane_b32 with literal
...
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/6662 >
2020-09-09 15:00:45 +00:00
Rhys Perry
36e58a14cc
aco: fix v_writelane_b32 with two sgprs
...
v_writelane_b32 can take two sgprs but only if one is m0.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Cc: 20.2 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6662 >
2020-09-09 15:00:45 +00:00
Rhys Perry
641d45befb
nir/opt_loop_unroll: fix is_access_out_of_bounds with vectors
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsquueze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6347 >
2020-09-09 12:34:47 +00:00
Icecream95
c0d04cd5bb
panfrost: AFBC to linear layout conversion
...
Similar to the conversion that is already done for tiled to linear.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608 >
2020-09-09 11:54:01 +00:00
Icecream95
a3431ffb69
panfrost: Move tiled-linear conversion checking to a new function
...
AFBC-linear conversion will also use this function.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608 >
2020-09-09 11:54:01 +00:00