From 6c380d42b161da977d164ccf75ccc25a2e056bb1 Mon Sep 17 00:00:00 2001 From: Anuj Phogat Date: Tue, 14 Apr 2015 22:06:48 -0700 Subject: i965: Use BRW_SURFACE_* in place of GL_TEXTURE_* Makes no functional changes in the code. Signed-off-by: Anuj Phogat Reviewed-by: Chris Forbes Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/gen8_surface_state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/i965/gen8_surface_state.c') diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c index 7caa585e8be..96310742bf1 100644 --- a/src/mesa/drivers/dri/i965/gen8_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c @@ -205,16 +205,16 @@ gen8_emit_texture_surface_state(struct brw_context *brw, assert(brw->gen < 8 || mt->num_samples > 1 || mt->align_w == 16); } + const uint32_t surf_type = translate_tex_target(target); uint32_t *surf = allocate_surface_state(brw, surf_offset, surf_index); - surf[0] = translate_tex_target(target) << BRW_SURFACE_TYPE_SHIFT | + surf[0] = SET_FIELD(surf_type, BRW_SURFACE_TYPE) | format << BRW_SURFACE_FORMAT_SHIFT | vertical_alignment(mt) | horizontal_alignment(mt) | tiling_mode; - if (target == GL_TEXTURE_CUBE_MAP || - target == GL_TEXTURE_CUBE_MAP_ARRAY) { + if (surf_type == BRW_SURFACE_CUBE) { surf[0] |= BRW_SURFACE_CUBEFACE_ENABLES; } -- cgit v1.2.3