Module: Mesa
Branch: master
Commit: 5777e87bed9de5db9ab08a1388265978507bc88e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5777e87bed9de5db9ab08a1388265978507bc88e

Author: Samuel Pitoiset <[email protected]>
Date:   Mon Mar  7 18:26:43 2016 +0100

nvc0/ir: make sure that thread count immediate for BAR fit

The limit of the thread count immediate value is 12 bits.

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
index 7bd7c73..8b9328b 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
@@ -1482,6 +1482,7 @@ CodeEmitterNVC0::emitBAR(const Instruction *i)
    } else {
       ImmediateValue *imm = i->getSrc(1)->asImm();
       assert(imm);
+      assert(imm->reg.data.u32 <= 0xfff);
       code[0] |= imm->reg.data.u32 << 26;
       code[1] |= imm->reg.data.u32 >> 6;
       code[1] |= 0x4000;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to