コード例 #1
0
ファイル: via_span.c プロジェクト: Ionic/nx-libs
/**
 * Plug in the Get/Put routines for the given driRenderbuffer.
 */
void
viaSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
{
   if (drb->Base.InternalFormat == GL_RGBA) {
      if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) {
         viaInitPointers_565(&drb->Base);
      }
      else {
         viaInitPointers_8888(&drb->Base);
      }
   }
   else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT16) {
      drb->Base.GetRow        = viaReadDepthSpan_16;
      drb->Base.GetValues     = viaReadDepthPixels_16;
      drb->Base.PutRow        = viaWriteDepthSpan_16;
      drb->Base.PutMonoRow    = viaWriteMonoDepthSpan_16;
      drb->Base.PutValues     = viaWriteDepthPixels_16;
      drb->Base.PutMonoValues = NULL;
   }
   else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT24) {
      drb->Base.GetRow        = viaReadDepthSpan_24_8;
      drb->Base.GetValues     = viaReadDepthPixels_24_8;
      drb->Base.PutRow        = viaWriteDepthSpan_24_8;
      drb->Base.PutMonoRow    = viaWriteMonoDepthSpan_24_8;
      drb->Base.PutValues     = viaWriteDepthPixels_24_8;
      drb->Base.PutMonoValues = NULL;
   }
   else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT32) {
      drb->Base.GetRow        = viaReadDepthSpan_32;
      drb->Base.GetValues     = viaReadDepthPixels_32;
      drb->Base.PutRow        = viaWriteDepthSpan_32;
      drb->Base.PutMonoRow    = viaWriteMonoDepthSpan_32;
      drb->Base.PutValues     = viaWriteDepthPixels_32;
      drb->Base.PutMonoValues = NULL;
   }
   else if (drb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) {
      drb->Base.GetRow        = viaReadStencilSpan_24_8;
      drb->Base.GetValues     = viaReadStencilPixels_24_8;
      drb->Base.PutRow        = viaWriteStencilSpan_24_8;
      drb->Base.PutMonoRow    = viaWriteMonoStencilSpan_24_8;
      drb->Base.PutValues     = viaWriteStencilPixels_24_8;
      drb->Base.PutMonoValues = NULL;
   }
}
コード例 #2
0
ファイル: via_span.c プロジェクト: nikai3d/mesa
/**
 * Plug in the Get/Put routines for the given driRenderbuffer.
 */
void
viaSetSpanFunctions(struct via_renderbuffer *vrb, const struct gl_config *vis)
{
    if (vrb->Base.Format == MESA_FORMAT_RGB565) {
        viaInitPointers_565(&vrb->Base);
    }
    else if (vrb->Base.Format == MESA_FORMAT_ARGB8888) {
        viaInitPointers_8888(&vrb->Base);
    }
    else if (vrb->Base.Format == MESA_FORMAT_Z16) {
        viaInitDepthPointers_z16(&vrb->Base);
    }
    else if (vrb->Base.Format == MESA_FORMAT_Z24_S8) {
        viaInitDepthPointers_z24_s8(&vrb->Base);
    }
    else if (vrb->Base.Format == MESA_FORMAT_Z32) {
        viaInitDepthPointers_z32(&vrb->Base);
    }
    else if (vrb->Base.Format == MESA_FORMAT_S8) {
        viaInitStencilPointers_z24_s8(&vrb->Base);
    }
}
コード例 #3
0
ファイル: via_span.c プロジェクト: Magister/x11rdp_xorg71
/**
 * Plug in the Get/Put routines for the given driRenderbuffer.
 */
void
viaSetSpanFunctions(struct via_renderbuffer *vrb, const GLvisual *vis)
{
   if (vrb->Base.InternalFormat == GL_RGBA) {
      if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) {
         viaInitPointers_565(&vrb->Base);
      }
      else {
         viaInitPointers_8888(&vrb->Base);
      }
   }
   else if (vrb->Base.InternalFormat == GL_DEPTH_COMPONENT16) {
      viaInitDepthPointers_z16(&vrb->Base);
   }
   else if (vrb->Base.InternalFormat == GL_DEPTH_COMPONENT24) {
      viaInitDepthPointers_z24_s8(&vrb->Base);
   }
   else if (vrb->Base.InternalFormat == GL_DEPTH_COMPONENT32) {
      viaInitDepthPointers_z32(&vrb->Base);
   }
   else if (vrb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) {
      viaInitStencilPointers_z24_s8(&vrb->Base);
   }
}
コード例 #4
0
ファイル: via_span.c プロジェクト: Ionic/nx-libs
void viaInitSpanFuncs(GLcontext *ctx)
{
#if 0
    struct via_context *vmesa = VIA_CONTEXT(ctx);
#endif
    struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);

    swdd->SetBuffer = viaSetBuffer;
#if 0
    if (vmesa->viaScreen->bitsPerPixel == 16) {
	viaInitPointers_565( swdd );
    }
    else if (vmesa->viaScreen->bitsPerPixel == 32) {
	viaInitPointers_8888( swdd );
    }
    else {
	assert(0);
    }
#endif
#if 0
    if (vmesa->glCtx->Visual.depthBits == 16) {
	swdd->ReadDepthSpan = viaReadDepthSpan_16;
	swdd->WriteDepthSpan = viaWriteDepthSpan_16;
	swdd->WriteMonoDepthSpan = viaWriteMonoDepthSpan_16;
	swdd->ReadDepthPixels = viaReadDepthPixels_16;
	swdd->WriteDepthPixels = viaWriteDepthPixels_16;
    }
    else if (vmesa->glCtx->Visual.depthBits == 24) {
        swdd->ReadDepthSpan = viaReadDepthSpan_24_8;
	swdd->WriteDepthSpan = viaWriteDepthSpan_24_8;
	swdd->WriteMonoDepthSpan = viaWriteMonoDepthSpan_24_8;
	swdd->ReadDepthPixels = viaReadDepthPixels_24_8;
	swdd->WriteDepthPixels = viaWriteDepthPixels_24_8;

	swdd->WriteStencilSpan = viaWriteStencilSpan_24_8;
	swdd->ReadStencilSpan = viaReadStencilSpan_24_8;
	swdd->WriteStencilPixels = viaWriteStencilPixels_24_8;
	swdd->ReadStencilPixels = viaReadStencilPixels_24_8;
    }
    else if (vmesa->glCtx->Visual.depthBits == 32) {
	swdd->ReadDepthSpan = viaReadDepthSpan_32;
	swdd->WriteDepthSpan = viaWriteDepthSpan_32;
	swdd->WriteMonoDepthSpan = viaWriteMonoDepthSpan_32;
	swdd->ReadDepthPixels = viaReadDepthPixels_32;
	swdd->WriteDepthPixels = viaWriteDepthPixels_32;
    }
#endif

    swdd->SpanRenderStart = viaSpanRenderStart;
    swdd->SpanRenderFinish = viaSpanRenderFinish; 

#if 0
    swdd->WriteCI8Span = NULL;
    swdd->WriteCI32Span = NULL;
    swdd->WriteMonoCISpan = NULL;
    swdd->WriteCI32Pixels = NULL;
    swdd->WriteMonoCIPixels = NULL;
    swdd->ReadCI32Span = NULL;
    swdd->ReadCI32Pixels = NULL;	
#endif
}