Exemplo n.º 1
0
/**
 * Compute the renderbuffer's Red/Green/EtcBit fields from the pipe format.
 */
static int
init_renderbuffer_bits(struct st_renderbuffer *strb,
                       enum pipe_format pipeFormat)
{
   struct pipe_format_info info;

   if (!st_get_format_info( pipeFormat, &info )) {
      assert( 0 );
   }

   strb->Base.Format = info.mesa_format;
   strb->Base.DataType = st_format_datatype(pipeFormat);

   return info.size;
}
Exemplo n.º 2
0
/**
 * Compute the renderbuffer's Red/Green/EtcBit fields from the pipe format.
 */
static int
init_renderbuffer_bits(struct st_renderbuffer *strb,
                       enum pipe_format pipeFormat)
{
   struct pipe_format_info info;

   if (!st_get_format_info( pipeFormat, &info )) {
      assert( 0 );
   }

   strb->Base._ActualFormat = info.base_format;
   strb->Base.RedBits = info.red_bits;
   strb->Base.GreenBits = info.green_bits;
   strb->Base.BlueBits = info.blue_bits;
   strb->Base.AlphaBits = info.alpha_bits;
   strb->Base.DepthBits = info.depth_bits;
   strb->Base.StencilBits = info.stencil_bits;
   strb->Base.DataType = st_format_datatype(pipeFormat);

   return info.size;
}