glamor_gl: Use GL_ALPHA for depth 8 pixmap.
Use GL_RGBA to represent a8 pixmap is not efficient. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
428f2a3f58
commit
18d69fb014
|
@ -185,7 +185,7 @@ struct glamor_saved_procs {
|
|||
#ifdef GLAMOR_GLES2
|
||||
#define CACHE_FORMAT_COUNT 3
|
||||
#else
|
||||
#define CACHE_FORMAT_COUNT 1
|
||||
#define CACHE_FORMAT_COUNT 2
|
||||
#endif
|
||||
|
||||
#define CACHE_BUCKET_WCOUNT 4
|
||||
|
|
|
@ -257,10 +257,10 @@ static inline void
|
|||
gl_iformat_for_depth(int depth, GLenum * format)
|
||||
{
|
||||
switch (depth) {
|
||||
#if 0
|
||||
case 8:
|
||||
*format = GL_ALPHA;
|
||||
break;
|
||||
#if 0
|
||||
case 24:
|
||||
*format = GL_RGB;
|
||||
break;
|
||||
|
@ -411,6 +411,8 @@ glamor_get_tex_format_type_from_pictformat(PictFormatShort format,
|
|||
inline static int cache_format(GLenum format)
|
||||
{
|
||||
switch (format) {
|
||||
case GL_ALPHA:
|
||||
return 1;
|
||||
case GL_RGBA:
|
||||
return 0;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue
Block a user