Marcin Ślusarz
5b6fd2a314
intel/tools: handle ftell errors
...
Found by Coverity, as "argument cannot be negative", referring to
fread's 2nd argument.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667 >
2020-09-10 12:16:58 +00:00
Marcin Ślusarz
46a82aa3a6
intel/tools: fix possible memory leak in the error path
...
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667 >
2020-09-10 12:16:58 +00:00
Marcin Ślusarz
5ea0b6a9c6
intel/compiler: initialize remaining fields of various classes
...
These variables seem to be initialized before being used, so this
patch is not fixing any bug, but leaving them unitialized may become
a bug after some refactoring.
These classes were affected: fs_reg_alloc, fs_visitor, fs_generator,
instruction_scheduler.
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667 >
2020-09-10 12:16:58 +00:00
Marcin Ślusarz
40b964dc8f
intel/compiler: remove unused fs_validator::param_size
...
Found by Coverity as unitialized variable.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667 >
2020-09-10 12:16:58 +00:00
Marcin Ślusarz
d3cd24999f
anv: fix minor gen_ioctl(I915_PERF_IOCTL_CONFIG) error handling issue
...
Found by Coverity.
Fixes: 2001a80d4a
("anv: Implement VK_KHR_performance_query")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667 >
2020-09-10 12:16:58 +00:00
Pierre-Eric Pelloux-Prayer
265a3b9624
driconf: add option to reuse GL names
...
Fix apps expecting name recycling.
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3144 is an example
of such issue, SPECviewperf13 has this problem too.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600 >
2020-09-10 09:09:34 +02:00
Pierre-Eric Pelloux-Prayer
a56849ddda
mesa: use _mesa_HashFindFreeKeys for GL functions
...
This allows to implement name reuse if we want to.
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:11 +02:00
Pierre-Eric Pelloux-Prayer
60ffadcbc0
mesa: add _mesa_HashFindFreeKeys
...
_mesa_HashFindFreeKeyBlock function returns a name range, so it cannot be
used to recycle non-consecutive names.
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:11 +02:00
Pierre-Eric Pelloux-Prayer
fefc6d264a
mesa: add GL name reuse support
...
This will allow drivers to adopt the behavior of proprietary drivers that seem
to return the lowest available name (while Mesa returns max_seen_name + 1).
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:11 +02:00
Pierre-Eric Pelloux-Prayer
34852124db
mesa: add a isGenName parameter to _mesa_HashInsert
...
Indicates if the given name has been returned by _mesa_HashFindFreeKeyBlock.
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:11 +02:00
Pierre-Eric Pelloux-Prayer
553d371933
util/idalloc: add lowest_free_idx to avoid iterating from 0
...
lowest_free_idx is a conservative estimation of the lowest index
where a free id can be found.
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:11 +02:00
Pierre-Eric Pelloux-Prayer
e808d38299
util/idalloc: add util_idalloc_reserve
...
Can be used to mark an id as used (if it was reclaimed without using
util_idalloc_alloc).
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:11 +02:00
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
Eric Anholt
bd647f8eb6
freedreno: Add another new sysmem flake.
...
This one blocked a marge merge a few minutes ago.
Fixes: b4317fccdd
("ci/bare-metal: Update the kernel to msm-next-pgtables")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6670 >
2020-09-09 23:47: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
0f61f0142a
ci/bare-metal: Allow wget of the kernel/dtb for kernel development.
...
It's useful for kernel dev to be able throw all of our testing
infrastructure at a risky kernel change, but it's expensive (time and
bandwidth) to roll new containers every time your rev your kernel. Make
it so you can just point the env vars to your personal build you've
uploaded.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592 >
2020-09-09 17:25:38 +00:00
Eric Anholt
b4317fccdd
ci/bare-metal: Update the kernel to msm-next-pgtables
...
I'd like to see this new non-UAPI feature bake in CI. More importantly,
it may prevent some classes of flakes on cheza by isolating the processes
on the GPU so that a fault in one doesn't stomp over memory in another.
I've also pulled in a fix that etnaviv needed for their upcoming CI.
We add a few more kernel options while uprevving:
- More interconnect drivers for getting good GPU perf
- PRNG so that we don't get late-in-boot complaints about randomness.
- db820c's power domains and ethernet so hopefully we can switch to this
upstream kernel
This seems to slightly change the flakes happening in bypass mode, so add
them to the list.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592 >
2020-09-09 17:25:38 +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