summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderimage.c
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2015-08-29 17:03:08 +0300
committerFrancisco Jerez <[email protected]>2015-10-09 17:49:01 +0300
commit7e441bf025cf8c5d088430d546acb4c0ed58d27b (patch)
treee7d53e61107ac19e740f86b0bb79777d0629fcfd /src/mesa/main/shaderimage.c
parent2d97a78b37ddf325d90e056f5eefee0548092530 (diff)
mesa: Get rid of texture-dependent image unit derived state.
The point is to avoid having to re-validate all image units when _NEW_TEXTURE is flagged, which can be expensive if the driver exposes a large number of image units. This has been reported to fix a 36% performance regression in the Synmark2 Multithread benchmark on the i965 driver which exposes 192 image units. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91788 Reported-by: Wendy Wang <[email protected]> Tested-by: Ye Tian <[email protected]> CC: "11.0" <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderimage.c')
-rw-r--r--src/mesa/main/shaderimage.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index 0f0200a5b77..c4ebf4201fb 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -474,17 +474,6 @@ _mesa_is_image_unit_valid(struct gl_context *ctx, struct gl_image_unit *u)
return GL_TRUE;
}
-void
-_mesa_validate_image_units(struct gl_context *ctx)
-{
- unsigned i;
-
- for (i = 0; i < ctx->Const.MaxImageUnits; ++i) {
- struct gl_image_unit *u = &ctx->ImageUnits[i];
- u->_Valid = validate_image_unit(ctx, u);
- }
-}
-
static GLboolean
validate_bind_image_texture(struct gl_context *ctx, GLuint unit,
GLuint texture, GLint level, GLboolean layered,
@@ -568,7 +557,6 @@ _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
u->Access = access;
u->Format = format;
u->_ActualFormat = _mesa_get_shader_image_format(format);
- u->_Valid = _mesa_is_image_unit_valid(ctx, u);
if (u->TexObj && _mesa_tex_target_is_layered(u->TexObj->Target)) {
u->Layered = layered;
@@ -704,7 +692,6 @@ _mesa_BindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
u->Access = GL_READ_WRITE;
u->Format = tex_format;
u->_ActualFormat = _mesa_get_shader_image_format(tex_format);
- u->_Valid = _mesa_is_image_unit_valid(ctx, u);
} else {
/* Unbind the texture from the unit */
_mesa_reference_texobj(&u->TexObj, NULL);
@@ -714,7 +701,6 @@ _mesa_BindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
u->Access = GL_READ_ONLY;
u->Format = GL_R8;
u->_ActualFormat = MESA_FORMAT_R_UNORM8;
- u->_Valid = GL_FALSE;
}
}