Re: [Mesa-dev] [PATCH 1/5] i965: Move is_drawing_points to brw_state.h.

2016-03-18 Thread Jordan Justen
On 2016-03-10 17:24:33, Ilia Mirkin wrote:
> On Thu, Mar 10, 2016 at 7:59 PM, Kenneth Graunke  
> wrote:
> > I need to use this in multiple source files.
> >
> > Signed-off-by: Kenneth Graunke 
> > ---
> >  src/mesa/drivers/dri/i965/brw_state.h | 20 
> >  src/mesa/drivers/dri/i965/gen6_sf_state.c | 20 
> >  2 files changed, 20 insertions(+), 20 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_state.h 
> > b/src/mesa/drivers/dri/i965/brw_state.h
> > index 6b85eac..9a17b73 100644
> > --- a/src/mesa/drivers/dri/i965/brw_state.h
> > +++ b/src/mesa/drivers/dri/i965/brw_state.h
> > @@ -34,6 +34,7 @@
> >  #define BRW_STATE_H
> >
> >  #include "brw_context.h"
> > +#include "brw_defines.h"
> >
> >  #ifdef __cplusplus
> >  extern "C" {
> > @@ -406,6 +407,25 @@ void gen7_reset_hw_bt_pool_offsets(struct brw_context 
> > *brw);
> >  void
> >  gen7_restore_default_l3_config(struct brw_context *brw);
> >
> > +static inline bool
> > +is_drawing_points(const struct brw_context *brw)
> > +{
> > +   /* Determine if the primitives *reaching the SF* are points */
> > +   /* _NEW_POLYGON */
> > +   if (brw->ctx.Polygon.FrontMode == GL_POINT ||
> > +   brw->ctx.Polygon.BackMode == GL_POINT) {
> > +  return true;
> > +   }
> > +
> > +   if (brw->geometry_program) {
> > +  /* BRW_NEW_GEOMETRY_PROGRAM */
> > +  return brw->geometry_program->OutputType == GL_POINTS;
> 
> What about TES point_mode? [I know it already didn't account for that...]
> 
> Similarly I think that the lines change needs to account for isoline
> tessellation output.
> 

Ilia makes a good point. Maybe we can file a bug to handle tess later?

Series Reviewed-by: Jordan Justen 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/5] i965: Move is_drawing_points to brw_state.h.

2016-03-10 Thread Ilia Mirkin
On Thu, Mar 10, 2016 at 7:59 PM, Kenneth Graunke  wrote:
> I need to use this in multiple source files.
>
> Signed-off-by: Kenneth Graunke 
> ---
>  src/mesa/drivers/dri/i965/brw_state.h | 20 
>  src/mesa/drivers/dri/i965/gen6_sf_state.c | 20 
>  2 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_state.h 
> b/src/mesa/drivers/dri/i965/brw_state.h
> index 6b85eac..9a17b73 100644
> --- a/src/mesa/drivers/dri/i965/brw_state.h
> +++ b/src/mesa/drivers/dri/i965/brw_state.h
> @@ -34,6 +34,7 @@
>  #define BRW_STATE_H
>
>  #include "brw_context.h"
> +#include "brw_defines.h"
>
>  #ifdef __cplusplus
>  extern "C" {
> @@ -406,6 +407,25 @@ void gen7_reset_hw_bt_pool_offsets(struct brw_context 
> *brw);
>  void
>  gen7_restore_default_l3_config(struct brw_context *brw);
>
> +static inline bool
> +is_drawing_points(const struct brw_context *brw)
> +{
> +   /* Determine if the primitives *reaching the SF* are points */
> +   /* _NEW_POLYGON */
> +   if (brw->ctx.Polygon.FrontMode == GL_POINT ||
> +   brw->ctx.Polygon.BackMode == GL_POINT) {
> +  return true;
> +   }
> +
> +   if (brw->geometry_program) {
> +  /* BRW_NEW_GEOMETRY_PROGRAM */
> +  return brw->geometry_program->OutputType == GL_POINTS;

What about TES point_mode? [I know it already didn't account for that...]

Similarly I think that the lines change needs to account for isoline
tessellation output.

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


[Mesa-dev] [PATCH 1/5] i965: Move is_drawing_points to brw_state.h.

2016-03-10 Thread Kenneth Graunke
I need to use this in multiple source files.

Signed-off-by: Kenneth Graunke 
---
 src/mesa/drivers/dri/i965/brw_state.h | 20 
 src/mesa/drivers/dri/i965/gen6_sf_state.c | 20 
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_state.h 
b/src/mesa/drivers/dri/i965/brw_state.h
index 6b85eac..9a17b73 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -34,6 +34,7 @@
 #define BRW_STATE_H
 
 #include "brw_context.h"
+#include "brw_defines.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -406,6 +407,25 @@ void gen7_reset_hw_bt_pool_offsets(struct brw_context 
*brw);
 void
 gen7_restore_default_l3_config(struct brw_context *brw);
 
+static inline bool
+is_drawing_points(const struct brw_context *brw)
+{
+   /* Determine if the primitives *reaching the SF* are points */
+   /* _NEW_POLYGON */
+   if (brw->ctx.Polygon.FrontMode == GL_POINT ||
+   brw->ctx.Polygon.BackMode == GL_POINT) {
+  return true;
+   }
+
+   if (brw->geometry_program) {
+  /* BRW_NEW_GEOMETRY_PROGRAM */
+  return brw->geometry_program->OutputType == GL_POINTS;
+   } else {
+  /* BRW_NEW_PRIMITIVE */
+  return brw->primitive == _3DPRIM_POINTLIST;
+   }
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c 
b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index 2634e6b..685fbdc 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -147,26 +147,6 @@ get_attr_override(const struct brw_vue_map *vue_map, int 
urb_entry_read_offset,
 }
 
 
-static bool
-is_drawing_points(const struct brw_context *brw)
-{
-   /* Determine if the primitives *reaching the SF* are points */
-   /* _NEW_POLYGON */
-   if (brw->ctx.Polygon.FrontMode == GL_POINT ||
-   brw->ctx.Polygon.BackMode == GL_POINT) {
-  return true;
-   }
-
-   if (brw->geometry_program) {
-  /* BRW_NEW_GEOMETRY_PROGRAM */
-  return brw->geometry_program->OutputType == GL_POINTS;
-   } else {
-  /* BRW_NEW_PRIMITIVE */
-  return brw->primitive == _3DPRIM_POINTLIST;
-   }
-}
-
-
 /**
  * Create the mapping from the FS inputs we produce to the previous pipeline
  * stage (GS or VS) outputs they source from.
-- 
2.7.2

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