[Mesa-dev] [PATCH 05/16] i965: Add functions up/downsampling on miptrees (v2)

Chad Versace chad.versace at linux.intel.com
Mon Aug 6 17:21:21 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/06/2012 11:38 AM, Eric Anholt wrote:
> Chad Versace <chad.versace at linux.intel.com> writes:
> 
>> These functions do an up or downsample between mt and
>> mt->singlesample_mt.
> 
> 
>> +static void +intel_miptree_updownsample(struct intel_context *intel, +
>> struct intel_mipmap_tree *mt, +                           enum
>> intel_updownsample direction) +{ +   struct intel_mipmap_tree *src; +
>> struct intel_mipmap_tree *dst; + +   /* Only flat, renderbuffer-like
>> miptrees are supported. */ +   assert(mt->target == GL_TEXTURE_2D); +
>> assert(mt->first_level == 0); +   assert(mt->last_level == 0); + +
>> switch (direction) { +   case INTEL_DOWNSAMPLE: { +      if
>> (!mt->need_downsample) +         return; +      src = mt; +      dst =
>> mt->singlesample_mt; +      break; +   } +   case INTEL_UPSAMPLE: { +
>> assert(!mt->need_downsample); +      src = mt->singlesample_mt; +
>> dst = mt; +      break; +   }
> 
> Also, I think the direction-dependent code should be moved into the two 
> callers.

Done in series v3.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJQIF+AAAoJEAIvNt057x8iflcQAKqTRuXhhIScKDdNon0L1Hh2
UQQAXJw4YVJTPNfqJsXwj6fk4XZAZCRuFQZC+pGD2U7quIzffyvmloItmoZGoxjl
21tf6Ra6MNoGOQOBvB862uC5AtmN29quOp6hljBcxstTOJaApkLU161nitB0Bx5B
QfTKdHj783IgMCkbZqgp+yb9g3WPiXXPMUMG4wTyJfD4PDpEIAzbiI9oOCPtq5Gy
wK1kWFMnkNH8DZrx7UjjFToTySMWhEbVssAGcnxNesE0jTSKXnHg+KbOXdPJbYeh
iYQGZbAVgITzp7u4jxOt51pMly37aGSuyfM6oe5X1TfWwees5CzHzuQNYJ6sIxqp
t2Zy4sRIe6QNnoK25dF/cX82eQd+dW18N38kc1kVkbzy9NOPwzy7NVAUQaSbDXbc
3jtYFblg7Nx6BlVspEk8GfXwkDPWoM2l9b40bpohn7p3VxAVEV+c6CM2zvnaKkbu
NFhf1+luz5AaIMedf+YvtUiZNcBYy1ur7bQhpaTK+9XVP5IUiHjER5w9D5IFmoNV
b5utLY4GbiHmEc6hVGjWVnjPFSeu5MfWAnbCBVeQhidTcgjdSN5R62eqKd9TfZhF
uNtIgy823yyZVvTy05phoDKfiIAACjAA1Xxyolbvtvy9+MAyAIbn+nQ6o0w3MP7i
SkC2HCu3Std0ZGpa3136
=S4tG
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list