Lines Matching refs:target

181       assert(0 && "unexpected query target in st_BeginQuery()");
440 GLenum target)
442 const int which = target - GL_VERTICES_SUBMITTED;
452 * Return pointer to the query object binding point for the given target and
454 * \return NULL if invalid target, else the address of binding point
457 get_query_binding_point(struct gl_context *ctx, GLenum target, GLuint index)
459 switch (target) {
513 return get_pipe_stats_binding_point(ctx, target);
517 target = GL_VERTICES_SUBMITTED + MAX_PIPELINE_STATISTICS - 1;
521 return get_pipe_stats_binding_point(ctx, target);
528 return get_pipe_stats_binding_point(ctx, target);
534 return get_pipe_stats_binding_point(ctx, target);
544 * Create $n query objects and store them in *ids. Make them of type $target
548 create_queries(struct gl_context *ctx, GLenum target, GLsizei n, GLuint *ids,
570 /* Do the equivalent of binding the buffer with a target */
571 q->Target = target;
587 _mesa_CreateQueries(GLenum target, GLsizei n, GLuint *ids)
591 switch (target) {
603 _mesa_error(ctx, GL_INVALID_ENUM, "glCreateQueries(invalid target = %s)",
604 _mesa_enum_to_string(target));
608 create_queries(ctx, target, n, ids, true);
671 query_error_check_index(struct gl_context *ctx, GLenum target, GLuint index)
673 switch (target) {
693 _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
700 _mesa_enum_to_string(target), index, id);
702 if (!query_error_check_index(ctx, target, index))
707 bindpt = get_query_binding_point(ctx, target, index);
709 _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQuery{Indexed}(target)");
716 * progress with the same target, an INVALID_OPERATION error is
721 "glBeginQuery{Indexed}(target=%s is active)",
722 _mesa_enum_to_string(target));
760 * existing query object whose type does not match target; [...]
765 if (q->EverBound && q->Target != target) {
767 "glBeginQuery{Indexed}(target mismatch)");
772 /* This possibly changes the target of a buffer allocated by
776 * "CreateQueries adds a <target>, so strictly speaking the <target>
780 * Updating the target of the query object should be acceptable, so let's
784 q->Target = target;
799 _mesa_EndQueryIndexed(GLenum target, GLuint index)
806 _mesa_enum_to_string(target), index);
808 if (!query_error_check_index(ctx, target, index))
813 bindpt = get_query_binding_point(ctx, target, index);
815 _mesa_error(ctx, GL_INVALID_ENUM, "glEndQuery{Indexed}(target)");
823 if (q && q->Target != target) {
825 "glEndQuery(target=%s with active query of target %s)",
826 _mesa_enum_to_string(target),
844 _mesa_BeginQuery(GLenum target, GLuint id)
846 _mesa_BeginQueryIndexed(target, 0, id);
850 _mesa_EndQuery(GLenum target)
852 _mesa_EndQueryIndexed(target, 0);
856 _mesa_QueryCounter(GLuint id, GLenum target)
863 _mesa_enum_to_string(target));
866 if (target != GL_TIMESTAMP) {
867 _mesa_error(ctx, GL_INVALID_ENUM, "glQueryCounter(target)");
891 "glQueryCounter(id has an invalid target)");
901 /* This possibly changes the target of a buffer allocated by
905 * "CreateQueries adds a <target>, so strictly speaking the <target>
909 * Updating the target of the query object should be acceptable, so let's
913 q->Target = target;
926 _mesa_GetQueryIndexediv(GLenum target, GLuint index, GLenum pname,
934 _mesa_enum_to_string(target),
938 if (!query_error_check_index(ctx, target, index))
964 if (target == GL_TIMESTAMP) {
967 _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryARB(target)");
972 bindpt = get_query_binding_point(ctx, target, index);
974 _mesa_error(ctx, GL_INVALID_ENUM, "glGetQuery{Indexed}iv(target)");
983 switch (target) {
1050 "Unknown target in glGetQueryIndexediv(target = %s)",
1051 _mesa_enum_to_string(target));
1057 *params = (q && q->Target == target) ? q->Id : 0;
1066 _mesa_GetQueryiv(GLenum target, GLenum pname, GLint *params)
1068 _mesa_GetQueryIndexediv(target, 0, pname, params);