baldurk / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org
MIT License
8.88k stars 1.33k forks source link

Android UI is completely black in v1.33 development builds #3311

Closed w-pearson closed 4 months ago

w-pearson commented 4 months ago

Description

Since ade34bb59da916d6fff1846ba1729e18248b2669, Android UI is completely black when capturing with renderdoc, though actual Vulkan rendering works fine.

Steps to reproduce

  1. Build and install the Khronos Vulkan samples. (I think I have e1277f46e0ddf6b59f11268a4e977ea43630c044 installed but I'm not 100% sure.)
  2. In renderdoc, launch com.khronos.vulkan_samples/com.khronos.vulkan_samples.SampleLauncherActivity without any intent arguments.
  3. Observe that the sample selection screen screen is completely blank.
  4. Note that tapping the screen will select a sample and those will render correctly.

I believe the relevant logcat output is this:

05-24 11:44:23.898  3028  3071 I .vulkan_samples: [HIDL_FETCH_IMapper] android.hardware.graphics.mapper@4.0: Loaded Mapper successfully.
05-24 11:44:23.993  3028  3049 I renderdoc: @646dc05700000036@ RDOC 003028: [11:44:23] vk_resource_funcs.cpp(2535) - Debug   - External image requires 18841600 bytes at 256 alignment, in 6a memory types
05-24 11:44:23.994  3028  3049 I renderdoc: @646dc05700000037@ RDOC 003028: [11:44:23] vk_resource_funcs.cpp(2538) - Debug   - Non-external version requires 19747184 bytes at 65536 alignment, in 7f memory types
05-24 11:44:23.994  3028  3049 I renderdoc: @646dc05700000038@ RDOC 003028: [11:44:23] vk_resource_funcs.cpp(2544) - Warning - Required size changed on image between external/non-external, banning dedicated memory
05-24 11:44:24.000  3028  3049 I renderdoc: @646dc05800000039@ RDOC 003028: [11:44:24]  vk_image_states.cpp(1016) - Debug   - External/foreign queue families are not supported
05-24 11:44:24.021  3028  3049 I renderdoc: @646dc0580000003a@ RDOC 003028: [11:44:24] vk_resource_funcs.cpp(2535) - Debug   - External image requires 18841600 bytes at 256 alignment, in 6a memory types
05-24 11:44:24.022  3028  3049 I renderdoc: @646dc0580000003b@ RDOC 003028: [11:44:24] vk_resource_funcs.cpp(2538) - Debug   - Non-external version requires 19747184 bytes at 65536 alignment, in 7f memory types
05-24 11:44:24.022  3028  3049 I renderdoc: @646dc0580000003c@ RDOC 003028: [11:44:24] vk_resource_funcs.cpp(2544) - Warning - Required size changed on image between external/non-external, banning dedicated memory
05-24 11:44:24.025  3028  3049 I renderdoc: @646dc0580000003d@ RDOC 003028: [11:44:24]  vk_image_states.cpp(1016) - Debug   - External/foreign queue families are not supported
05-24 11:44:24.035  3028  3049 I renderdoc: @646dc0580000003e@ RDOC 003028: [11:44:24] vk_resource_funcs.cpp(2535) - Debug   - External image requires 18841600 bytes at 256 alignment, in 6a memory types
05-24 11:44:24.036  3028  3049 I renderdoc: @646dc0580000003f@ RDOC 003028: [11:44:24] vk_resource_funcs.cpp(2538) - Debug   - Non-external version requires 19747184 bytes at 65536 alignment, in 7f memory types
05-24 11:44:24.036  3028  3049 I renderdoc: @646dc05800000040@ RDOC 003028: [11:44:24] vk_resource_funcs.cpp(2544) - Warning - Required size changed on image between external/non-external, banning dedicated memory
05-24 11:44:24.037  3028  3049 I renderdoc: @646dc05800000041@ RDOC 003028: [11:44:24]  vk_image_states.cpp(1016) - Debug   - External/foreign queue families are not supported
05-24 11:44:24.046 12692 12944 I ImeTracker: com.khronos.vulkan_samples:c36dcf4e: onRequestHide at ORIGIN_SERVER_HIDE_INPUT reason HIDE_UNSPECIFIED_WINDOW
05-24 11:44:24.046 12692 12944 I ImeTracker: com.khronos.vulkan_samples:c36dcf4e: onCancelled at PHASE_SERVER_SHOULD_HIDE

Note that the sample selection screen isn't presented using Vulkan - RenderDoc says "API: Vulkan (Not Presenting)" and the capture buttons are disabled. I'm not entirely sure how it works internally, beyond SampleListView using android.view.View. This might be implemented internally using ANGLE, but I'm not sure of that.

I don't expect to be able to capture the selection screen with renderdoc, but being able to see it makes it much easier to select the correct sample.

Environment

cmannett85-arm commented 4 months ago

What device are you seeing this on?

cmannett85-arm commented 4 months ago

I've tried on:

All rendered the selection screen whilst background capturing. The Vivo and Samsung presented as OpenGL ES but like yours the Pixel had "API: Vulkan (Not Presenting)" and Warning - Required size changed on image between external/non-external, banning dedicated memory printed in the log, but it was still displayed.

w-pearson commented 4 months ago

I'm seeing this on a Samsung development device. It's possible that it's limited to development devices or the driver I have on that development device; I'll check a personal device as well.

w-pearson commented 4 months ago

Looks like this was an issue with the development device; I could see the selection screen properly after I updated the Vulkan and GLES drivers. It seems unlikely to me that any production devices use the affected drivers. Sorry for not trying that first!

I did test on a personal Galaxy A15, and that one presented as OpenGL ES (and also was unaffected).