On 2 December 2013 11:39, Francisco Jerez <curroje...@riseup.net> wrote:
> This moves most of the surface state set-up logic that can be shared > between textures and shader images to a separate function. > Let's make a note in the commit message that this causes the "Render Target View Extent" field to be set on texture surfaces now. I don't think that's a problem, but it's nice to have it documented so that in case a problem later bisects to this commit we'll have a hint as to the behavioural change. > +static void > +gen7_update_texture_surface(struct gl_context *ctx, > + unsigned unit, > + uint32_t *surf_offset, > + bool for_gather) > +{ > + struct brw_context *brw = brw_context(ctx); > + struct gl_texture_object *obj = ctx->Texture.Unit[unit]._Current; > + > + if (obj->Target == GL_TEXTURE_BUFFER) { > + brw_update_buffer_texture_surface(ctx, unit, surf_offset); > + > Spurious newline here. > + } else { > + struct intel_texture_object *intel_obj = intel_texture_object(obj); > + struct intel_mipmap_tree *mt = intel_obj->mt; > + struct gl_sampler_object *sampler = _mesa_get_samplerobj(ctx, unit); > + unsigned tex_format = translate_tex_format( > + brw, mt->format, obj->DepthMode, sampler->sRGBDecode); > + > + if (for_gather && tex_format == BRW_SURFACEFORMAT_R32G32_FLOAT) > + tex_format = BRW_SURFACEFORMAT_R32G32_FLOAT_LD; > + > + gen7_emit_texture_surface_state(brw, obj, > + 0, mt->logical_depth0, > + obj->BaseLevel, > intel_obj->_MaxLevel, > + tex_format, surf_offset, > + false, for_gather); > + } > +} > + With those changes, this patch is: Reviewed-by: Paul Berry <stereotype...@gmail.com>
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev