if (format == GL_COLOR_INDEX || format == GL_YCBCR_MESA) {
format = GL_RGBA; /* a bit of a hack */
}
- else if (format == GL_DEPTH_COMPONENT) {
+ else if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) {
format = texUnit->_Current->DepthMode;
}
(void) lambda;
- ASSERT(tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_COMPONENT);
+ ASSERT(tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_COMPONENT ||
+ tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_STENCIL_EXT);
+
ASSERT(tObj->Target == GL_TEXTURE_1D ||
tObj->Target == GL_TEXTURE_2D ||
tObj->Target == GL_TEXTURE_RECTANGLE_NV);
switch (t->Target) {
case GL_TEXTURE_1D:
- if (format == GL_DEPTH_COMPONENT) {
+ if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) {
return &sample_depth_texture;
}
else if (needLambda) {
return &sample_nearest_1d;
}
case GL_TEXTURE_2D:
- if (format == GL_DEPTH_COMPONENT) {
+ if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) {
return &sample_depth_texture;
}
else if (needLambda) {