mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
i915tex: Make sure pitch is aligned properly for render-to-texture.
Just always align texture pitch to multiples of 64 bytes for now, pending a more sophisticated scheme to do it only when really necessary.
This commit is contained in:
parent
9e01b915f1
commit
b7a9222dc7
1 changed files with 11 additions and 1 deletions
|
|
@ -97,9 +97,19 @@ intel_miptree_create(struct intel_context *intel,
|
|||
break;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
if (ok) {
|
||||
if (!mt->compressed) {
|
||||
/* XXX: Align pitch to multiple of 64 bytes for now to allow
|
||||
* render-to-texture to work in all cases. This should probably be
|
||||
* replaced at some point by some scheme to only do this when really
|
||||
* necessary.
|
||||
*/
|
||||
mt->pitch = ((mt->pitch * cpp + 63) & ~63) / cpp;
|
||||
}
|
||||
|
||||
mt->region = intel_region_alloc(intel->intelScreen,
|
||||
mt->cpp, mt->pitch, mt->total_height);
|
||||
}
|
||||
|
||||
if (!mt->region) {
|
||||
free(mt);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue