case PIPE_SHADER_FRAGMENT:
ti->input_file = NV_FILE_MEM_V;
ti->output_file = NV_FILE_GPR;
+
+ if (ti->scan.writes_z)
+ prog->flags[0] = 0x11; /* ? */
+ else
+ if (!ti->global_stores)
+ prog->fp.early_z = 1;
+
ret = nvc0_fp_gen_header(prog, ti);
break;
default:
uint32_t hdr[20];
- uint32_t flags[2]; /* FP_ZORDER */
+ uint32_t flags[2];
struct {
uint8_t edgeflag;
uint8_t num_ucps;
} vp;
+ struct {
+ uint8_t early_z;
+ } fp;
void *relocs;
unsigned num_relocs;
boolean indirect_inputs;
boolean indirect_outputs;
boolean require_stores;
+ boolean global_stores;
uint32_t *immd32;
ubyte *immd32_ty;
unsigned immd32_nr;
return;
BEGIN_RING(chan, RING_3D(EARLY_FRAGMENT_TESTS), 1);
- OUT_RING (chan, 0);
+ OUT_RING (chan, fp->fp.early_z);
BEGIN_RING(chan, RING_3D(SP_SELECT(5)), 2);
OUT_RING (chan, 0x51);
OUT_RING (chan, fp->code_base);