defold icon indicating copy to clipboard operation
defold copied to clipboard

RGB texture_profile texture compression, black texture - macOS

Open Qwarr opened this issue 9 months ago • 3 comments

Describe the bug (REQUIRED) On older macs within texture_profiles using format RGB with compressor set to basisu and any compressor preset then bundling the texture will be pure black.

So the bug is the texture comes out as black when using rgb and compressing.

To Reproduce (REQUIRED) Steps to reproduce the behavior:

  1. Create an atlas
  2. Setup a texture_profile
  3. Set the texture_profile format to rbg
  4. Set the texture_profile compressor to basisu
  5. Set the texture_profile compressor preset to basisu low (any work)
  6. bundle for macOS or build with texture compression on
  7. run bundle on mac (seems to be for older macs but i don't know how far)

Expected behavior (REQUIRED) The texture shouldn't be all black and the image should be visible.

Defold version (REQUIRED):

  • Version: 1.10.1
  • Engine SHA1: d8e6e73a8efac6b9a72783027867e547b6a363e4

Platforms (REQUIRED):

  • Platforms: macOS
  • MacBook Pro (Retina, 13in Late 2013)
  • Processor 2.4ghz Dual-Core Intel Core i5
  • Memory 8gb 1600mhz DDR3
  • Graphics Intel Iris 1536mb

Minimal repro case project (OPTIONAL):

rbg_break.zip

Workaround (OPTIONAL): Using RGBa with texture compression works fine or using uncompressed settings

Logs

​​​​INFO:DLIB: Log server started on port 49263
INFO:ENGINE: Target listening with name: Macs-MacBook-Pro.local - 192.168.0.155 - Darwin
INFO:ENGINE: Engine service started on port 49264
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_VULKAN'
INFO:ENGINE: Defold Engine 1.10.1 (d8e6e73)
INFO:GRAPHICS: Vulkan device selected: Intel Iris Graphics
INFO:ENGINE: Loading data from: build/default
INFO:SOUND:   DSP backend: SSE
INFO:SOUND: Sound
INFO:SOUND:   nSamplesPerSec:   48000
INFO:ENGINE: Initialised sound device 'default'
INFO:GRAPHICS: Transcoding: /_generated_16f9bb9.texturec from 17 to 2 (TEXTURE_FORMAT_RGB_BC1 -> cTFBC1_RGB)
INFO:DLIB: SSDP: Started on address 192.168.0.155

Additional context (OPTIONAL): Tested on a more modern mac and worked fine so seems to be an issue for older macs or at least macbooks.

Qwarr avatar May 22 '25 22:05 Qwarr

Hard to say what goes wrong. Inte Iris is pretty old. You could try capturing a GPU Trace using Xcode and share it here:

https://developer.apple.com/documentation/xcode/capturing-a-metal-workload-in-xcode

  • Bundle your project for macOS.
  • Copy the Contents folder from your .app into some other location
  • Open Xcode and an empty project (doesn't matter what kind)
  • Select Debug->Debug Executable
  • Pick Contents/MacOS/your_exe
  • Once the app is running select Debug->Capture GPU Workload
  • Export GPU Trace using File->Export
  • Share it!

britzl avatar May 26 '25 14:05 britzl

Sorry for slow reply, been busy.

Seems I'm unable to do this, every time I try to capture the GPU workload it will either error out instantly saying "no GPU commands have been captured" or it'll get about 33% then say "no GPU workload detected" then wont progress any further.

Qwarr avatar May 29 '25 22:05 Qwarr

Thanks for trying. Without more info we do not really have a good path forward to try and figure out what's wrong.

britzl avatar Jun 02 '25 11:06 britzl