Files
MobileGL/MobileGL/MG_Impl/GLImpl/Program/GL_ProgramPipeline.h
T
BZLZHH 300b458132 [Feat] (MG_State, MG_Impl): give program pipelines their object and their state
Every program pipeline entry point was an export stub, and the stub macro's
`return (type)1` made glIsProgramPipeline answer GL_TRUE for anything - including
the names glGenProgramPipelines had never written. All four
direct_state_access.program_pipelines cases failed.

ProgramPipelineObject holds what GL 4.6 core 7.4 says a pipeline is: a program
reference per shader stage, the active program glProgramUniform* addresses, a
validate status and an info log. Its validate status starts false, unlike
ProgramObject's, because a pipeline that has never been validated must report
GL_VALIDATE_STATUS as 0.

The name rules follow the shape queries and transform feedbacks already use, and
which the CTS checks first: glGenProgramPipelines only RESERVES a name and
glIsProgramPipeline answers GL_FALSE for it; the object appears on first bind, or
immediately from glCreateProgramPipelines. Map membership is object existence -
a pipeline, unlike a transform feedback, has no stateful default object zero, so
no everBound flag is needed.

glGet(GL_PROGRAM_PIPELINE_BINDING) reports the real binding now instead of a
hardcoded zero whose comment said the entry points were stubbed.

This is the state half only. program_pipelines_functional needs mixed-stage
rendering - a vertex-only and a fragment-only program drawn together - and stays
failing; glCreateShaderProgramv is deliberately left stubbed until that lands, so
nothing can half-work in between.

Takes program_pipelines_creation, _defaults and _errors from failing to passing
on both backends.
2026-08-05 05:43:13 -04:00

24 lines
1.1 KiB
C++

// MobileGL - MobileGL/MG_Impl/GLImpl/Program/GL_ProgramPipeline.h
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v3.0:
// https://www.gnu.org/licenses/gpl-3.0.txt
// https://www.gnu.org/licenses/lgpl-3.0.txt
// SPDX-License-Identifier: LGPL-3.0-only
// End of Source File Header
#pragma once
#include <Includes.h>
namespace MobileGL::MG_Impl::GLImpl {
void GenProgramPipelines(GLsizei n, GLuint* pipelines);
void CreateProgramPipelines(GLsizei n, GLuint* pipelines);
void DeleteProgramPipelines(GLsizei n, const GLuint* pipelines);
void BindProgramPipeline(GLuint pipeline);
GLboolean IsProgramPipeline(GLuint pipeline);
void GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint* params);
void GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
void UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
void ActiveShaderProgram(GLuint pipeline, GLuint program);
void ValidateProgramPipeline(GLuint pipeline);
} // namespace MobileGL::MG_Impl::GLImpl