diff options
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_swtcl.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_tcl.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_tex.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_texstate.c | 22 |
5 files changed, 30 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 723e31401d..5abfc9dac5 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -71,6 +71,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define need_GL_NV_vertex_program #define need_GL_ARB_point_parameters #define need_GL_EXT_framebuffer_object +#define need_GL_OES_EGL_image + #include "main/remap_helper.h" #define DRIVER_DATE "20060602" @@ -137,6 +139,9 @@ static const struct dri_extension card_extensions[] = { "GL_ATI_texture_mirror_once", NULL }, { "GL_MESA_pack_invert", NULL }, { "GL_NV_blend_square", NULL }, +#if FEATURE_OES_EGL_image + { "GL_OES_EGL_image", GL_OES_EGL_image_functions }, +#endif { NULL, NULL } }; diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c index 38864162ce..c56a49d5ad 100644 --- a/src/mesa/drivers/dri/r200/r200_swtcl.c +++ b/src/mesa/drivers/dri/r200/r200_swtcl.c @@ -319,10 +319,9 @@ static INLINE GLuint reduced_hw_prim( struct gl_context *ctx, GLuint prim) { switch (prim) { case GL_POINTS: - return (ctx->Point.PointSprite || - ((ctx->_TriangleCaps & (DD_POINT_SIZE | DD_POINT_ATTEN)) && - !(ctx->_TriangleCaps & (DD_POINT_SMOOTH)))) ? - R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS; + return (((R200_CONTEXT(ctx))->radeon.radeonScreen->drmSupportsPointSprites && + !(ctx->_TriangleCaps & DD_POINT_SMOOTH)) ? + R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS); case GL_LINES: /* fallthrough */ case GL_LINE_LOOP: diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c index 84db7c9d4e..7aed116f0b 100644 --- a/src/mesa/drivers/dri/r200/r200_tcl.c +++ b/src/mesa/drivers/dri/r200/r200_tcl.c @@ -68,9 +68,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define HAVE_ELTS 1 -#define HW_POINTS ((ctx->Point.PointSprite || \ - ((ctx->_TriangleCaps & (DD_POINT_SIZE | DD_POINT_ATTEN)) && \ - !(ctx->_TriangleCaps & (DD_POINT_SMOOTH)))) ? \ +#define HW_POINTS (((R200_CONTEXT(ctx))->radeon.radeonScreen->drmSupportsPointSprites && \ + !(ctx->_TriangleCaps & DD_POINT_SMOOTH)) ? \ R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS) #define HW_LINES R200_VF_PRIM_LINES #define HW_LINE_LOOP 0 diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c index 5207c2901a..064324731b 100644 --- a/src/mesa/drivers/dri/r200/r200_tex.c +++ b/src/mesa/drivers/dri/r200/r200_tex.c @@ -537,6 +537,10 @@ void r200InitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *fu functions->MapTexture = radeonMapTexture; functions->UnmapTexture = radeonUnmapTexture; +#if FEATURE_OES_EGL_image + functions->EGLImageTargetTexture2D = radeon_image_target_texture_2d; +#endif + driInitTextureFormats(); } diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c index 690bec640b..24fb031ecb 100644 --- a/src/mesa/drivers/dri/r200/r200_texstate.c +++ b/src/mesa/drivers/dri/r200/r200_texstate.c @@ -778,6 +778,7 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format radeonTexObjPtr t; uint32_t pitch_val; uint32_t internalFormat, type, format; + gl_format texFormat; type = GL_BGRA; format = GL_UNSIGNED_BYTE; @@ -817,10 +818,6 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format radeon_miptree_unreference(&t->mt); radeon_miptree_unreference(&rImage->mt); - _mesa_init_teximage_fields(radeon->glCtx, target, texImage, - rb->base.Width, rb->base.Height, 1, 0, rb->cpp); - texImage->RowStride = rb->pitch / rb->cpp; - rImage->bo = rb->bo; radeon_bo_ref(rImage->bo); t->bo = rb->bo; @@ -832,22 +829,35 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format pitch_val = rb->pitch; switch (rb->cpp) { case 4: - if (texture_format == __DRI_TEXTURE_FORMAT_RGB) + if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + texFormat = MESA_FORMAT_RGB888; t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format; - else + } + else { + texFormat = MESA_FORMAT_ARGB8888; t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888].format; + } t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888].filter; break; case 3: default: + texFormat = MESA_FORMAT_RGB888; t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format; t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB888].filter; break; case 2: + texFormat = MESA_FORMAT_RGB565; t->pp_txformat = tx_table_le[MESA_FORMAT_RGB565].format; t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB565].filter; break; } + + _mesa_init_teximage_fields(radeon->glCtx, target, texImage, + rb->base.Width, rb->base.Height, 1, 0, + rb->cpp, texFormat); + texImage->RowStride = rb->pitch / rb->cpp; + + t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT) | ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT); t->pp_txformat |= R200_TXFORMAT_NON_POWER2; |