[Mesa-dev] [PATCH v2 72/78] i965/gs/gen6: Refactor ir_emit_vertex and ir_end_primitive for gen6

Eduardo Lima Mitev elima at igalia.com
Mon Jul 27 14:47:04 PDT 2015


On 07/27/2015 11:33 PM, Jason Ekstrand wrote:
> On Mon, Jul 27, 2015 at 2:29 PM, Eduardo Lima Mitev <elima at igalia.com> wrote:
>> On 07/25/2015 01:19 AM, Jason Ekstrand wrote:
>>> This patch needs to go *before* patch 71 so things continue to build.
>>>
>>
>> Both patches build for me in the current order, and also build fine
>> changing order as you propose. Are you sure it is patch 71 and 72 the
>> ones conflicting?
> 
> I merely noticed that you implement gs_emit_vertex and
> gs_end_primitive in this patch but use them in 71 to implement the NIR
> intrinsics.  I didn't actually build-test it.

Ok, notice that patch 72 adds gs_emit_vertex/gs_end_primitive on
gen6_gs_visitor.(cpp/h); while patch 71 uses the general definitions in
the base class.

> --Jason
> 
>>> On Thu, Jul 23, 2015 at 3:17 AM, Eduardo Lima Mitev <elima at igalia.com> wrote:
>>>> From: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
>>>>
>>>> So the implementation is independent of GLSL IR and the visit methods of the
>>>> gen6 GS visitor. This way we will be able to reuse that implementation directly
>>>> from the NIR vec4 backend.
>>>>
>>>> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
>>>> ---
>>>>  src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp | 13 ++++++++++++-
>>>>  src/mesa/drivers/dri/i965/gen6_gs_visitor.h   |  2 ++
>>>>  2 files changed, 14 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp b/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
>>>> index 782687a..68e443d 100644
>>>> --- a/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
>>>> +++ b/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
>>>> @@ -147,7 +147,12 @@ gen6_gs_visitor::emit_prolog()
>>>>  }
>>>>
>>>>  void
>>>> -gen6_gs_visitor::visit(ir_emit_vertex *)
>>>> +gen6_gs_visitor::visit(ir_emit_vertex *ir)
>>>> +{
>>>> +   gs_emit_vertex(ir->stream_id());
>>>> +}
>>>> +void
>>>> +gen6_gs_visitor::gs_emit_vertex(int stream_id)
>>>>  {
>>>>     this->current_annotation = "gen6 emit vertex";
>>>>     /* Honor max_vertex layout indication in geometry shader by ignoring any
>>>> @@ -224,6 +229,12 @@ gen6_gs_visitor::visit(ir_emit_vertex *)
>>>>  void
>>>>  gen6_gs_visitor::visit(ir_end_primitive *)
>>>>  {
>>>> +   gs_end_primitive();
>>>> +}
>>>> +
>>>> +void
>>>> +gen6_gs_visitor::gs_end_primitive()
>>>> +{
>>>>     this->current_annotation = "gen6 end primitive";
>>>>     /* Calling EndPrimitive() is optional for point output. In this case we set
>>>>      * the PrimEnd flag when we process EmitVertex().
>>>> diff --git a/src/mesa/drivers/dri/i965/gen6_gs_visitor.h b/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
>>>> index 862d0ea..4cf9489 100644
>>>> --- a/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
>>>> +++ b/src/mesa/drivers/dri/i965/gen6_gs_visitor.h
>>>> @@ -51,6 +51,8 @@ protected:
>>>>     virtual void emit_thread_end();
>>>>     virtual void visit(ir_emit_vertex *);
>>>>     virtual void visit(ir_end_primitive *);
>>>> +   virtual void gs_emit_vertex(int stream_id);
>>>> +   virtual void gs_end_primitive();
>>>>     virtual void emit_urb_write_header(int mrf);
>>>>     virtual void emit_urb_write_opcode(bool complete,
>>>>                                        int base_mrf,
>>>> --
>>>> 2.1.4
>>>>
>>>> _______________________________________________
>>>> mesa-dev mailing list
>>>> mesa-dev at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>>
>>
> 



More information about the mesa-dev mailing list