summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_state.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-07-07 18:41:01 +0200
committerMarek Olšák <[email protected]>2012-07-09 13:57:59 +0200
commit6657a7af61ae7c328fecc6ee00246d7c6c93c936 (patch)
treef7ab843bf52e2ddc41a69ee77dc127db11683031 /src/gallium/drivers/r600/evergreen_state.c
parentb278aba42310e8fa30f2408b9dcd58dbb4901724 (diff)
r600g: use depth format from pipe_surface, not pipe_resource
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index f0fdd2b9770..15727986ea8 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1533,7 +1533,7 @@ static void evergreen_db(struct r600_context *rctx, struct r600_pipe_state *rsta
level = surf->base.u.tex.level;
rtex = (struct r600_resource_texture*)surf->base.texture;
first_layer = surf->base.u.tex.first_layer;
- format = r600_translate_dbformat(rtex->real_format);
+ format = r600_translate_dbformat(surf->base.format);
offset = r600_resource_va(rctx->context.screen, surf->base.texture);
/* XXX remove this once tiling is properly supported */
@@ -2546,7 +2546,7 @@ void evergreen_polygon_offset_update(struct r600_context *rctx)
float offset_units = rctx->rasterizer->offset_units;
unsigned offset_db_fmt_cntl = 0, depth;
- switch (rctx->framebuffer.zsbuf->texture->format) {
+ switch (rctx->framebuffer.zsbuf->format) {
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
depth = -24;