Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify to make perfetto and AGI run ok #71

Open
wants to merge 299 commits into
base: celadon/s/mr0/master
Choose a base branch
from

Conversation

chenyanxzhu
Copy link

1, Build android-runnable pps-producer. Make pps_producer binary
build by android makefile other than meson.build. Otherwise it
will fail to run inside android.
2, Fix AGI fail issue: Add GpuCounterDescriptor in data source
register stage.
3, Downgrade perfetto api version inside mesa from 29 to 15.
Currently the perfetto version used by perfetto/traced is 15.
4, Comment util_perfetto_init in eglGetDisplay, which will create
a new thread. In the case of system start, zygote will stuck when
there's more than 1 thread in waitUntilAllThreadsStopped. Instead,
move the init op into util_perfetto_trace_begin.

Tracked-On:

werman and others added 30 commits January 24, 2023 15:27
offset field in kgsl_command_object is NOT used by KGSL, so
we should offset directly to iova.

Fixes weird hangs on KGSL. E.g. fixes the hang in:
 dEQP-VK.memory.pipeline_barrier.transfer_dst_storage_texel_buffer.1024

cc: mesa-stable

Signed-off-by: Danylo Piliaiev <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20795>
(cherry picked from commit 926f626)
Field must be disabled if any render targets have integer
format, additionally for Gfx12+ field must be disabled when
num multisamples > 1 or forced multisample count > 1.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20671>
(cherry picked from commit 9b37ef4)
Field must be disabled if any render targets have integer format.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20671>
(cherry picked from commit 58dd9d5)
Field must be disabled if any render targets have integer
format, additionally for Gfx12+ field must be disabled when
num multisamples > 1 or forced multisample count > 1.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7892
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20671>
(cherry picked from commit 247c06d)
makes encoded videos resemble the input again :)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7992
Fixes: c4482a3 ("radeonsi/vcn: enable multi-slice encoding")
Reviewed-by: Ruijing Dong <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20714>
(cherry picked from commit e8a6063)
ensure that these have a lifetime great enough to be presented

fixes #7781

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20793>
(cherry picked from commit 020db79)
this is an artifact of very old code before the dynamic state was set
for all graphics pipelines

now the checks only cause blend constants to not be updated, which triggers
bugs and validation failures

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20799>
(cherry picked from commit b4d18f2)
this is illegal and causes validation errors

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20799>
(cherry picked from commit 5d44318)
Fixes: befbd54 - glthread: don't use atomics for refcounting to decrease overhead on AMD Zen

Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20804>
(cherry picked from commit 4d4995b)
It was wrong. For example, if the draw vertex count was 10 and the upload
vertex count was 150, u_vbuf wouldn't unroll the draw and would instead
memcpy 150 vertices. This fixes that case.

Fixes: 068a3bf - util: move and adjust the vertex upload heuristic equation from u_vbuf

Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
(cherry picked from commit 4f6e785)
…exture

This wasn't implemented, but the spec requires it.

Fixes: 1fe7b1f - mesa: implement ARB_bindless_texture

Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
(cherry picked from commit 7215262)
Surprisingly, the GL compatibility profile allows these in both
glEnableClientState and glEnable.

Fixes: 0b1dd18 - glthread: track which vertex array attribs are enabled

Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>
(cherry picked from commit 777166c)
unlocks were incorrectly added to paths using dri2_egl_display() as
well as those using dri2_egl_display_lock()

pthread_mutex_unlock() when unlocked is documented by posix as
being undefined behaviour.  On OpenBSD pthread_mutex_unlock() will call
abort(3) if this happens.

Fixes: f1efe03 ("egl/dri2: Add display lock")
Reviewed-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20712>
(cherry picked from commit 0594b3c)
the outer swapchain object is persistent, which means checking it
will never yield an update after the first check

fixes #8122

Fixes: b2739c9 ("zink: set surface->dt when updating swapchain"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20814>
(cherry picked from commit 474ed4b)
This reverts commit 6d02054.

v_cvt_pk_u8_f32 returns 0xff instead of v_cvt_u32_f32 & 0xff if the input is
larger than 255.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8128

Cc: mesa-stable
Reviewed-by: Timur Kristóf <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20829>
(cherry picked from commit e527f68)
When this was last changed, the smoothing_enabled flag seems to have
been forgotten about, breaking line-smoothing (and probably also polygon
smoothing).

Fixes: 4147add ("radeonsi: update db_eqaa even if msaa is disabled")
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20810>
(cherry picked from commit 9f4f131)

Conflicts:
	src/amd/ci/radeonsi-raven-fails.txt
	src/amd/ci/radeonsi-stoney-fails.txt
This has to be before the MI_BATCH_BUFFER_END otherwise it has no
effect.

This also was messing around with you batch length alignment.

Signed-off-by: Lionel Landwerlin <[email protected]>
Fixes: b9aa66d ("anv: disable preemption for 3DPRIMITIVE during streamout")
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Paulo Zanoni <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20802>
(cherry picked from commit 6f02f9d)

Conflicts:
	src/intel/vulkan/genX_gpu_memcpy.c
Clarify the relationship between zink heaps and vulkan memory type
indices, and resolve the issues from mixing the two up.

Closes: #7588, #7813
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
(cherry picked from commit f6d3a57)
Trival renames to correctly identify vulkan memory type indices aren't
the same as zink heaps

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
(cherry picked from commit e20e8f2)
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x01 has been incidently the
correct memory type index, but isn't guaranteed to be, which is why it
hasn't caused issues yet

Fixes: f9515d9 ("zink: allocate/place memory using memoryTypeIndex directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20264>
(cherry picked from commit c71287e)
…_mask

I've been running into failures with tests like :

dEQP-VK.robustness.robustness2.bind.notemplate.rgba32i.unroll.nonvolatile.uniform_buffer_dynamic.no_fmt_qual.len_4.samples_1.1d.frag

With the load_global_const_block_intel NIR intrinsic, you can load a
vec8/vec16 with a predicate. The predicate is correctly uniformized to
feed into the SEND instruction's flag register.

The problem is that a series of optimization first remove the
find_live_channel and then changes the broadcast into a simple MOV
instruction, on the assumption that the first channel is always active
if there is not control flow. This is correct.

But after that the cmod optimzation will remove this instruction :

   mov.nz.f0.0(16) null:D, vgrf16+0.0<0>:D NoMask

because it seems to be equivalent to :

   cmp.g.f0.0(16) vgrf16:D, vgrf12:D, 63d

In this case vgrf16 is the predicate to the load block SEND
instruction. Since the execution mask is different between both, some
of the channels of the SEND instruction end up not being loaded or
loaded with the wrong predication and we end up with incorrect UBO
data.

Signed-off-by: Lionel Landwerlin <[email protected]>
Cc: mesa-stable
Reviewed-by: Marcin Ślusarz <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20852>
(cherry picked from commit a50d2fd)
Fixes: bbad550 ("radv/winsys: fill real info for CHIP_GFX1100")
Signed-off-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20850>
(cherry picked from commit bf3c14b)
Started showing up when nir_opt_large_constants call was moved in 88756ce.
Fixes dEQP-VK.mesh_shader.ext.smoke.monolithic.fullscreen_gradient*

Suggested-by: Kenneth Graunke <[email protected]>
Fixes: 88756ce ("intel/compiler: Run nir_opt_large_constants before scalarizing consts")
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20876>
(cherry picked from commit 536a2ac)
Fixes validation failures:

Test case 'dEQP-GLES31.functional.android_extension_pack.shaders.es32.extension_directive.oes_sample_variables'..
MESA: error: Validation Error: [
UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle =
0x563a1838b790, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 |
SPIR-V module not valid: [VUID-StandaloneSpirv-Flat-04744] Fragment
OpEntryPoint operand 31 with Input interfaces with integer or float type
must have a Flat decoration for Entry Point id 4.
%gl_SampleId = OpVariable %_ptr_Input_uint Input

Test case 'KHR-GL46.shader_ballot_tests.ShaderBallotAvailability'..
MESA: error: Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x5558e12f17e0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: [VUID-StandaloneSpirv-Flat-04744] Fragment OpEntryPoint operand 28 with Input interfaces with integer or float type must have a Flat decoration for Entry Point id 4.
  %gl_SubgroupLocalInvocationId = OpVariable %_ptr_Input_uint Input

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
(cherry picked from commit 2a33d50)
GL lets you set a silly state, so do something plausible instead of
undefined.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
(cherry picked from commit adf8104)
MemoryModelVulkan was left out for CSes using it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20756>
(cherry picked from commit 1e4deb3)
dcbaker-intel and others added 22 commits February 22, 2023 18:26
Issues including:

1. static declaration of **** follows non-static declaration for
   function timespec_get
2. ldd error: undefined symbol for functions major and minor
3. ffs and ffsll redefinition issue
4. ldd error: undefined symbol issue for functions build_id and futex
5. TLS symbol error: cannot load any more object with static TLS
6. Intel "Anvil" Vulkan driver requires the dl_iterate_phdr function
7. called object type 'uint32_t' is not a function or function pointer
Android clang add ANDROID note section, which doesn't satify 20 size.
This is a workaround for the issue.
Video playback will not work without this patch.

INTERNAL: Add importBuffer & release support

After we rebased our allocator & mapper from 2.0 to
4.0, we use allocator 4.0 to allocate buffer, which
can't be accessed by mapper 2.0 directly. To use the
buffer allocated by allocator 4.0, we need importBuffer
before lock, and release after unlock.

Tracked-On: OAM-95916
Signed-off-by: Ren Chenglei <[email protected]>
This change is to help add NV12, NV12_Y_TILED_INTEL and P010
formats for Android.

TESTS: The following CtsViewTestCases cases could pass
android.view.cts.PixelCopyTest#testVideoProducer
android.view.cts.SurfaceViewSyncTest#testVideoSurfaceViewCornerCoverage
android.view.cts.SurfaceViewSyncTest#testVideoSurfaceViewTranslate
android.view.cts.SurfaceViewSyncTest#testVideoSurfaceViewRotated
android.view.cts.SurfaceViewSyncTest#testVideoSurfaceViewEdgeCoverage

Signed-off-by: Lin Johnson <[email protected]>
Signed-off-by: Kevin Strasser <[email protected]>
Signed-off-by: Chenglei Ren <[email protected]>
This is to help revert part of 57d416d, which
causes CTS dEQP regression.

Test: dEQP-VK.memory.external_memory_host.*

Signed-off-by: Ren Chenglei <[email protected]>
We should confirm height & width valid before call
create_resource, otherwise virglrenderer driver will
run into error.

Tracked-On: OAM-97927
Signed-off-by: Ren Chenglei <[email protected]>
On Android, there will be garbage when screen rotation
during video playback.
This is to revert d245d7b

Signed-off-by: Chenglei Ren <[email protected]>
Tracked-On: OAM-99738
This patch try to fix a deadlock issue when runing
android.media.cts.HeifWriterTest#testInputSurface_Grid_Handler
In this case, there are two deadlock threads involved, the HeifWriter
thread and a drawframe thread. The drawframe thread will try to draw a
frame and send it to HeifWriter. By calling st_api_make_currentst() it
will pending in surface dequeubuffer() with hold of EGL lock, and will
block HeifWriter thread executing, the buffer will be returned after
HeifWriter handled, In this case HeifWriter waiting for the EGL lock,
and drawframe thread wait for buffer with EGL lock hold, so deadlock
produced.

In case this is not the first time run of make_current(), allocate
buffer can be postponed, and allocate buffer in a context without
hold of EGL lock.

Tracked-On: OAM-96997
Signed-off-by: Yang, Dong <[email protected]>

INTERNEL: allocate buffer if there isn't _ColorReadBuffer

    allocate buffer if there isn't _ColorReadBuffer

Tracked-On: OAM-99287
Signed-off-by: Yang, Dong <[email protected]>
Currently the iris driver is adding the buffer objects to zombie list
without checking if it is busy or not. It checks for it after 1 second
which adds delay to buffer release.

This fix checks if the bo is busy or not before adding it to zombie list.

Without this fix, the applications expecting immediate buffer release would fail.

The fix is identified while debugging below cts tests:
android.graphics.cts.BitmapTest#testDrawingHardwareBitmapNotLeaking
android.graphics.cts.BitmapTest#testHardwareBitmapNotLeaking

Tracked-On: OAM-105862
Signed-off-by: Sai Teja Pottumuttu <[email protected]>
Previously buffer info getting for YUV format by gralloc4 is
not complete for egl image creation. Need calculate extra chroma
information from layout info.

Tracked-On: OAM-106557
Signed-off-by: chenyanxzhu <[email protected]>
This is to help fix Coverity issue in mesa
project.

Tracked-On: OAM-105550
Signed-off-by: Ren Chenglei <[email protected]>
Tracked-On: OAM-106859
Signed-off-by: Kalenahally Madegowda, NandishaX <[email protected]>
Signed-off-by: Kothapeta, BikshapathiX <[email protected]>
Tracked-On: OAM-106720
Signed-off-by: HeYue <[email protected]>
This reverts commit 554b19b.
Vulkan failed to run with device enumerate failure on mesa23
due to this patch.

Tracked-On: OAM-106720
Signed-off-by: Fei Jiang [email protected]
issue:projectceladon#63

case: testEncode[8(c2.intel.avc.encoder_video/avc_720x480_true_TEST_MODE_DETAILED)](android.media.encoder.cts.VideoEncoderTest)

This reverts commit 3d6c7fb.

Tracked-On: OAM-108751
Signed-off-by: zhangyichix <[email protected]>
This reverts commit 3d6c7fb.

Tracked-On: OAM-108904
Signed-off-by: Jia, Lin A <[email protected]>
It is observed that in display resolutions where width is not equal to
stride, vulkan rendering is being distorted. This is happening due to a
stride calculation mismatch between minigbm and mesa.

This fix makes sure that the stride calculated in minigbm is passed to
anv and isl.

The fix resolves the following two android CTS issues
android.graphics.cts.VulkanPreTransformTest#testVulkanPreTransformNotSetToMatchCurrentTransform
android.graphics.cts.VulkanPreTransformTest#testVulkanPreTransformSetToMatchCurrentTransform

Tracked-On: OAM-106986
Signed-off-by: Sai Teja Pottumuttu <[email protected]>
 1, Build android-runnable pps-producer. Make pps_producer binary
 build by android makefile other than meson.build. Otherwise it
 will fail to run inside android.
 2, Fix AGI fail issue: Add GpuCounterDescriptor in data source
 register stage.
 3, Comment util_perfetto_init in eglGetDisplay, which will create
 a new thread. In the case of system start, zygote will stuck when
 there's more than 1 thread in waitUntilAllThreadsStopped. Instead,
 move the init op into util_perfetto_trace_begin.

Tracked-On: OAM-110834
Signed-off-by: chenyanxzhu <[email protected]>
@sysopenci sysopenci force-pushed the celadon/s/mr0/master branch 2 times, most recently from 43d488a to ccc6905 Compare March 21, 2024 12:58
@sysopenci sysopenci added the Stale Stale label for inactive open prs label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Stale label for inactive open prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.