Lines Matching refs:ctx
47 GET_CURRENT_CONTEXT(ctx);
50 _mesa_debug(ctx, "glClearDepth(%f)\n", depth);
52 ctx->PopAttribState |= GL_DEPTH_BUFFER_BIT;
53 ctx->Depth.Clear = CLAMP( depth, 0.0, 1.0 );
65 depth_func(struct gl_context *ctx, GLenum func, bool no_error)
67 if (ctx->Depth.Func == func)
82 _mesa_error(ctx, GL_INVALID_ENUM, "glDepth.Func");
87 FLUSH_VERTICES(ctx, 0, GL_DEPTH_BUFFER_BIT);
88 ctx->NewDriverState |= ST_NEW_DSA;
89 ctx->Depth.Func = func;
90 _mesa_update_allow_draw_out_of_order(ctx);
97 GET_CURRENT_CONTEXT(ctx);
98 depth_func(ctx, func, true);
105 GET_CURRENT_CONTEXT(ctx);
108 _mesa_debug(ctx, "glDepthFunc %s\n", _mesa_enum_to_string(func));
110 depth_func(ctx, func, false);
118 GET_CURRENT_CONTEXT(ctx);
121 _mesa_debug(ctx, "glDepthMask %d\n", flag);
127 if (ctx->Depth.Mask == flag)
130 FLUSH_VERTICES(ctx, 0, GL_DEPTH_BUFFER_BIT);
131 ctx->NewDriverState |= ST_NEW_DSA;
132 ctx->Depth.Mask = flag;
133 _mesa_update_allow_draw_out_of_order(ctx);
144 GET_CURRENT_CONTEXT(ctx);
147 _mesa_debug(ctx, "glDepthBounds(%f, %f)\n", zmin, zmax);
150 _mesa_error(ctx, GL_INVALID_VALUE, "glDepthBoundsEXT(zmin > zmax)");
157 if (ctx->Depth.BoundsMin == zmin && ctx->Depth.BoundsMax == zmax)
160 FLUSH_VERTICES(ctx, 0, GL_DEPTH_BUFFER_BIT);
161 ctx->NewDriverState |= ST_NEW_DSA;
162 ctx->Depth.BoundsMin = zmin;
163 ctx->Depth.BoundsMax = zmax;
176 _mesa_init_depth(struct gl_context *ctx)
178 ctx->Depth.Test = GL_FALSE;
179 ctx->Depth.Clear = 1.0;
180 ctx->Depth.Func = GL_LESS;
181 ctx->Depth.Mask = GL_TRUE;