Skip to content

VkEncoderConfigH265: Fix CTB/TB size configuration based on device capabilities#169

Open
zzoon wants to merge 3 commits intoKhronosGroup:mainfrom
zzoon:fix_h265enc_anv
Open

VkEncoderConfigH265: Fix CTB/TB size configuration based on device capabilities#169
zzoon wants to merge 3 commits intoKhronosGroup:mainfrom
zzoon:fix_h265enc_anv

Conversation

@zzoon
Copy link
Contributor

@zzoon zzoon commented Feb 16, 2026

Description

To fix h265 encoding tests on ANV, need to fix the following:

  • Fix incorrect CTB size enum value (64x64 was 4U, should be 3U)
  • Initialize CTB and transform unit sizes to minimum values
  • Add methods to dynamically set CTB and TB sizes based on device capabilities

This fixes encode_h265_default, encode_h265_main_profile and encode_h265_ip_gop tests which are marked as skipped on ANV.

Type of change

bug fix

Issue (optional)

H265 encoding doesn't work on ANV due to fence timeout.

Tests

NVIDIA GeForce RTX 4060 Ti / NVIDIA 580.94.14 / Ubuntu 22.04.5 LTS

Total Tests: 70
Passed: 51
Crashed: 0
Failed: 0
Not Supported: 1
Skipped: 18 (in skip list)
Success Rate: 100.0%

Intel(R) UHD Graphics 770 (ADL-S GT1) / Intel open-source Mesa driver Mesa 26.1.0-devel (git-4d5a901d05) / Ubuntu 24.04.3 LTS

Total Tests: 70
Passed: 43
Crashed: 0
Failed: 0
Not Supported: 6
Skipped: 21 (in skip list)
Success Rate: 100.0%

AMD Radeon RX 7600 (RADV NAVI33) / radv Mesa 26.1.0-devel (git-464daaab90) / Ubuntu 24.04.3 LTS

Total Tests: 70
Passed: 51
Crashed: 0
Failed: 0
Not Supported: 1
Skipped: 18 (in skip list)
Success Rate: 100.0%

@zzoon
Copy link
Contributor Author

zzoon commented Feb 16, 2026

This should be together with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39884

@lolzballs
Copy link
Contributor

Just to confirm, the only real issue was the typo right? The other two changes are cleanups?

I'm thinking we can also allow the CTB size to be set from the cmd line, to make it possible to test if drivers are able to do the override for non-supported CTB sizes.

@zzoon
Copy link
Contributor Author

zzoon commented Feb 18, 2026

Just to confirm, the only real issue was the typo right? The other two changes are cleanups?

Currently vvs always sets 32x32 as a ctb size no matter what the query returns from drivers.

I'm thinking we can also allow the CTB size to be set from the cmd line, to make it possible to test if drivers are able to do the override for non-supported CTB sizes.

So you mean apps can set non-supported ctb sizes and implementations need to be able to handle that?

@lolzballs
Copy link
Contributor

So you mean apps can set non-supported ctb sizes and implementations need to be able to handle that?

Yes, there are no VUs for relating the SPS parameters which determine CTB size and the capability. The capability is entirely indicative. The implementation needs to override the values to what it supports.

You can see what RADV does: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/vulkan/radv_video_enc.c?ref_type=heads#L3383.

@zzoon
Copy link
Contributor Author

zzoon commented Feb 18, 2026

Yes, there are no VUs for relating the SPS parameters which determine CTB size and the capability. The capability is entirely indicative. The implementation needs to override the values to what it supports.

Ok. makes sense. Then the 2nd and 3rd patch are just clean-up patches, yes. we can drop them probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments