Evas gl: Fix ETC2 texture atlasses
ETC2 textures were allocated using the same empty slots pool as RGBA textures. ETC1 texture atlasses should still be tested. An extension string is required to avoid using the bad fallback in place right now. But there is no such thing yet.
This commit is contained in:
parent
5688337a6c
commit
a691b2ebf9
|
@ -426,7 +426,7 @@ struct _Evas_GL_Shared
|
|||
|
||||
struct {
|
||||
Eina_List *whole;
|
||||
Eina_List *atlas[33][5];
|
||||
Eina_List *atlas[33][6];
|
||||
} tex;
|
||||
|
||||
Eina_Hash *native_pm_hash;
|
||||
|
|
|
@ -205,18 +205,25 @@ _tex_format_index(GLuint format)
|
|||
case GL_ALPHA12:
|
||||
case GL_ALPHA16:
|
||||
return 2;
|
||||
case GL_ETC1_RGB8_OES:
|
||||
return 3;
|
||||
case GL_COMPRESSED_RGB8_ETC2:
|
||||
return 4;
|
||||
case GL_COMPRESSED_RGBA8_ETC2_EAC:
|
||||
return 5;
|
||||
case GL_LUMINANCE: // never used in atlas
|
||||
case GL_LUMINANCE4:
|
||||
case GL_LUMINANCE8:
|
||||
case GL_LUMINANCE12:
|
||||
case GL_LUMINANCE16:
|
||||
return 3;
|
||||
return 6;
|
||||
case GL_LUMINANCE4_ALPHA4:
|
||||
case GL_LUMINANCE8_ALPHA8:
|
||||
case GL_LUMINANCE12_ALPHA12:
|
||||
case GL_LUMINANCE16_ALPHA16:
|
||||
return 4;
|
||||
return 7;
|
||||
default:
|
||||
// abort?
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue