mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-16 03:18:06 +02:00
i965: Use proper texture alignment units for cubemaps on Gen5+.
In particular, S3TC compressed textures need align_h == 4. Fixes skybox errors in Quake 4 and FEAR. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34628 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit e0e688ca5441e2c8bc59ec7488bc1bc4ba196602)
This commit is contained in:
parent
0f87fe948a
commit
e4b1dce9ec
1 changed files with 4 additions and 1 deletions
|
|
@ -49,11 +49,14 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
|
|||
switch (mt->target) {
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
if (intel->gen >= 5) {
|
||||
GLuint align_h = 2;
|
||||
GLuint align_w;
|
||||
GLuint align_h;
|
||||
GLuint level;
|
||||
GLuint qpitch = 0;
|
||||
int h0, h1, q;
|
||||
|
||||
intel_get_texture_alignment_unit(mt->format, &align_w, &align_h);
|
||||
|
||||
/* On Ironlake, cube maps are finally represented as just a series
|
||||
* of MIPLAYOUT_BELOW 2D textures (like 2D texture arrays), separated
|
||||
* by a pitch of qpitch rows, where qpitch is defined by the equation
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue