gallium: remove TGSI_OPCODE_ABS
[mesa.git] / src / gallium / drivers / nouveau / codegen / nv50_ir_target.h
index 674bdc6964e65193cc2a321396bb1b69110aa139..eaf50cc19be02889107721b17d7a1feefafa7800 100644 (file)
@@ -59,10 +59,11 @@ struct RelocInfo
 };
 
 struct FixupData {
-   FixupData(bool force, bool flat) :
-      force_persample_interp(force), flatshade(flat) {}
+   FixupData(bool force, bool flat, uint8_t alphatest) :
+      force_persample_interp(force), flatshade(flat), alphatest(alphatest) {}
    bool force_persample_interp;
    bool flatshade;
+   uint8_t alphatest;
 };
 
 struct FixupEntry;
@@ -172,7 +173,11 @@ public:
    // The address chosen is supplied to the relocation routine.
    virtual void getBuiltinCode(const uint32_t **code, uint32_t *size) const = 0;
 
-   virtual void parseDriverInfo(const struct nv50_ir_prog_info *info) { }
+   virtual void parseDriverInfo(const struct nv50_ir_prog_info *info) {
+      threads = info->prop.cp.numThreads;
+      if (threads == 0)
+         threads = info->target >= NVISA_GK104_CHIPSET ? 1024 : 512;
+   }
 
    virtual bool runLegalizePass(Program *, CGStage stage) const = 0;
 
@@ -248,6 +253,7 @@ public:
 
 protected:
    uint32_t chipset;
+   uint32_t threads;
 
    DataFile nativeFileMap[DATA_FILE_COUNT];