mesa: refactor shader api / object code
Remove the unneeded ctx->Driver hooks for shader-related functions. Move state and API-related things into main/.
This commit is contained in:
@@ -36,11 +36,11 @@
|
||||
#include "bufferobj.h"
|
||||
#include "shared.h"
|
||||
#include "shader/program.h"
|
||||
#include "shader/shader_api.h"
|
||||
#include "dlist.h"
|
||||
#if FEATURE_ATI_fragment_shader
|
||||
#include "shader/atifragshader.h"
|
||||
#endif
|
||||
#include "shaderobj.h"
|
||||
#if FEATURE_ARB_sync
|
||||
#include "syncobj.h"
|
||||
#endif
|
||||
@@ -228,12 +228,12 @@ delete_shader_cb(GLuint id, void *data, void *userData)
|
||||
GLcontext *ctx = (GLcontext *) userData;
|
||||
struct gl_shader *sh = (struct gl_shader *) data;
|
||||
if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER) {
|
||||
_mesa_free_shader(ctx, sh);
|
||||
ctx->Driver.DeleteShader(ctx, sh);
|
||||
}
|
||||
else {
|
||||
struct gl_shader_program *shProg = (struct gl_shader_program *) data;
|
||||
ASSERT(shProg->Type == GL_SHADER_PROGRAM_MESA);
|
||||
_mesa_free_shader_program(ctx, shProg);
|
||||
ctx->Driver.DeleteShaderProgram(ctx, shProg);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user