OpenGLES cores do not render on Odroid XU4
(2020-06-22, 20:53)lrusak Wrote:
(2020-05-31, 02:26)MastaG Wrote: Alright thanks for the information.
I'm kinda new to this and have not much experience in C++ programming.
However I find the source code very readable.

All software cores work great nevertheless.

Only the DMA renderer is giving me EGL errors using the Mali driver.
Will try to debug it.

Get a proper device with proper drivers  Blush
Yeah the driver is kinda limited in what it can do.
Kodi uses EGL_EXT_image_dma_buf_import to render the images.
However Odroid XU3/4's mali drivers only support: DRM_FORMAT_RGBA8888 when utilizing EGL_EXT_image_dma_buf_import.

I can see the following for Kodi's GameClient translation:

AVPixelFormat CGameClientTranslator::TranslatePixelFormat(GAME_PIXEL_FORMAT format)
  switch (format)
    case GAME_PIXEL_FORMAT_0RGB8888:
      return AV_PIX_FMT_0RGB32;
      return AV_PIX_FMT_RGB565;
    case GAME_PIXEL_FORMAT_0RGB1555:
      return AV_PIX_FMT_RGB555;
  return AV_PIX_FMT_NONE;

Which get's translated by the DMA renderer:
bool CRenderBufferPoolDMA::ConfigureInternal()
  switch (m_format)
    case AV_PIX_FMT_0RGB32:
      m_fourcc = DRM_FORMAT_ARGB8888;
      return true;
    case AV_PIX_FMT_RGB555:
      m_fourcc = DRM_FORMAT_ARGB1555;
      return true;
    case AV_PIX_FMT_RGB565:
      m_fourcc = DRM_FORMAT_RGB565;
      return true;
      break; // we shouldn't even get this far if we are given an unsupported pixel format

Now the snes9x will render to RGB565 pixel format, this will eventually end up calling EGL_EXT_image_dma_buf_import with: DRM_FORMAT_RGB565.
Which fails with error 12300 (EGL_BAD_PARAMETER)
2020-07-29 00:16:11.051 T:1590    DEBUG <general>: RetroPlayer[RENDER]: Creating render buffer of size 256x224 for buffer pool
2020-07-29 00:16:11.051 T:1590    DEBUG <general>: CRenderBufferDMA: using BufferObject type: CUDMABufferObject
2020-07-29 00:16:11.063 T:1439    ERROR <general>: CEGLImage::CreateImage - failed to import buffer into EGL image: 12300
2020-07-29 00:16:11.063 T:1439    DEBUG <general>: CEGLImage::CreateImage - attributes:
                                                   EGL_WIDTH: 256
                                                   EGL_HEIGHT: 224
                                                   EGL_LINUX_DRM_FOURCC_EXT: 909199186
                                                   EGL_DMA_BUF_PLANE0_FD_EXT: 42
                                                   EGL_DMA_BUF_PLANE0_OFFSET_EXT: 0
                                                   EGL_DMA_BUF_PLANE0_PITCH_EXT: 512

Is it possible to somehow upscale RGB565 to RGBA8888 ?

Messages In This Thread
RE: OpenGLES cores do not render on Odroid XU4 - by MastaG - 2020-07-30, 00:49

Logout Mark Read Team Forum Stats Members Help
OpenGLES cores do not render on Odroid XU40
This forum uses Lukasz Tkacz MyBB addons.