diff options
author | Chia-I Wu <[email protected]> | 2015-06-24 22:47:30 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2015-06-26 13:45:28 +0800 |
commit | dc2e92b2d3d216fc9657f2ef594d7c5d0b03370e (patch) | |
tree | 95a14db92d3e63e6e25d29bd798d4e354e7884aa /src/gallium/drivers/ilo/ilo_state.c | |
parent | 934e4a469fd37dac03b8280cce41df4d9f4ed123 (diff) |
ilo: replace pipe_texture_target by gen_surface_type
Replace pipe_texture_target by gen_surface_type in ilo_image. Change how
GEN6_SURFTYPE_CUBE is specified in ilo_state_surface and ilo_state_zs.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c index 24ab59aa32b..445df1966f9 100644 --- a/src/gallium/drivers/ilo/ilo_state.c +++ b/src/gallium/drivers/ilo/ilo_state.c @@ -2045,6 +2045,7 @@ ilo_create_sampler_view(struct pipe_context *pipe, info.vma = &tex->vma; info.access = ILO_STATE_SURFACE_ACCESS_SAMPLER; + info.type = tex->image.type; if (templ->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT && tex->image.separate_stencil) { @@ -2054,8 +2055,6 @@ ilo_create_sampler_view(struct pipe_context *pipe, info.format = ilo_format_translate_texture(dev, templ->format); } - info.is_cube_map = (tex->image.target == PIPE_TEXTURE_CUBE || - tex->image.target == PIPE_TEXTURE_CUBE_ARRAY); info.is_array = util_resource_is_array_texture(&tex->base); info.readonly = true; @@ -2116,6 +2115,10 @@ ilo_create_surface(struct pipe_context *pipe, info.aux_vma = &tex->aux_vma; info.access = ILO_STATE_SURFACE_ACCESS_DP_RENDER; + + info.type = (tex->image.type == GEN6_SURFTYPE_CUBE) ? + GEN6_SURFTYPE_2D : tex->image.type; + info.format = ilo_format_translate_render(dev, templ->format); info.is_array = util_resource_is_array_texture(&tex->base); @@ -2148,6 +2151,9 @@ ilo_create_surface(struct pipe_context *pipe, info.slice_count = templ->u.tex.last_layer - templ->u.tex.first_layer + 1; + info.type = (tex->image.type == GEN6_SURFTYPE_CUBE) ? + GEN6_SURFTYPE_2D : tex->image.type; + ilo_state_zs_init(&surf->u.zs, dev, &info); } |