diff options
author | Brian Paul <brianp@vmware.com> | 2010-02-14 21:54:17 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-02-14 21:58:45 -0700 |
commit | 08cfe3ab421491644cf1bebaf47e8bc897e495c5 (patch) | |
tree | 461da74c09e612d59d55528ef65938a48b62f403 /src | |
parent | f4ded0ea5c156a79a78ea62098fa8f9515adb256 (diff) |
st/mesa: minor assorted clean-ups
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 90bcc85c44..36c0a2b0e1 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -235,8 +235,8 @@ make_fragment_shader_z(struct st_context *st) * vertex position and texcoord (and optionally, color). */ static void * -st_make_passthrough_vertex_shader(struct st_context *st, - GLboolean passColor) +make_passthrough_vertex_shader(struct st_context *st, + GLboolean passColor) { if (!st->drawpix.vert_shaders[passColor]) { struct ureg_program *ureg = @@ -272,8 +272,12 @@ st_make_passthrough_vertex_shader(struct st_context *st, } +/** + * Return a texture internalFormat for drawing/copying an image + * of the given type. + */ static GLenum -_mesa_base_format(GLenum format) +base_format(GLenum format) { switch (format) { case GL_DEPTH_COMPONENT: @@ -308,7 +312,7 @@ make_texture(struct st_context *st, GLenum baseFormat; int ptw, pth; - baseFormat = _mesa_base_format(format); + baseFormat = base_format(format); mformat = st_ChooseTextureFormat(ctx, baseFormat, format, type); assert(mformat); @@ -784,12 +788,12 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, if (format == GL_DEPTH_COMPONENT) { driver_fp = make_fragment_shader_z(st); - driver_vp = st_make_passthrough_vertex_shader(st, GL_TRUE); + driver_vp = make_passthrough_vertex_shader(st, GL_TRUE); color = ctx->Current.RasterColor; } else { driver_fp = combined_drawpix_fragment_program(ctx); - driver_vp = st_make_passthrough_vertex_shader(st, GL_FALSE); + driver_vp = make_passthrough_vertex_shader(st, GL_FALSE); color = NULL; } @@ -968,14 +972,14 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy, rbRead = st_get_color_read_renderbuffer(ctx); color = NULL; driver_fp = combined_drawpix_fragment_program(ctx); - driver_vp = st_make_passthrough_vertex_shader(st, GL_FALSE); + driver_vp = make_passthrough_vertex_shader(st, GL_FALSE); } else { assert(type == GL_DEPTH); rbRead = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer); color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; driver_fp = make_fragment_shader_z(st); - driver_vp = st_make_passthrough_vertex_shader(st, GL_TRUE); + driver_vp = make_passthrough_vertex_shader(st, GL_TRUE); } srcFormat = rbRead->texture->format; |