/*
- * Copyright 2010 Chrsitoph Bumiller
+ * Copyright 2010 Christoph Bumiller
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* SOFTWARE.
*/
-/* #define NV50_PROGRAM_DEBUG */
-
#include "nv50_program.h"
#include "nv50_pc.h"
#include "nv50_context.h"
#include "tgsi/tgsi_util.h"
#include "tgsi/tgsi_dump.h"
+#include "codegen/nv50_ir_driver.h"
+
static INLINE unsigned
bitcount4(const uint32_t val)
{
}
}
+ p->vp.clpd = p->max_out;
+ p->max_out += p->vp.clpd_nr;
+
for (i = 0; i < TGSI_SEMANTIC_COUNT; ++i) {
switch (ti->sysval_map[i]) {
case 2:
++nintp;
}
- p->fp.colors = (1 << 24) | 4; /* CLAMP, FFC0_ID = 4 */
+ p->fp.colors = 4 << NV50_3D_MAP_SEMANTIC_0_FFC0_ID__SHIFT; /* after HPOS */
for (i = 0; i < p->in_nr; ++i) {
int j = p->in[i].id;
tgsi_scan_shader(p->pipe.tokens, &ti->scan);
-#ifdef NV50_PROGRAM_DEBUG
+#if NV50_DEBUG & NV50_DEBUG_SHADER
tgsi_dump(p->pipe.tokens, 0);
#endif
return ret;
}
+/* Temporary, need a reference to nv50_ir_generate_code in libnv50 or
+ * it "gets disappeared" and cannot be used in libnvc0 ...
+ */
+boolean
+nv50_program_translate_new(struct nv50_program *p)
+{
+ struct nv50_ir_prog_info info;
+
+ return nv50_ir_generate_code(&info);
+}
+
boolean
nv50_program_translate(struct nv50_program *p)
{