mesa: Remove ad-hoc arrays of gl_shader_program.
Now that we have a ctx->Shader.CurrentProgram array, we can just use it directly. Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -1874,13 +1874,9 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (ctx->Shader.Flags & GLSL_LOG) {
|
if (ctx->Shader.Flags & GLSL_LOG) {
|
||||||
struct gl_shader_program *shProg[MESA_SHADER_STAGES];
|
struct gl_shader_program **shProg = ctx->Shader.CurrentProgram;
|
||||||
gl_shader_stage i;
|
gl_shader_stage i;
|
||||||
|
|
||||||
shProg[MESA_SHADER_VERTEX] = ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
|
|
||||||
shProg[MESA_SHADER_GEOMETRY] = ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
|
|
||||||
shProg[MESA_SHADER_FRAGMENT] = ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT];
|
|
||||||
|
|
||||||
for (i = 0; i < MESA_SHADER_STAGES; i++) {
|
for (i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||||
if (shProg[i] == NULL || shProg[i]->_Used
|
if (shProg[i] == NULL || shProg[i]->_Used
|
||||||
|| shProg[i]->_LinkedShaders[i] == NULL)
|
|| shProg[i]->_LinkedShaders[i] == NULL)
|
||||||
|
@@ -131,11 +131,7 @@ setup_index_buffer(struct st_context *st,
|
|||||||
static void
|
static void
|
||||||
check_uniforms(struct gl_context *ctx)
|
check_uniforms(struct gl_context *ctx)
|
||||||
{
|
{
|
||||||
struct gl_shader_program *shProg[3] = {
|
struct gl_shader_program **shProg = ctx->Shader.CurrentProgram;
|
||||||
ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX],
|
|
||||||
ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY],
|
|
||||||
ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT],
|
|
||||||
};
|
|
||||||
unsigned j;
|
unsigned j;
|
||||||
|
|
||||||
for (j = 0; j < 3; j++) {
|
for (j = 0; j < 3; j++) {
|
||||||
|
@@ -1195,11 +1195,7 @@ st_get_gp_variant(struct st_context *st,
|
|||||||
void
|
void
|
||||||
st_print_shaders(struct gl_context *ctx)
|
st_print_shaders(struct gl_context *ctx)
|
||||||
{
|
{
|
||||||
struct gl_shader_program *shProg[3] = {
|
struct gl_shader_program **shProg = ctx->Shader.CurrentProgram;
|
||||||
ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX],
|
|
||||||
ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY],
|
|
||||||
ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT],
|
|
||||||
};
|
|
||||||
unsigned j;
|
unsigned j;
|
||||||
|
|
||||||
for (j = 0; j < 3; j++) {
|
for (j = 0; j < 3; j++) {
|
||||||
|
Reference in New Issue
Block a user