diff options
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texstate.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 14 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c index 91fa77a1690..81890a6e126 100644 --- a/src/mesa/drivers/dri/r300/r300_context.c +++ b/src/mesa/drivers/dri/r300/r300_context.c @@ -97,6 +97,7 @@ const struct dri_extension card_extensions[] = { {"GL_ARB_depth_texture", NULL}, {"GL_ARB_fragment_program", NULL}, {"GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}, + {"GL_ARB_half_float_pixel", NULL}, {"GL_ARB_multitexture", NULL}, {"GL_ARB_point_parameters", GL_ARB_point_parameters_functions}, {"GL_ARB_shadow", NULL}, @@ -108,6 +109,7 @@ const struct dri_extension card_extensions[] = { {"GL_ARB_texture_env_crossbar", NULL}, {"GL_ARB_texture_env_dot3", NULL}, {"GL_ARB_texture_mirrored_repeat", NULL}, + {"GL_ARB_texture_rg", NULL}, {"GL_ARB_vertex_program", GL_ARB_vertex_program_functions}, {"GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions}, {"GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions}, diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index 6f489ace7bf..46625cada35 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -107,6 +107,12 @@ static const struct tx_table { _ASSIGN(RGBA_FLOAT16, R300_EASY_TX_FORMAT(Z, Y, X, W, FL_R16G16B16A16)), _ASSIGN(RGB_FLOAT32, 0xffffffff), _ASSIGN(RGB_FLOAT16, 0xffffffff), + _ASSIGN(R8, R300_EASY_TX_FORMAT(ZERO, ZERO, X, ONE, X8)), + _ASSIGN(RG88, R300_EASY_TX_FORMAT(ZERO, Y, X, ONE, Y8X8)), + _ASSIGN(RED_FLOAT16, R300_EASY_TX_FORMAT(ZERO, ZERO, X, ONE, FL_I16)), + _ASSIGN(RG_FLOAT16, R300_EASY_TX_FORMAT(ZERO, X, Y, ONE, FL_I16A16)), + _ASSIGN(RED_FLOAT32, R300_EASY_TX_FORMAT(ZERO, ZERO, X, ONE, FL_I32)), + _ASSIGN(RG_FLOAT32, R300_EASY_TX_FORMAT(ZERO, X, Y, ONE, FL_I32A32)), _ASSIGN(ALPHA_FLOAT32, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, FL_I32)), _ASSIGN(ALPHA_FLOAT16, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, FL_I16)), _ASSIGN(LUMINANCE_FLOAT32, R300_EASY_TX_FORMAT(X, X, X, ONE, FL_I32)), diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index fa16f44c18e..5965be968b3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -497,6 +497,20 @@ const struct gl_texture_format *radeonChooseTextureFormat(GLcontext * ctx, case GL_COMPRESSED_SLUMINANCE_ALPHA: return &_mesa_texformat_sla8; + /* ARB_texture_rg */ + case GL_R8: + return &_mesa_texformat_r8; + case GL_RG8: + return &_mesa_texformat_rg88; + case GL_R16F: + return &_mesa_texformat_red_float16; + case GL_R32F: + return &_mesa_texformat_red_float32; + case GL_RG16F: + return &_mesa_texformat_rg_float16; + case GL_RG32F: + return &_mesa_texformat_rg_float32; + default: _mesa_problem(ctx, "unexpected internalFormat 0x%x in %s", |