add error checking to the GL_ATI_FRAGMENT_SHADER entrypoints. Fix bug with scope of ati fragment shader constants. Fix issues with specifying color/alpha instructions not pair-wise. Change internal representation of the shader (to better fit how the extension works, should make driver implementations simpler, and saves some memory). (still doesn't work correctly with doom3 and swrast, but not worse than before)

This commit is contained in:
Roland Scheidegger
2005-09-02 01:11:53 +00:00
parent b252e0f47f
commit f519a770d0
5 changed files with 400 additions and 100 deletions

View File

@@ -40,6 +40,7 @@
#include "nvfragprog.h"
#include "nvvertparse.h"
#include "nvvertprog.h"
#include "atifragshader.h"
/**********************************************************************/
@@ -324,8 +325,13 @@ _mesa_delete_program(GLcontext *ctx, struct program *prog)
}
else if (prog->Target == GL_FRAGMENT_SHADER_ATI) {
struct ati_fragment_shader *atifs = (struct ati_fragment_shader *)prog;
if (atifs->Instructions)
_mesa_free(atifs->Instructions);
GLuint i;
for (i = 0; i < MAX_NUM_PASSES_ATI; i++) {
if (atifs->Instructions[i])
_mesa_free(atifs->Instructions[i]);
if (atifs->SetupInst[i])
_mesa_free(atifs->SetupInst[i]);
}
}
_mesa_free(prog);