mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
i965/surface_state: Use an identity swizzle pre-Haswell
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
293b8de161
commit
23d703de1f
1 changed files with 6 additions and 0 deletions
|
|
@ -592,6 +592,12 @@ static void brw_update_texture_surface(struct gl_context *ctx,
|
|||
.usage = ISL_SURF_USAGE_TEXTURE_BIT,
|
||||
};
|
||||
|
||||
/* On Ivy Bridge and earlier, we handle texture swizzle with shader
|
||||
* code. The actual surface swizzle should be identity.
|
||||
*/
|
||||
if (devinfo->gen <= 7 && !devinfo->is_haswell)
|
||||
view.swizzle = ISL_SWIZZLE_IDENTITY;
|
||||
|
||||
if (obj->Target == GL_TEXTURE_CUBE_MAP ||
|
||||
obj->Target == GL_TEXTURE_CUBE_MAP_ARRAY)
|
||||
view.usage |= ISL_SURF_USAGE_CUBE_BIT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue