diff options
Diffstat (limited to 'mesalib/src/mesa/swrast/s_context.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_context.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c index 11e906436..70bbb83dc 100644 --- a/mesalib/src/mesa/swrast/s_context.c +++ b/mesalib/src/mesa/swrast/s_context.c @@ -17,13 +17,13 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell <keith@tungstengraphics.com> - * Brian Paul + * Keith Whitwell <keith@tungstengraphics.com> Brian Paul */ #include "main/imports.h" @@ -459,7 +459,7 @@ _swrast_invalidate_state( struct gl_context *ctx, GLbitfield new_state ) swrast->BlendFunc = _swrast_validate_blend_func; if (new_state & _SWRAST_NEW_TEXTURE_SAMPLE_FUNC) - for (i = 0 ; i < ctx->Const.MaxTextureImageUnits ; i++) + for (i = 0 ; i < ARRAY_SIZE(swrast->TextureSample); i++) swrast->TextureSample[i] = NULL; } @@ -473,7 +473,7 @@ _swrast_update_texture_samplers(struct gl_context *ctx) if (!swrast) return; /* pipe hack */ - for (u = 0; u < ctx->Const.MaxTextureImageUnits; u++) { + for (u = 0; u < ARRAY_SIZE(swrast->TextureSample); u++) { struct gl_texture_object *tObj = ctx->Texture.Unit[u]._Current; /* Note: If tObj is NULL, the sample function will be a simple * function that just returns opaque black (0,0,0,1). @@ -766,7 +766,7 @@ _swrast_CreateContext( struct gl_context *ctx ) swrast->Driver.SpanRenderStart = _swrast_span_render_start; swrast->Driver.SpanRenderFinish = _swrast_span_render_finish; - for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) + for (i = 0; i < ARRAY_SIZE(swrast->TextureSample); i++) swrast->TextureSample[i] = NULL; /* SpanArrays is global and shared by all SWspan instances. However, when |