Re: [Mesa-dev] [PATCH] nv50/ir: remove DUMMY edge type

2019-10-14 Thread Ilia Mirkin
Oh. Probably. Let me have another look then.

On Mon, Oct 14, 2019 at 5:27 PM Karol Herbst  wrote:
>
> isn't that what "UNKNOWN" is for?
>
> On Mon, Oct 14, 2019 at 11:16 PM Ilia Mirkin  wrote:
> >
> > The idea was that this type would be used when you're not sure, and
> > then run the classifier afterwards. Otherwise the classifier doesn't
> > know which edges to classify...
> >
> > On Mon, Oct 14, 2019 at 5:10 PM Karol Herbst  wrote:
> > >
> > > it was never used
> > >
> > > Signed-off-by: Karol Herbst 
> > > ---
> > >  src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp| 3 ---
> > >  src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp | 8 +---
> > >  src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h   | 1 -
> > >  src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp| 2 --
> > >  4 files changed, 1 insertion(+), 13 deletions(-)
> > >
> > > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp 
> > > b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> > > index 9f0e0733326..76fee8c791e 100644
> > > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> > > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> > > @@ -536,9 +536,6 @@ Function::printCFGraph(const char *filePath)
> > >   case Graph::Edge::BACK:
> > >  fprintf(out, "\t%i -> %i;\n", idA, idB);
> > >  break;
> > > - case Graph::Edge::DUMMY:
> > > -fprintf(out, "\t%i -> %i [style=dotted];\n", idA, idB);
> > > -break;
> > >   default:
> > >  assert(0);
> > >  break;
> > > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp 
> > > b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> > > index b1076cf4129..e9a9981746a 100644
> > > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> > > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> > > @@ -77,7 +77,6 @@ const char *Graph::Edge::typeStr() const
> > > case FORWARD: return "forward";
> > > case BACK:return "back";
> > > case CROSS:   return "cross";
> > > -   case DUMMY:   return "dummy";
> > > case UNKNOWN:
> > > default:
> > >return "unk";
> > > @@ -184,7 +183,7 @@ Graph::Node::reachableBy(const Node *node, const Node 
> > > *term) const
> > >   continue;
> > >
> > >for (EdgeIterator ei = pos->outgoing(); !ei.end(); ei.next()) {
> > > - if (ei.getType() == Edge::BACK || ei.getType() == Edge::DUMMY)
> > > + if (ei.getType() == Edge::BACK)
> > >  continue;
> > >   if (ei.getNode()->visit(seq))
> > >  stack.push(ei.getNode());
> > > @@ -301,7 +300,6 @@ private:
> > >  switch (ei.getType()) {
> > >  case Graph::Edge::TREE:
> > >  case Graph::Edge::FORWARD:
> > > -case Graph::Edge::DUMMY:
> > > if (++(ei.getNode()->tag) == 
> > > ei.getNode()->incidentCountFwd())
> > >bb.push(ei.getNode());
> > > break;
> > > @@ -371,8 +369,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
> > >
> > > for (edge = curr->out; edge; edge = edge->next[0]) {
> > >node = edge->target;
> > > -  if (edge->type == Edge::DUMMY)
> > > - continue;
> > >
> > >if (node->getSequence() == 0) {
> > >   edge->type = Edge::TREE;
> > > @@ -387,8 +383,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
> > >
> > > for (edge = curr->in; edge; edge = edge->next[1]) {
> > >node = edge->origin;
> > > -  if (edge->type == Edge::DUMMY)
> > > - continue;
> > >
> > >if (node->getSequence() == 0) {
> > >   edge->type = Edge::TREE;
> > > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h 
> > > b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> > > index 115f20e5e99..fc85e78a50c 100644
> > > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> > > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> > > @@ -47,7 +47,6 @@ public:
> > >   FORWARD,
> > >   BACK,
> > >   CROSS, // e.g. loop break
> > > - DUMMY
> > >};
> > >
> > >Edge(Node *dst, Node *src, Type kind);
> > > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp 
> > > b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> > > index f25bce00884..6df2664da22 100644
> > > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> > > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> > > @@ -624,8 +624,6 @@ 
> > > RegAlloc::BuildIntervalsPass::collectLiveValues(BasicBlock *bb)
> > >// trickery to save a loop of OR'ing liveSets
> > >// aliasing works fine with BitSet::setOr
> > >for (Graph::EdgeIterator ei = bb->cfg.outgoing(); !ei.end(); 
> > > ei.next()) {
> > > - if (ei.getType() == Graph::Edge::DUMMY)
> > > -continue;
> > >   if (bbA) {
> > >  bb->liveSet.setOr(>liveSet, >liveSet);
> > 

Re: [Mesa-dev] [PATCH] nv50/ir: remove DUMMY edge type

2019-10-14 Thread Karol Herbst
isn't that what "UNKNOWN" is for?

On Mon, Oct 14, 2019 at 11:16 PM Ilia Mirkin  wrote:
>
> The idea was that this type would be used when you're not sure, and
> then run the classifier afterwards. Otherwise the classifier doesn't
> know which edges to classify...
>
> On Mon, Oct 14, 2019 at 5:10 PM Karol Herbst  wrote:
> >
> > it was never used
> >
> > Signed-off-by: Karol Herbst 
> > ---
> >  src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp| 3 ---
> >  src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp | 8 +---
> >  src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h   | 1 -
> >  src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp| 2 --
> >  4 files changed, 1 insertion(+), 13 deletions(-)
> >
> > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp 
> > b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> > index 9f0e0733326..76fee8c791e 100644
> > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> > @@ -536,9 +536,6 @@ Function::printCFGraph(const char *filePath)
> >   case Graph::Edge::BACK:
> >  fprintf(out, "\t%i -> %i;\n", idA, idB);
> >  break;
> > - case Graph::Edge::DUMMY:
> > -fprintf(out, "\t%i -> %i [style=dotted];\n", idA, idB);
> > -break;
> >   default:
> >  assert(0);
> >  break;
> > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp 
> > b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> > index b1076cf4129..e9a9981746a 100644
> > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> > @@ -77,7 +77,6 @@ const char *Graph::Edge::typeStr() const
> > case FORWARD: return "forward";
> > case BACK:return "back";
> > case CROSS:   return "cross";
> > -   case DUMMY:   return "dummy";
> > case UNKNOWN:
> > default:
> >return "unk";
> > @@ -184,7 +183,7 @@ Graph::Node::reachableBy(const Node *node, const Node 
> > *term) const
> >   continue;
> >
> >for (EdgeIterator ei = pos->outgoing(); !ei.end(); ei.next()) {
> > - if (ei.getType() == Edge::BACK || ei.getType() == Edge::DUMMY)
> > + if (ei.getType() == Edge::BACK)
> >  continue;
> >   if (ei.getNode()->visit(seq))
> >  stack.push(ei.getNode());
> > @@ -301,7 +300,6 @@ private:
> >  switch (ei.getType()) {
> >  case Graph::Edge::TREE:
> >  case Graph::Edge::FORWARD:
> > -case Graph::Edge::DUMMY:
> > if (++(ei.getNode()->tag) == 
> > ei.getNode()->incidentCountFwd())
> >bb.push(ei.getNode());
> > break;
> > @@ -371,8 +369,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
> >
> > for (edge = curr->out; edge; edge = edge->next[0]) {
> >node = edge->target;
> > -  if (edge->type == Edge::DUMMY)
> > - continue;
> >
> >if (node->getSequence() == 0) {
> >   edge->type = Edge::TREE;
> > @@ -387,8 +383,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
> >
> > for (edge = curr->in; edge; edge = edge->next[1]) {
> >node = edge->origin;
> > -  if (edge->type == Edge::DUMMY)
> > - continue;
> >
> >if (node->getSequence() == 0) {
> >   edge->type = Edge::TREE;
> > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h 
> > b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> > index 115f20e5e99..fc85e78a50c 100644
> > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> > @@ -47,7 +47,6 @@ public:
> >   FORWARD,
> >   BACK,
> >   CROSS, // e.g. loop break
> > - DUMMY
> >};
> >
> >Edge(Node *dst, Node *src, Type kind);
> > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp 
> > b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> > index f25bce00884..6df2664da22 100644
> > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> > @@ -624,8 +624,6 @@ 
> > RegAlloc::BuildIntervalsPass::collectLiveValues(BasicBlock *bb)
> >// trickery to save a loop of OR'ing liveSets
> >// aliasing works fine with BitSet::setOr
> >for (Graph::EdgeIterator ei = bb->cfg.outgoing(); !ei.end(); 
> > ei.next()) {
> > - if (ei.getType() == Graph::Edge::DUMMY)
> > -continue;
> >   if (bbA) {
> >  bb->liveSet.setOr(>liveSet, >liveSet);
> >  bbA = bb;
> > --
> > 2.21.0
> >
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH] nv50/ir: remove DUMMY edge type

2019-10-14 Thread Ilia Mirkin
The idea was that this type would be used when you're not sure, and
then run the classifier afterwards. Otherwise the classifier doesn't
know which edges to classify...

On Mon, Oct 14, 2019 at 5:10 PM Karol Herbst  wrote:
>
> it was never used
>
> Signed-off-by: Karol Herbst 
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp| 3 ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp | 8 +---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h   | 1 -
>  src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp| 2 --
>  4 files changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp 
> b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> index 9f0e0733326..76fee8c791e 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
> @@ -536,9 +536,6 @@ Function::printCFGraph(const char *filePath)
>   case Graph::Edge::BACK:
>  fprintf(out, "\t%i -> %i;\n", idA, idB);
>  break;
> - case Graph::Edge::DUMMY:
> -fprintf(out, "\t%i -> %i [style=dotted];\n", idA, idB);
> -break;
>   default:
>  assert(0);
>  break;
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp 
> b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> index b1076cf4129..e9a9981746a 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
> @@ -77,7 +77,6 @@ const char *Graph::Edge::typeStr() const
> case FORWARD: return "forward";
> case BACK:return "back";
> case CROSS:   return "cross";
> -   case DUMMY:   return "dummy";
> case UNKNOWN:
> default:
>return "unk";
> @@ -184,7 +183,7 @@ Graph::Node::reachableBy(const Node *node, const Node 
> *term) const
>   continue;
>
>for (EdgeIterator ei = pos->outgoing(); !ei.end(); ei.next()) {
> - if (ei.getType() == Edge::BACK || ei.getType() == Edge::DUMMY)
> + if (ei.getType() == Edge::BACK)
>  continue;
>   if (ei.getNode()->visit(seq))
>  stack.push(ei.getNode());
> @@ -301,7 +300,6 @@ private:
>  switch (ei.getType()) {
>  case Graph::Edge::TREE:
>  case Graph::Edge::FORWARD:
> -case Graph::Edge::DUMMY:
> if (++(ei.getNode()->tag) == ei.getNode()->incidentCountFwd())
>bb.push(ei.getNode());
> break;
> @@ -371,8 +369,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
>
> for (edge = curr->out; edge; edge = edge->next[0]) {
>node = edge->target;
> -  if (edge->type == Edge::DUMMY)
> - continue;
>
>if (node->getSequence() == 0) {
>   edge->type = Edge::TREE;
> @@ -387,8 +383,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
>
> for (edge = curr->in; edge; edge = edge->next[1]) {
>node = edge->origin;
> -  if (edge->type == Edge::DUMMY)
> - continue;
>
>if (node->getSequence() == 0) {
>   edge->type = Edge::TREE;
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h 
> b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> index 115f20e5e99..fc85e78a50c 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
> @@ -47,7 +47,6 @@ public:
>   FORWARD,
>   BACK,
>   CROSS, // e.g. loop break
> - DUMMY
>};
>
>Edge(Node *dst, Node *src, Type kind);
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp 
> b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> index f25bce00884..6df2664da22 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> @@ -624,8 +624,6 @@ 
> RegAlloc::BuildIntervalsPass::collectLiveValues(BasicBlock *bb)
>// trickery to save a loop of OR'ing liveSets
>// aliasing works fine with BitSet::setOr
>for (Graph::EdgeIterator ei = bb->cfg.outgoing(); !ei.end(); 
> ei.next()) {
> - if (ei.getType() == Graph::Edge::DUMMY)
> -continue;
>   if (bbA) {
>  bb->liveSet.setOr(>liveSet, >liveSet);
>  bbA = bb;
> --
> 2.21.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] Anyone interested in CoC training courtesy of X.Org?

2019-10-14 Thread Lyude Paul
Hi! This year we decided to start putting members of the CoC teams for Xorg
and XDC through code of conduct training, paid for by the X.Org foundation and
run by Otter Tech:

https://otter.technology/code-of-conduct-training/

The training goes over practicing taking incident reports, following up with
reporters, discussion on issues such as microaggressions and personal
conflictsl, and frameworks for evaluating responses to reports.

Having gone through the training myself, I can definitely I learned quite a
bit from it and would highly recommend this to others who are planning on
moderating communities. So since we have the resources to put more Xorg
members through training we are considering the idea of sponsoring other Xorg
members to go through this training as well, since this seemed to garner a
decent amount of interest during XDC. So, I'm going around and poking a few
different projects to figure out who all would be interested in such training.
If there's any takers, or anyone has any questions, feel free to respond and
let us know! 
-- 
Cheers,
Lyude Paul

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] nv50/ir: remove DUMMY edge type

2019-10-14 Thread Karol Herbst
it was never used

Signed-off-by: Karol Herbst 
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp| 3 ---
 src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp | 8 +---
 src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h   | 1 -
 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp| 2 --
 4 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
index 9f0e0733326..76fee8c791e 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp
@@ -536,9 +536,6 @@ Function::printCFGraph(const char *filePath)
  case Graph::Edge::BACK:
 fprintf(out, "\t%i -> %i;\n", idA, idB);
 break;
- case Graph::Edge::DUMMY:
-fprintf(out, "\t%i -> %i [style=dotted];\n", idA, idB);
-break;
  default:
 assert(0);
 break;
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
index b1076cf4129..e9a9981746a 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.cpp
@@ -77,7 +77,6 @@ const char *Graph::Edge::typeStr() const
case FORWARD: return "forward";
case BACK:return "back";
case CROSS:   return "cross";
-   case DUMMY:   return "dummy";
case UNKNOWN:
default:
   return "unk";
@@ -184,7 +183,7 @@ Graph::Node::reachableBy(const Node *node, const Node 
*term) const
  continue;
 
   for (EdgeIterator ei = pos->outgoing(); !ei.end(); ei.next()) {
- if (ei.getType() == Edge::BACK || ei.getType() == Edge::DUMMY)
+ if (ei.getType() == Edge::BACK)
 continue;
  if (ei.getNode()->visit(seq))
 stack.push(ei.getNode());
@@ -301,7 +300,6 @@ private:
 switch (ei.getType()) {
 case Graph::Edge::TREE:
 case Graph::Edge::FORWARD:
-case Graph::Edge::DUMMY:
if (++(ei.getNode()->tag) == ei.getNode()->incidentCountFwd())
   bb.push(ei.getNode());
break;
@@ -371,8 +369,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
 
for (edge = curr->out; edge; edge = edge->next[0]) {
   node = edge->target;
-  if (edge->type == Edge::DUMMY)
- continue;
 
   if (node->getSequence() == 0) {
  edge->type = Edge::TREE;
@@ -387,8 +383,6 @@ void Graph::classifyDFS(Node *curr, int& seq)
 
for (edge = curr->in; edge; edge = edge->next[1]) {
   node = edge->origin;
-  if (edge->type == Edge::DUMMY)
- continue;
 
   if (node->getSequence() == 0) {
  edge->type = Edge::TREE;
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
index 115f20e5e99..fc85e78a50c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h
@@ -47,7 +47,6 @@ public:
  FORWARD,
  BACK,
  CROSS, // e.g. loop break
- DUMMY
   };
 
   Edge(Node *dst, Node *src, Type kind);
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index f25bce00884..6df2664da22 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -624,8 +624,6 @@ RegAlloc::BuildIntervalsPass::collectLiveValues(BasicBlock 
*bb)
   // trickery to save a loop of OR'ing liveSets
   // aliasing works fine with BitSet::setOr
   for (Graph::EdgeIterator ei = bb->cfg.outgoing(); !ei.end(); ei.next()) {
- if (ei.getType() == Graph::Edge::DUMMY)
-continue;
  if (bbA) {
 bb->liveSet.setOr(>liveSet, >liveSet);
 bbA = bb;
-- 
2.21.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [Nouveau] [PATCH] nv50/ir: mark STORE destination inputs as used

2019-10-14 Thread Karol Herbst
Reviewed-by: Karol Herbst 

On Mon, Oct 14, 2019 at 8:47 AM Ilia Mirkin  wrote:
>
> Observed an issue when looking at the code generatedy by the
> image-vertex-attrib-input-output piglit test. Even though the test
> itself worked fine (due to TIC 0 being used for the image), this needs
> to be fixed.
>
> Signed-off-by: Ilia Mirkin 
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 ++
>  1 file changed, 6 insertions(+)
>
> 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 d62d36008e6..8c429026452 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> @@ -1591,6 +1591,12 @@ bool Source::scanInstruction(const struct 
> tgsi_full_instruction *inst)
>if (insn.getOpcode() == TGSI_OPCODE_STORE &&
>dst.getFile() != TGSI_FILE_MEMORY) {
>   info->io.globalAccess |= 0x2;
> +
> + if (dst.getFile() == TGSI_FILE_INPUT) {
> +// TODO: Handle indirect somehow?
> +const int i = dst.getIndex(0);
> +info->in[i].mask |= 1;
> + }
>}
>
>if (dst.getFile() == TGSI_FILE_OUTPUT) {
> --
> 2.21.0
>
> ___
> Nouveau mailing list
> nouv...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [Nouveau] [PATCH] gm107/ir: fix loading z offset for layered 3d image bindings

2019-10-14 Thread Karol Herbst
I don't think this is a good idea overall.

The way simpler solution would be to disable tiling on the z axis for
3d images so that we don't hurt the most common case, 2d images. And
that's what I was seeing nvidia doing anyway.

So with that we would end up adding a bunch of instructions hurting
the 2d image case, just to support something no user will care about
anyway.

On Mon, Oct 14, 2019 at 7:22 AM Ilia Mirkin  wrote:
>
> Unfortuantely we don't know if a particular load is a real 2d image (as
> would be a cube face or 2d array element), or a layer of a 3d image.
> Since we pass in the TIC reference, the instruction's type has to match
> what's in the TIC (experimentally). In order to properly support
> bindless images, this also can't be done by looking at the current
> bindings and generating appropriate code.
>
> As a result all plain 2d loads are converted into a pair of 2d/3d loads,
> with appropriate predicates to ensure only one of those actually
> executes, and the values are all merged in.
>
> This goes somewhat against the current flow, so for GM107 we do the OOB
> handling directly in the surface processing logic. Perhaps the other
> gens should do something similar, but that is left to another change.
>
> This fixes dEQP tests like image_load_store.3d.*_single_layer and GL-CTS
> tests like shader_image_load_store.non-layered_binding without breaking
> anything else.
>
> Signed-off-by: Ilia Mirkin 
> ---
>
> OK, first of all -- to whoever thought that binding single layers of a 3d
> image and telling the shader they were regular 2d images was a good idea --
> I disagree.
>
> This change feels super super dirty, but I honestly don't see a materially
> cleaner way of handling it. Instead of being able to reuse the OOB
> handling, it's put in with the coord processing (!), and the surface
> conversion function is seriously hacked up.
>
> But splitting it up is harder, since a lot of information has to flow
> from stage to stage, like when to do what kind of access, and cloning
> the surface op is much easier in the coord processing stage.
>
>  .../nouveau/codegen/nv50_ir_emit_gm107.cpp|  34 ++-
>  .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 206 +-
>  .../nouveau/codegen/nv50_ir_lowering_nvc0.h   |   4 +-
>  src/gallium/drivers/nouveau/nvc0/nvc0_tex.c   |  10 +-
>  4 files changed, 201 insertions(+), 53 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp 
> b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> index 6eefe8f0025..e244bd0d610 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> @@ -122,6 +122,8 @@ private:
> void emitSAM();
> void emitRAM();
>
> +   void emitPSETP();
> +
> void emitMOV();
> void emitS2R();
> void emitCS2R();
> @@ -690,6 +692,31 @@ CodeEmitterGM107::emitRAM()
>   * predicate/cc
>   
> **/
>
> +void
> +CodeEmitterGM107::emitPSETP()
> +{
> +
> +   emitInsn(0x5090);
> +
> +   switch (insn->op) {
> +   case OP_AND: emitField(0x18, 3, 0); break;
> +   case OP_OR:  emitField(0x18, 3, 1); break;
> +   case OP_XOR: emitField(0x18, 3, 2); break;
> +   default:
> +  assert(!"unexpected operation");
> +  break;
> +   }
> +
> +   // emitINV (0x2a);
> +   emitPRED(0x27); // TODO: support 3-arg
> +   emitINV (0x20, insn->src(1));
> +   emitPRED(0x1d, insn->src(1));
> +   emitINV (0x0f, insn->src(0));
> +   emitPRED(0x0c, insn->src(0));
> +   emitPRED(0x03, insn->def(0));
> +   emitPRED(0x00);
> +}
> +
>  
> /***
>   * movement / conversion
>   
> **/
> @@ -3557,7 +3584,12 @@ CodeEmitterGM107::emitInstruction(Instruction *i)
> case OP_AND:
> case OP_OR:
> case OP_XOR:
> -  emitLOP();
> +  switch (insn->def(0).getFile()) {
> +  case FILE_GPR: emitLOP(); break;
> +  case FILE_PREDICATE: emitPSETP(); break;
> +  default:
> + assert(!"invalid bool op");
> +  }
>break;
> case OP_NOT:
>emitNOT();
> 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 1f702a987d8..0f68a9a229f 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> @@ -1802,6 +1802,9 @@ NVC0LoweringPass::loadSuInfo32(Value *ptr, int slot, 
> uint32_t off, bool bindless
>  {
> uint32_t base = slot * NVC0_SU_INFO__STRIDE;
>
> +   // We don't upload surface info for bindless for GM107+
> +   assert(!bindless || targ->getChipset() < NVISA_GM107_CHIPSET);
> +
> if (ptr) {
>ptr = bld.mkOp2v(OP_ADD, TYPE_U32, bld.getSSA(), ptr, bld.mkImm(slot));
>   

[Mesa-dev] [PATCH] nv50/ir: mark STORE destination inputs as used

2019-10-14 Thread Ilia Mirkin
Observed an issue when looking at the code generatedy by the
image-vertex-attrib-input-output piglit test. Even though the test
itself worked fine (due to TIC 0 being used for the image), this needs
to be fixed.

Signed-off-by: Ilia Mirkin 
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 ++
 1 file changed, 6 insertions(+)

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 d62d36008e6..8c429026452 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1591,6 +1591,12 @@ bool Source::scanInstruction(const struct 
tgsi_full_instruction *inst)
   if (insn.getOpcode() == TGSI_OPCODE_STORE &&
   dst.getFile() != TGSI_FILE_MEMORY) {
  info->io.globalAccess |= 0x2;
+
+ if (dst.getFile() == TGSI_FILE_INPUT) {
+// TODO: Handle indirect somehow?
+const int i = dst.getIndex(0);
+info->in[i].mask |= 1;
+ }
   }
 
   if (dst.getFile() == TGSI_FILE_OUTPUT) {
-- 
2.21.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev