};
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;
// 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) {
+ if (info->type == PIPE_SHADER_COMPUTE) {
+ threads = info->prop.cp.numThreads[0] *
+ info->prop.cp.numThreads[1] *
+ info->prop.cp.numThreads[2];
+ if (threads == 0)
+ threads = info->target >= NVISA_GK104_CHIPSET ? 1024 : 512;
+ } else {
+ threads = 32; // doesn't matter, just not too big.
+ }
+ }
virtual bool runLegalizePass(Program *, CGStage stage) const = 0;
protected:
uint32_t chipset;
+ uint32_t threads;
DataFile nativeFileMap[DATA_FILE_COUNT];