diff options
author | Chia-I Wu <[email protected]> | 2015-06-25 22:27:04 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2015-06-26 13:45:28 +0800 |
commit | cbdc26aa3f76dc20285caa7e62ca8809cb2fe638 (patch) | |
tree | b3692f4e7b2fc294b8d335498f84f51e090de06b /src/gallium/drivers/ilo/ilo_state.c | |
parent | 2ee95f6d64aca9e9490c1ac293dd711b5f60a16b (diff) |
ilo: replace pipe_format by gen_surface_format
Replace pipe_format by gen_surface_format in ilo_image. Change how depth
format is specified in ilo_state_zs.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c index 20d3c001188..c13fa9c2e18 100644 --- a/src/gallium/drivers/ilo/ilo_state.c +++ b/src/gallium/drivers/ilo/ilo_state.c @@ -1699,10 +1699,11 @@ ilo_set_framebuffer_state(struct pipe_context *pipe, if (state->zsbuf) { const struct ilo_surface_cso *cso = (const struct ilo_surface_cso *) state->zsbuf; + const struct ilo_texture *tex = ilo_texture(cso->base.texture); fb->has_hiz = cso->u.zs.hiz_vma; fb->depth_offset_format = - ilo_state_zs_get_depth_format(&cso->u.zs, dev); + ilo_format_translate_depth(dev, tex->image_format); } else { fb->has_hiz = false; fb->depth_offset_format = GEN6_ZFORMAT_D32_FLOAT; @@ -2154,6 +2155,11 @@ ilo_create_surface(struct pipe_context *pipe, info.type = (tex->image.type == GEN6_SURFTYPE_CUBE) ? GEN6_SURFTYPE_2D : tex->image.type; + info.format = ilo_format_translate_depth(dev, tex->image_format); + if (ilo_dev_gen(dev) == ILO_GEN(6) && !info.hiz_vma && + tex->image_format == PIPE_FORMAT_Z24X8_UNORM) + info.format = GEN6_ZFORMAT_D24_UNORM_S8_UINT; + ilo_state_zs_init(&surf->u.zs, dev, &info); } |