diff options
5 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.h b/src/gallium/drivers/nouveau/codegen/nv50_ir.h index 56b01158a4a..c57729e6343 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.h +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.h @@ -362,6 +362,7 @@ enum SVSemantic SV_CLIP_DISTANCE, SV_SAMPLE_INDEX, SV_SAMPLE_POS, + SV_SAMPLE_MASK, SV_TESS_FACTOR, SV_TESS_COORD, SV_TID, diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 0ec0b9a179d..2c302a7fe1a 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -348,6 +348,7 @@ static nv50_ir::SVSemantic translateSysVal(uint sysval) case TGSI_SEMANTIC_THREAD_ID: return nv50_ir::SV_TID; case TGSI_SEMANTIC_SAMPLEID: return nv50_ir::SV_SAMPLE_INDEX; case TGSI_SEMANTIC_SAMPLEPOS: return nv50_ir::SV_SAMPLE_POS; + case TGSI_SEMANTIC_SAMPLEMASK: return nv50_ir::SV_SAMPLE_MASK; default: assert(0); return nv50_ir::SV_CLOCK; diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index ebdeee4050d..c7e9063fe65 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -1447,6 +1447,10 @@ NVC0LoweringPass::handleRDSV(Instruction *i) off); break; } + case SV_SAMPLE_MASK: + ld = bld.mkOp1(OP_PIXLD, TYPE_U32, i->getDef(0), bld.mkImm(0)); + ld->subOp = NV50_IR_SUBOP_PIXLD_COVMASK; + break; default: if (prog->getType() == Program::TYPE_TESSELLATION_EVAL) vtx = bld.mkOp1v(OP_PFETCH, TYPE_U32, bld.getSSA(), bld.mkImm(0)); diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp index e74b25f59c2..42013e51bfd 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp @@ -255,6 +255,7 @@ static const char *SemanticStr[SV_LAST + 1] = "CLIP_DISTANCE", "SAMPLE_INDEX", "SAMPLE_POS", + "SAMPLE_MASK", "TESS_FACTOR", "TESS_COORD", "TID", diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp index 95ed849561c..c747f3e17cb 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp @@ -284,6 +284,7 @@ TargetNVC0::getSVAddress(DataFile shaderFile, const Symbol *sym) const case SV_GRIDID: return kepler ? 0x18 : ~0; case SV_SAMPLE_INDEX: return 0; case SV_SAMPLE_POS: return 0; + case SV_SAMPLE_MASK: return 0; default: return 0xffffffff; } |