summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-09-27 20:40:35 -0600
committerBrian Paul <[email protected]>2009-09-27 20:40:35 -0600
commitddffe4546a81216cde4376ee49cbaa021f4d04bb (patch)
treeacf75b9cdd639bdacdf5f447099effc3601e96de /src/mesa/drivers/dri/r300
parent9fbb8884f034e0d691fed0e099d4d796f3b42848 (diff)
drivers: use more mesa format functions
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c7
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 433e5a87d48..10daeca9e6d 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -196,6 +196,7 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
GLenum pname, const GLfloat * params)
{
radeonTexObj* t = radeon_tex_obj(texObj);
+ GLenum texBaseFormat;
if (RADEON_DEBUG & (RADEON_STATE | RADEON_TEXTURE)) {
fprintf(stderr, "%s( %s )\n", __FUNCTION__,
@@ -238,8 +239,10 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
case GL_DEPTH_TEXTURE_MODE:
if (!texObj->Image[0][texObj->BaseLevel])
return;
- if (texObj->Image[0][texObj->BaseLevel]->TexFormat->BaseFormat
- == GL_DEPTH_COMPONENT) {
+ texBaseFormat = texObj->Image[0][texObj->BaseLevel]->_BaseFormat;
+
+ if (texBaseFormat == GL_DEPTH_COMPONENT ||
+ texBaseFormat == GL_DEPTH_STENCIL) {
r300SetDepthTexMode(texObj);
break;
} else {
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index f030451b282..cc40e0d1dc8 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -209,7 +209,7 @@ static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
if (!t->image_override
&& VALID_FORMAT(firstImage->TexFormat->MesaFormat)) {
- if (firstImage->TexFormat->BaseFormat == GL_DEPTH_COMPONENT) {
+ if (firstImage->_BaseFormat == GL_DEPTH_COMPONENT) {
r300SetDepthTexMode(&t->base);
} else {
t->pp_txformat = tx_table[firstImage->TexFormat->MesaFormat].format;