diff --git a/patches/linux/0001-tu-mesh-shader-emulation.patch b/patches/linux/0001-tu-mesh-shader-emulation.patch index ea53b38..bac8df4 100644 --- a/patches/linux/0001-tu-mesh-shader-emulation.patch +++ b/patches/linux/0001-tu-mesh-shader-emulation.patch @@ -505,7 +505,7 @@ diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd + .localsizez = local_size[2] - 1)); + } + -+ if (cmd->device->physical_device->info->props.has_rt_workaround && ++ if (FD_QUIRK(cmd->device->physical_device->info, QCTDD10497382_rt_workaround) && + v->info.uses_ray_intersection) { + tu_set_render_mode(cs, { .shader_uses_rt = true }); + } diff --git a/patches/linux/0003-ir3-a8xx-cube-direction-sanitize.patch b/patches/linux/0003-ir3-a8xx-cube-direction-sanitize.patch index a86e8d4..35b3c79 100644 --- a/patches/linux/0003-ir3-a8xx-cube-direction-sanitize.patch +++ b/patches/linux/0003-ir3-a8xx-cube-direction-sanitize.patch @@ -12,14 +12,14 @@ diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py --- a/src/freedreno/common/freedreno_devices.py +++ b/src/freedreno/common/freedreno_devices.py -@@ -1407,6 +1407,7 @@ a8xx_base = GPUProps( +@@ -1395,6 +1395,7 @@ a8xx_base = GPUProps( round_robin_errata = False, max_texel_buffer_range_elements = (1 << 29) - 1, max_storage_buffer_range_bytes = (1 << 31) - 1, + cube_coord_hang_quirk = True, QCTDD10204462 = False, - QCTDD11147232 = False, + QCTDD10497382 = False, diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c diff --git a/patches/linux/0004-tu-a8xx-bindless-invalidate.patch b/patches/linux/0004-tu-a8xx-bindless-invalidate.patch index 3e3b96f..e1c95e8 100644 --- a/patches/linux/0004-tu-a8xx-bindless-invalidate.patch +++ b/patches/linux/0004-tu-a8xx-bindless-invalidate.patch @@ -7,7 +7,7 @@ + if (CHIP >= A8XX) + tu_emit_bindless_invalidate(cs, true, true); - with_crb (cs, 2 * 5 + 2 * 12) { + with_crb (cs, 2 * 5 + 2 * 12 + 2 * 3) { tu6_emit_xs_config(crb, { .vs = vs, .fs = fs }); diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc --- a/src/freedreno/vulkan/tu_cmd_buffer.cc diff --git a/patches/scripts/linux_kgsl_wsi.py b/patches/scripts/linux_kgsl_wsi.py index 3bf4469..ecc26a1 100644 --- a/patches/scripts/linux_kgsl_wsi.py +++ b/patches/scripts/linux_kgsl_wsi.py @@ -1,11 +1,7 @@ -import sys -from pathlib import Path - from mesa_edit import replace KGSL = 'src/freedreno/vulkan/tu_knl_kgsl.cc' DEVICE = 'src/freedreno/vulkan/tu_device.cc' -TIMESTAMP = 'static int\nkgsl_device_get_gpu_timestamp(struct tu_device *dev, uint64_t *ts)\n{\n UNREACHABLE("");\n return 0;\n}\n\n' replace(KGSL, '#include ', '#include \n#include \n#include ', 'sys/stat includes') replace(KGSL, ' result = tu_physical_device_init(device, instance);', ''' struct stat kgsl_st; @@ -17,17 +13,3 @@ result = tu_physical_device_init(device, instance);''', 'KGSL device numbers for dma-buf feedback') replace(DEVICE, '.EXT_physical_device_drm = !is_kgsl(device->instance),', '.EXT_physical_device_drm = !is_kgsl(device->instance) || device->has_local,', 'EXT_physical_device_drm on KGSL') - -text = Path(KGSL).read_text() -if TIMESTAMP not in text: - sys.exit(f'{KGSL}: KGSL timestamp stub changed') -Path(KGSL).write_text(text.replace(TIMESTAMP, '').replace(' .device_get_gpu_timestamp = kgsl_device_get_gpu_timestamp,\n', '')) -print(f'{KGSL}: removed unreachable GPU timestamp stub') - -replace('src/freedreno/vulkan/tu_knl.cc', ' return dev->instance->knl->device_get_gpu_timestamp(dev, ts);', ''' if (dev->instance->knl->device_get_gpu_timestamp == NULL) - return -1; - return dev->instance->knl->device_get_gpu_timestamp(dev, ts);''', 'GPU timestamp null check') -for extension in ('KHR_calibrated_timestamps', 'EXT_calibrated_timestamps', 'EXT_present_timing'): - replace(DEVICE, f'.{extension} = device->info->props.has_persistent_counter,', f'.{extension} = device->info->props.has_persistent_counter && device->instance->knl->device_get_gpu_timestamp != NULL,', f'{extension} gated on GPU timestamps') -for feature in ('presentTiming', 'presentAtRelativeTime', 'presentAtAbsoluteTime'): - replace(DEVICE, f'features->{feature} = true;', f'features->{feature} = pdevice->vk.supported_extensions.EXT_present_timing;', f'{feature} gated on EXT_present_timing') diff --git a/patches/series.json b/patches/series.json index d29f88d..58b18a4 100644 --- a/patches/series.json +++ b/patches/series.json @@ -104,7 +104,7 @@ "targets": [ "linux" ], - "summary": "KGSL dma-buf feedback device numbers and calibrated timestamp / present timing gating" + "summary": "KGSL dma-buf feedback device numbers" }, { "file": "scripts/process_heap_usage.py",