intel: Remove some dead metaops code.
This commit is contained in:
@@ -705,10 +705,6 @@ void brw_debug_batch(struct intel_context *intel);
|
||||
/*======================================================================
|
||||
* brw_tex.c
|
||||
*/
|
||||
void brwUpdateTextureState( struct intel_context *intel );
|
||||
void brw_FrameBufferTexInit( struct brw_context *brw,
|
||||
struct intel_region *region );
|
||||
void brw_FrameBufferTexDestroy( struct brw_context *brw );
|
||||
void brw_validate_textures( struct brw_context *brw );
|
||||
|
||||
|
||||
|
||||
@@ -39,38 +39,6 @@
|
||||
#include "intel_tex.h"
|
||||
#include "brw_context.h"
|
||||
|
||||
|
||||
void brw_FrameBufferTexInit( struct brw_context *brw,
|
||||
struct intel_region *region )
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
GLcontext *ctx = &intel->ctx;
|
||||
struct gl_texture_object *obj;
|
||||
struct gl_texture_image *img;
|
||||
|
||||
intel->frame_buffer_texobj = obj =
|
||||
ctx->Driver.NewTextureObject( ctx, (GLuint) -1, GL_TEXTURE_2D );
|
||||
|
||||
obj->MinFilter = GL_NEAREST;
|
||||
obj->MagFilter = GL_NEAREST;
|
||||
|
||||
img = ctx->Driver.NewTextureImage( ctx );
|
||||
|
||||
_mesa_init_teximage_fields( ctx, GL_TEXTURE_2D, img,
|
||||
region->pitch, region->height, 1, 0,
|
||||
region->cpp == 4 ? GL_RGBA : GL_RGB );
|
||||
|
||||
_mesa_set_tex_image( obj, GL_TEXTURE_2D, 0, img );
|
||||
}
|
||||
|
||||
void brw_FrameBufferTexDestroy( struct brw_context *brw )
|
||||
{
|
||||
if (brw->intel.frame_buffer_texobj != NULL)
|
||||
brw->intel.ctx.Driver.DeleteTexture( &brw->intel.ctx,
|
||||
brw->intel.frame_buffer_texobj );
|
||||
brw->intel.frame_buffer_texobj = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finalizes all textures, completing any rendering that needs to be done
|
||||
* to prepare them.
|
||||
|
||||
@@ -69,8 +69,6 @@ static void brw_destroy_context( struct intel_context *intel )
|
||||
|
||||
_mesa_free(brw->wm.compile_data);
|
||||
|
||||
brw_FrameBufferTexDestroy( brw );
|
||||
|
||||
for (i = 0; i < brw->state.nr_color_regions; i++)
|
||||
intel_region_release(&brw->state.color_regions[i]);
|
||||
brw->state.nr_color_regions = 0;
|
||||
|
||||
@@ -724,17 +724,8 @@ static void prepare_wm_surfaces(struct brw_context *brw )
|
||||
|
||||
/* _NEW_TEXTURE, BRW_NEW_TEXDATA */
|
||||
if (texUnit->_ReallyEnabled) {
|
||||
if (texUnit->_Current == intel->frame_buffer_texobj) {
|
||||
/* render to texture */
|
||||
dri_bo_unreference(brw->wm.surf_bo[surf]);
|
||||
brw->wm.surf_bo[surf] = brw->wm.surf_bo[0];
|
||||
dri_bo_reference(brw->wm.surf_bo[surf]);
|
||||
brw->wm.nr_surfaces = surf + 1;
|
||||
} else {
|
||||
/* regular texture */
|
||||
brw_update_texture_surface(ctx, i);
|
||||
brw->wm.nr_surfaces = surf + 1;
|
||||
}
|
||||
brw_update_texture_surface(ctx, i);
|
||||
brw->wm.nr_surfaces = surf + 1;
|
||||
} else {
|
||||
dri_bo_unreference(brw->wm.surf_bo[surf]);
|
||||
brw->wm.surf_bo[surf] = NULL;
|
||||
|
||||
@@ -254,9 +254,6 @@ struct intel_context
|
||||
intel_line_func draw_line;
|
||||
intel_tri_func draw_tri;
|
||||
|
||||
/* These refer to the current drawing buffer:
|
||||
*/
|
||||
struct gl_texture_object *frame_buffer_texobj;
|
||||
/**
|
||||
* Set to true if a single constant cliprect should be used in the
|
||||
* batchbuffer. Otherwise, cliprects must be calculated at batchbuffer
|
||||
|
||||
@@ -129,20 +129,6 @@ intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one)
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
GLboolean
|
||||
intel_check_meta_tex_fragment_ops(GLcontext * ctx)
|
||||
{
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
/* Some of _ImageTransferState (scale, bias) could be done with
|
||||
* fragment programs on i915.
|
||||
*/
|
||||
return !(ctx->_ImageTransferState || ctx->Fog.Enabled || /* not done yet */
|
||||
ctx->Texture._EnabledUnits || ctx->FragmentProgram._Enabled);
|
||||
}
|
||||
|
||||
/* The intel_region struct doesn't really do enough to capture the
|
||||
* format of the pixels in the region. For now this code assumes that
|
||||
* the region is a display surface and hence is either ARGB8888 or
|
||||
|
||||
@@ -34,8 +34,6 @@ void intelInitPixelFuncs(struct dd_function_table *functions);
|
||||
GLboolean intel_check_blit_fragment_ops(GLcontext * ctx,
|
||||
GLboolean src_alpha_is_one);
|
||||
|
||||
GLboolean intel_check_meta_tex_fragment_ops(GLcontext * ctx);
|
||||
|
||||
GLboolean intel_check_blit_format(struct intel_region *region,
|
||||
GLenum format, GLenum type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user