mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
nouveau: NVSDBG macro
This commit is contained in:
parent
61821a41c0
commit
9622a634f6
5 changed files with 24 additions and 0 deletions
|
|
@ -48,6 +48,7 @@
|
|||
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 *
|
||||
|
|
@ -55,7 +56,10 @@ nouveauNewProgram(GLcontext *ctx, GLenum target, GLuint id)
|
|||
{
|
||||
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);
|
||||
|
|
@ -75,6 +79,8 @@ nouveauDeleteProgram(GLcontext *ctx, struct gl_program *prog)
|
|||
{
|
||||
nouveauShader *nvs = (nouveauShader *)prog;
|
||||
|
||||
NVSDBG("prog=%p\n", prog);
|
||||
|
||||
if (nvs->translated)
|
||||
FREE(nvs->program);
|
||||
_mesa_delete_program(ctx, prog);
|
||||
|
|
@ -86,6 +92,8 @@ nouveauProgramStringNotify(GLcontext *ctx, GLenum target,
|
|||
{
|
||||
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;
|
||||
|
|
@ -98,6 +106,8 @@ nouveauIsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog)
|
|||
{
|
||||
nouveauShader *nvs = (nouveauShader *)prog;
|
||||
|
||||
NVSDBG("target=%s, prog=%p\n", _mesa_lookup_enum_by_nr(target), prog);
|
||||
|
||||
return nvs->translated;
|
||||
}
|
||||
|
||||
|
|
@ -108,6 +118,8 @@ nvsUpdateShader(GLcontext *ctx, nouveauShader *nvs)
|
|||
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 */
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
#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
|
||||
|
|
|
|||
|
|
@ -974,6 +974,8 @@ nouveau_shader_pass0(GLcontext *ctx, nouveauShader *nvs)
|
|||
struct pass0_rec *rec;
|
||||
int ret = GL_FALSE;
|
||||
|
||||
NVSDBG("start: nvs=%p\n", nvs);
|
||||
|
||||
rec = CALLOC_STRUCT(pass0_rec);
|
||||
if (!rec)
|
||||
return GL_FALSE;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@
|
|||
#include "macros.h"
|
||||
#include "enums.h"
|
||||
|
||||
#include "nouveau_context.h"
|
||||
#include "nouveau_shader.h"
|
||||
|
||||
GLboolean
|
||||
nouveau_shader_pass1(nvsPtr nvs)
|
||||
{
|
||||
NVSDBG("start: nvs=%p\n", nvs);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,6 +209,8 @@ nouveau_shader_pass2(nvsPtr nvs)
|
|||
struct pass2_rec *rec;
|
||||
int i;
|
||||
|
||||
NVSDBG("start: nvs=%p\n", nvs);
|
||||
|
||||
rec = calloc(1, sizeof(struct pass2_rec));
|
||||
for (i=0; i<NVS_MAX_TEMPS; i++)
|
||||
rec->temps[i] = -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue