0

When run NPLB test, it will crash as follows in starboard/shared/directfb/blitter_destroy_swap_chain.cc because of the directfb surface is not created when it used openGL(not directfb) to draw the UI, so this directfb test case may need to be skiped when it uses openGL. If it's so, is there a plan to skip the directfb related test cases when it uses the openGL to draw the UI?

Caught signal: SIGSEGV (11)
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
        SbBlitterDestroySwapChain [0x1ae304]
bitchainer
  • 535
  • 2
  • 19
  • Blitter tests will run only if SB_HAS_BLITTER is 1. Does your configuration_public.h has SB_HAS_BLITTER set to 0? (I assume your gyp_configuration.gypi has 'gl_type': 'system_gles2'). – mmotorny Apr 20 '17 at 04:26
  • hi mmotorny, yes, we set gl_type to use opengl, and it does not use directfb blitter(SB_HAS_BLITTER is used for directFB), so gl_type and SB_HAS_BLITTER should be mutually exclusive, if so, it maybe better to set SB_HAS_BLITTER automatically based on the setting of gl_type, is it? – bitchainer Apr 20 '17 at 05:26
  • hi mmotorny, if I set SB_HAS_BLITTER 0, data structures in starboard/blitter.h will be disabled, but lots of places still referenced it, then lots of blitter related build errors would happen. – bitchainer Apr 20 '17 at 06:34
  • This is certainly not expected. Can you give an example of code that refers to blitter despite SB_HAS_BLITTER set to 0? – mmotorny Apr 20 '17 at 07:18
  • hi, mmotomy, I used cobalt 9.34413, when set SB_HAS_BLITTER to 0, some errors messages from starboard/shared/directfb/blitter_internal.h said 'SbBlitterSurfaceInfo/SbBlitterColor/SbBlitterRect/SbBlitterContext...' are not named a type or declared, these data structures are defined in starboard/blitter.h which is disabled by setting SB_HAS_BLITTER to 0. – bitchainer Apr 20 '17 at 08:03
  • The whole file of blitter.h is defined as follows: #if SB_HAS(BLITTER) .... #endif // SB_HAS(BLITTER) – bitchainer Apr 20 '17 at 08:08
  • You probably include files from "starboard/shared/directfb" in your starboard_platform.gypi. Either remove them or include them conditionally based on 'gl_type'. – mmotorny Apr 20 '17 at 08:34
  • Hi, mmotomy, yes, it need to include them conditionally based on 'gl_type', thank you very much! – bitchainer Apr 20 '17 at 08:46

1 Answers1

0

It seems that you are including files from starboard/shared/directfb in your starboard_platform.gypi on a platform that supports OpenGL ES. You need to include sources conditionally based on 'gl_type':

'conditions': [
  ['gl_type == "none"', {
    'sources': [
      # Blitter source files.
    ],
  }, {
    'sources': [
      # OpenGL ES source files.
    ],
  }],
],

See src\cobalt\renderer\backend\starboard\platform_backend.gyp for a real-life example.

mmotorny
  • 320
  • 1
  • 7