[Mesa-dev] [PATCH 4/4] i965: Assert that relayout laid out something that won't need it again.
Eric Anholt
eric at anholt.net
Wed Dec 19 10:49:51 PST 2012
Jordan Justen <jljusten at gmail.com> writes:
> On Tue, Dec 18, 2012 at 1:35 PM, Eric Anholt <eric at anholt.net> wrote:
>> The ETC1 changes failed at this, so let's make sure it will be caught in
>> testing next time.
>> ---
>> src/mesa/drivers/dri/intel/intel_tex_validate.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
>> index 2f1b354..3f21601 100644
>> --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
>> +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
>> @@ -113,6 +113,12 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
>> if (intelObj->mt != intelImage->mt) {
>> intel_miptree_copy_teximage(intel, intelImage, intelObj->mt);
>> }
>> +
>> + /* After we're done, we'd better agree that our layout is
>> + * appropriate, or we'll end up hitting this function again on the
>> + * next draw
>> + */
>> + assert(intel_miptree_match_image(intelObj->mt, &intelImage->base.Base));
>
> Should we use _mesa_error here, or is it very unlikely another
> scenario will lead here?
Well, it's not a GL error, so not _mesa_error. It's something that we
should always catch in testing, so I think assert is fine instead of
_mesa_problem().
> Series Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121219/f6d1146d/attachment.pgp>
More information about the mesa-dev
mailing list