<enum name="HALF_FLOAT_OES" value="0x8D61"/>
</category>
+<category name="GL_AMD_compressed_ATC_texture" number="40">
+ <enum name="ATC_RGB_AMD" value="0x8C92"/>
+ <enum name="ATC_RGBA_EXPLICIT_ALPHA_AMD" value="0x8C93"/>
+ <enum name="ATC_RGBA_INTERPOLATED_ALPHA_AMD" value="0x87EE"/>
+</category>
+
<!-- 41. GL_EXT_texture_filter_anisotropic -->
<category name="GL_EXT_texture_type_2_10_10_10_REV" number="42">
EXT(3DFX_texture_compression_FXT1 , TDFX_texture_compression_FXT1 , GLL, GLC, x , x , 1999)
+EXT(AMD_compressed_ATC_texture , AMD_compressed_ATC_texture , x , x , ES1, ES2, 2008)
EXT(AMD_conservative_depth , ARB_conservative_depth , GLL, GLC, x , x , 2009)
EXT(AMD_depth_clamp_separate , AMD_depth_clamp_separate , GLL, GLC, x , x , 2009)
EXT(AMD_draw_buffers_blend , ARB_draw_buffers_blend , GLL, GLC, x , x , 2009)
elif fmat.layout == 'astc':
bits = 16 if 'RGBA' in fmat.name else 8
return bits if fmat.has_channel(chan_name) else 0
+ elif fmat.layout == 'atc':
+ return 8 if fmat.has_channel(chan_name) else 0
else:
assert False
else:
case MESA_FORMAT_ETC1_RGB8:
case MESA_FORMAT_ETC2_RGB8:
case MESA_FORMAT_ETC2_SRGB8:
+ case MESA_FORMAT_ATC_RGB:
return MESA_FORMAT_BGR_UNORM8;
case MESA_FORMAT_ETC2_RGBA8_EAC:
case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
case MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1:
case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
+ case MESA_FORMAT_ATC_RGBA_EXPLICIT:
+ case MESA_FORMAT_ATC_RGBA_INTERPOLATED:
return MESA_FORMAT_A8B8G8R8_UNORM;
case MESA_FORMAT_ETC2_R11_EAC:
case MESA_FORMAT_ETC2_SIGNED_R11_EAC:
MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5 , astc , 6, 5, 5, x128, , , , xyzw, srgb
MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5 , astc , 6, 6, 5, x128, , , , xyzw, srgb
MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6 , astc , 6, 6, 6, x128, , , , xyzw, srgb
+
+# ATC compressed formats
+MESA_FORMAT_ATC_RGB , atc , 4, 4, 1, x64 , , , , xyz1, rgb
+MESA_FORMAT_ATC_RGBA_EXPLICIT , atc , 4, 4, 1, x128, , , , xyzw, rgb
+MESA_FORMAT_ATC_RGBA_INTERPOLATED , atc , 4, 4, 1, x128, , , , xyzw, rgb
MESA_FORMAT_LAYOUT_ETC2,
MESA_FORMAT_LAYOUT_BPTC,
MESA_FORMAT_LAYOUT_ASTC,
+ MESA_FORMAT_LAYOUT_ATC,
MESA_FORMAT_LAYOUT_OTHER,
};
MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5,
MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5,
MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6,
+
+ /* ATC compressed formats */
+ MESA_FORMAT_ATC_RGB,
+ MESA_FORMAT_ATC_RGBA_EXPLICIT,
+ MESA_FORMAT_ATC_RGBA_INTERPOLATED,
+
MESA_FORMAT_COUNT
} mesa_format;
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
+ case GL_ATC_RGB_AMD:
+ case GL_ATC_RGBA_EXPLICIT_ALPHA_AMD:
+ case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD:
/* generic integer formats */
case GL_RED_INTEGER_EXT:
case GL_GREEN_INTEGER_EXT:
_mesa_has_EXT_texture_compression_bptc(ctx);
case MESA_FORMAT_LAYOUT_ASTC:
return _mesa_has_KHR_texture_compression_astc_ldr(ctx);
+ case MESA_FORMAT_LAYOUT_ATC:
+ return _mesa_has_AMD_compressed_ATC_texture(ctx);
default:
return GL_FALSE;
}
#define GL_SR8_EXT 0x8FBD
#endif
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_ATC_RGB_AMD 0x8C92
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
+#endif
+
/**
* Internal token to represent a GLSL shader program (a collection of
* one or more shaders that get linked together). Note that GLSL
GLboolean OES_texture_view;
GLboolean OES_viewport_array;
/* vendor extensions */
+ GLboolean AMD_compressed_ATC_texture;
GLboolean AMD_framebuffer_multisample_advanced;
GLboolean AMD_depth_clamp_separate;
GLboolean AMD_performance_monitor;
case GL_PALETTE4_R5_G6_B5_OES:
case GL_PALETTE8_RGB8_OES:
case GL_PALETTE8_R5_G6_B5_OES:
+ case GL_ATC_RGB_AMD:
return GL_RGB;
case GL_COMPRESSED_RGBA:
case GL_PALETTE4_RGB5_A1_OES:
case GL_PALETTE8_RGBA8_OES:
case GL_PALETTE8_RGBA4_OES:
+ case GL_ATC_RGBA_EXPLICIT_ALPHA_AMD:
+ case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD:
return GL_RGBA;
case GL_COMPRESSED_ALPHA:
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES;
}
+ /* The GL_AMD_compressed_ATC_texture spec says:
+ *
+ * "New State
+ *
+ * The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
+ * COMPRESSED_TEXTURE_FORMATS include ATC_RGB_AMD,
+ * ATC_RGBA_EXPLICIT_ALPHA_AMD, and ATC_RGBA_INTERPOLATED_ALPHA_AMD."
+ */
+ if (_mesa_has_AMD_compressed_ATC_texture(ctx)) {
+ formats[n++] = GL_ATC_RGB_AMD;
+ formats[n++] = GL_ATC_RGBA_EXPLICIT_ALPHA_AMD;
+ formats[n++] = GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD;
+ }
+
assert(n <= ARRAY_SIZE(discard_formats));
return n;
case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES:
return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6;
+ case GL_ATC_RGB_AMD:
+ return MESA_FORMAT_ATC_RGB;
+ case GL_ATC_RGBA_EXPLICIT_ALPHA_AMD:
+ return MESA_FORMAT_ATC_RGBA_EXPLICIT;
+ case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD:
+ return MESA_FORMAT_ATC_RGBA_INTERPOLATED;
+
default:
return MESA_FORMAT_NONE;
}
return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES;
case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6:
return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES;
+
+ case MESA_FORMAT_ATC_RGB:
+ return GL_ATC_RGB_AMD;
+ case MESA_FORMAT_ATC_RGBA_EXPLICIT:
+ return GL_ATC_RGBA_EXPLICIT_ALPHA_AMD;
+ case MESA_FORMAT_ATC_RGBA_INTERPOLATED:
+ return GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD;
+
default:
_mesa_problem(ctx, "Unexpected mesa texture format in"
" _mesa_compressed_format_to_glenum()");
/**
* Install gl_texture_image in a gl_texture_object according to the target
* and level parameters.
- *
+ *
* \param tObj texture object.
* \param target texture target.
* \param level image level.
case GL_PALETTE8_R5_G6_B5_OES:
case GL_PALETTE8_RGBA4_OES:
case GL_PALETTE8_RGB5_A1_OES:
+ case GL_ATC_RGB_AMD:
+ case GL_ATC_RGBA_EXPLICIT_ALPHA_AMD:
+ case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD:
return true;
default:
return false;
FETCH_NULL(SRGB8_ALPHA8_ASTC_5x5x5),
FETCH_NULL(SRGB8_ALPHA8_ASTC_6x5x5),
FETCH_NULL(SRGB8_ALPHA8_ASTC_6x6x5),
- FETCH_NULL(SRGB8_ALPHA8_ASTC_6x6x6)
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_6x6x6),
+
+ FETCH_NULL(ATC_RGB),
+ FETCH_NULL(ATC_RGBA_EXPLICIT),
+ FETCH_NULL(ATC_RGBA_INTERPOLATED)
};