static void
nouveauBindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog)
{
+ NVSDBG("target=%s, prog=%p\n", _mesa_lookup_enum_by_nr(target), prog);
}
static struct gl_program *
{
nouveauShader *nvs;
+ NVSDBG("target=%s, id=%d\n", _mesa_lookup_enum_by_nr(target), id);
+
nvs = CALLOC_STRUCT(_nouveauShader);
+ NVSDBG("prog=%p\n", nvs);
switch (target) {
case GL_VERTEX_PROGRAM_ARB:
return _mesa_init_vertex_program(ctx, &nvs->mesa.vp, target, id);
{
nouveauShader *nvs = (nouveauShader *)prog;
+ NVSDBG("prog=%p\n", prog);
+
if (nvs->translated)
FREE(nvs->program);
_mesa_delete_program(ctx, prog);
{
nouveauShader *nvs = (nouveauShader *)prog;
+ NVSDBG("target=%s, prog=%p\n", _mesa_lookup_enum_by_nr(target), prog);
+
if (nvs->translated)
FREE(nvs->program);
nvs->translated = 0;
{
nouveauShader *nvs = (nouveauShader *)prog;
+ NVSDBG("target=%s, prog=%p\n", _mesa_lookup_enum_by_nr(target), prog);
+
return nvs->translated;
}
struct gl_program_parameter_list *plist;
int i;
+ NVSDBG("prog=%p\n", nvs);
+
/* Translate to HW format now if necessary */
if (!nvs->translated) {
/* Mesa ASM shader -> nouveauShader */
#include "mtypes.h"
#include "bufferobj.h"
+#define NVSDBG(fmt, args...) do { \
+ if (NOUVEAU_DEBUG & DEBUG_SHADERS) { \
+ fprintf(stderr, "%s: "fmt, __func__, ##args); \
+ } \
+} while(0)
+
typedef struct _nvsFunc nvsFunc;
#define NVS_MAX_TEMPS 32