Ignore:
Timestamp:
Oct 7, 2015, 11:56:33 AM (9 years ago)
Author:
alain
Message:

Introduce the giet_fbf_size() and giet_fbf_alloc() system calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/raycast/raycast.c

    r708 r712  
    1818pthread_t                trdid[1024];        // thread identifiers array
    1919Game                     game;               // Game state
     20unsigned int             fbuf_x_size;        // FBF width
     21unsigned int             fbuf_y_size;        // FBF height
    2022
    2123// Textures
     
    5254    unsigned int i, j, n;   // indexes for loops
    5355
     56    // get private TTY
    5457    giet_tty_alloc(0);
    5558
     
    6366    giet_pthread_assert( (h<=16) , "[RAYCAST ERROR] check hardware config" );
    6467    giet_pthread_assert( (p<= 4) , "[RAYCAST ERROR] check hardware config" );
     68
     69    // check frame buffer availability
     70    giet_fbf_size( &fbuf_x_size , &fbuf_y_size );
     71    giet_pthread_assert( ((fbuf_x_size) && (fbuf_y_size)) ,
     72                         "[RAYCAST ERROR] no frame buffer available" );
    6573
    6674    // compute total number of threads
     
    8391
    8492    // Initialize frame buffer and start Chained buffer DMA
     93    giet_fbf_alloc();
    8594    giet_fbf_cma_alloc();
    8695    giet_fbf_cma_init_buf(buf[0], buf[1], sts[0], sts[1]);
     
    127136        unsigned int slice;
    128137        while ( dispRenderSlice( &slice ) );
    129 /*
    130         unsigned int again;
    131         do
    132         {
    133             again = dispRenderSlice( &slice );
    134         }
    135         while ( again );
    136 */
     138
    137139        // Wait last slice completion
    138140        while (slice_count < FBUF_X_SIZE)  giet_tty_printf(" ");
Note: See TracChangeset for help on using the changeset viewer.