X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fr300%2Fr300_state_derived.c;h=2dabf18d5e80f7c6fe6097c14e49cc4bd7ecc880;hb=4445e170bee23a3607ece0e010adef7058ac6a11;hp=daeb4d716d079773c195cf6b82296a127c5042ac;hpb=9f61e43b4903c6cf0ac03a479ec9ed7b15fd6ccf;p=mesa.git diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index daeb4d716d0..2dabf18d5e8 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -615,7 +615,7 @@ static uint32_t r300_get_border_color(enum pipe_format format, case PIPE_FORMAT_Z16_UNORM: return util_pack_z(PIPE_FORMAT_Z16_UNORM, border[0]); case PIPE_FORMAT_X8Z24_UNORM: - case PIPE_FORMAT_S8_USCALED_Z24_UNORM: + case PIPE_FORMAT_S8_UINT_Z24_UNORM: if (is_r500) { return util_pack_z(PIPE_FORMAT_X8Z24_UNORM, border[0]); } else { @@ -782,28 +782,27 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300) * an i-th mipmap level as the zero level. */ base_level += min_level; } - offset = tex->tex_offset + - tex->tex.offset_in_bytes[base_level]; + offset = tex->tex.offset_in_bytes[base_level]; r300_texture_setup_format_state(r300->screen, tex, + view->base.format, base_level, + view->width0_override, + view->height0_override, &texstate->format); texstate->format.tile_config |= offset & 0xffffffe0; assert((offset & 0x1f) == 0); - } else { - texstate->format.tile_config |= tex->tex_offset & 0xffffffe0; - assert((tex->tex_offset & 0x1f) == 0); } /* Assign a texture cache region. */ texstate->format.format1 |= view->texcache_region; /* Depth textures are kinda special. */ - if (util_format_is_depth_or_stencil(tex->b.b.b.format)) { + if (util_format_is_depth_or_stencil(view->base.format)) { unsigned char depth_swizzle[4]; if (!r300->screen->caps.is_r500 && - util_format_get_blocksizebits(tex->b.b.b.format) == 32) { + util_format_get_blocksizebits(view->base.format) == 32) { /* X24x8 is sampled as Y16X16 on r3xx-r4xx. * The depth here is at the Y component. */ for (j = 0; j < 4; j++) @@ -828,7 +827,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300) } if (r300->screen->caps.dxtc_swizzle && - util_format_is_compressed(tex->b.b.b.format)) { + util_format_is_compressed(view->base.format)) { texstate->filter1 |= R400_DXTC_SWIZZLE_ENABLE; } @@ -874,7 +873,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300) } /* Float textures only support nearest and mip-nearest filtering. */ - if (util_format_is_float(tex->b.b.b.format)) { + if (util_format_is_float(view->base.format)) { /* No MAG linear filtering. */ if ((texstate->filter0 & R300_TX_MAG_FILTER_MASK) == R300_TX_MAG_FILTER_LINEAR) {