Re: [Mesa-dev] [PATCH 1/3 v2] mesa: Make a shared header for 3D pipeline enum / #defines.

2015-03-30 Thread Matt Turner
On Mon, Mar 30, 2015 at 9:49 AM, Eric Anholt e...@anholt.net wrote:
 NIR uses these enums/#defines in nir_variables and associated intrinsics,
 but I want to be able to use them from TGSI-NIR and NIR-TGSI.
 Otherwise, we had to pull in all of mtypes.h.

 This doesn't cover all of the enums we might want from a shared compiler
 core (like varying slots or vert attribs), but it at least covers what I
 need at the moment (system values and interp qualifiers).

 v2: Move to src/glsl since util/ is really vague.  Include in Makefile.am
 list.  Use plain bitshifts and stdint types instead of undefined
 BITFIELD64_BIT.
 ---
  src/glsl/Makefile.am   |   1 +
  src/glsl/pipeline.h| 170 
 +
  src/mesa/main/mtypes.h | 142 +
  3 files changed, 172 insertions(+), 141 deletions(-)
  create mode 100644 src/glsl/pipeline.h

 diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
 index ed90366..5264002 100644
 --- a/src/glsl/Makefile.am
 +++ b/src/glsl/Makefile.am
 @@ -145,6 +145,7 @@ libglsl_la_SOURCES =  
   \
 glsl_lexer.cpp  \
 glsl_parser.cpp \
 glsl_parser.h   \
 +   pipeline.h  \

This should probably go in LIBGLSL_FILES in Makefile.sources.

 $(LIBGLSL_FILES)\
 $(NIR_FILES)

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


Re: [Mesa-dev] [PATCH 1/3 v2] mesa: Make a shared header for 3D pipeline enum / #defines.

2015-03-30 Thread Brian Paul

On 03/30/2015 10:49 AM, Eric Anholt wrote:

NIR uses these enums/#defines in nir_variables and associated intrinsics,
but I want to be able to use them from TGSI-NIR and NIR-TGSI.
Otherwise, we had to pull in all of mtypes.h.

This doesn't cover all of the enums we might want from a shared compiler
core (like varying slots or vert attribs), but it at least covers what I
need at the moment (system values and interp qualifiers).

v2: Move to src/glsl since util/ is really vague.  Include in Makefile.am
 list.  Use plain bitshifts and stdint types instead of undefined
 BITFIELD64_BIT.
---
  src/glsl/Makefile.am   |   1 +
  src/glsl/pipeline.h| 170 +
  src/mesa/main/mtypes.h | 142 +
  3 files changed, 172 insertions(+), 141 deletions(-)
  create mode 100644 src/glsl/pipeline.h



pipeline.h seems a bit broadly named for the current contents.  Do you 
expect to add many other things besides shader register names and interp 
modes?


Though, I don't have better filename idea right now.

-Brian

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


Re: [Mesa-dev] [PATCH 1/3 v2] mesa: Make a shared header for 3D pipeline enum / #defines.

2015-03-30 Thread Kenneth Graunke
On Monday, March 30, 2015 11:44:19 AM Eric Anholt wrote:
 Brian Paul bri...@vmware.com writes:
 
  On 03/30/2015 10:49 AM, Eric Anholt wrote:
  NIR uses these enums/#defines in nir_variables and associated intrinsics,
  but I want to be able to use them from TGSI-NIR and NIR-TGSI.
  Otherwise, we had to pull in all of mtypes.h.
 
  This doesn't cover all of the enums we might want from a shared compiler
  core (like varying slots or vert attribs), but it at least covers what I
  need at the moment (system values and interp qualifiers).
 
  v2: Move to src/glsl since util/ is really vague.  Include in Makefile.am
   list.  Use plain bitshifts and stdint types instead of undefined
   BITFIELD64_BIT.
  ---
src/glsl/Makefile.am   |   1 +
src/glsl/pipeline.h| 170 
  +
src/mesa/main/mtypes.h | 142 +
3 files changed, 172 insertions(+), 141 deletions(-)
create mode 100644 src/glsl/pipeline.h
 
 
  pipeline.h seems a bit broadly named for the current contents.  Do you 
  expect to add many other things besides shader register names and interp 
  modes?
 
 The things mentioned in the commit message, for sure. I could also
 imagine enums like PIPE_FUNC_* too, as we may want to have NIR-level
 programmable blending lowering or shadow compares, for example.
 
  Though, I don't have better filename idea right now.
 
 Exactly.

Maybe shader_enums.h?  Regardless,
Reviewed-by: Kenneth Graunke kenn...@whitecape.org


signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3 v2] mesa: Make a shared header for 3D pipeline enum / #defines.

2015-03-30 Thread Eric Anholt
Brian Paul bri...@vmware.com writes:

 On 03/30/2015 10:49 AM, Eric Anholt wrote:
 NIR uses these enums/#defines in nir_variables and associated intrinsics,
 but I want to be able to use them from TGSI-NIR and NIR-TGSI.
 Otherwise, we had to pull in all of mtypes.h.

 This doesn't cover all of the enums we might want from a shared compiler
 core (like varying slots or vert attribs), but it at least covers what I
 need at the moment (system values and interp qualifiers).

 v2: Move to src/glsl since util/ is really vague.  Include in Makefile.am
  list.  Use plain bitshifts and stdint types instead of undefined
  BITFIELD64_BIT.
 ---
   src/glsl/Makefile.am   |   1 +
   src/glsl/pipeline.h| 170 
 +
   src/mesa/main/mtypes.h | 142 +
   3 files changed, 172 insertions(+), 141 deletions(-)
   create mode 100644 src/glsl/pipeline.h


 pipeline.h seems a bit broadly named for the current contents.  Do you 
 expect to add many other things besides shader register names and interp 
 modes?

The things mentioned in the commit message, for sure. I could also
imagine enums like PIPE_FUNC_* too, as we may want to have NIR-level
programmable blending lowering or shadow compares, for example.

 Though, I don't have better filename idea right now.

Exactly.


signature.asc
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3 v2] mesa: Make a shared header for 3D pipeline enum / #defines.

2015-03-30 Thread Eric Anholt
Matt Turner matts...@gmail.com writes:

 On Mon, Mar 30, 2015 at 9:49 AM, Eric Anholt e...@anholt.net wrote:
 NIR uses these enums/#defines in nir_variables and associated intrinsics,
 but I want to be able to use them from TGSI-NIR and NIR-TGSI.
 Otherwise, we had to pull in all of mtypes.h.

 This doesn't cover all of the enums we might want from a shared compiler
 core (like varying slots or vert attribs), but it at least covers what I
 need at the moment (system values and interp qualifiers).

 v2: Move to src/glsl since util/ is really vague.  Include in Makefile.am
 list.  Use plain bitshifts and stdint types instead of undefined
 BITFIELD64_BIT.
 ---
  src/glsl/Makefile.am   |   1 +
  src/glsl/pipeline.h| 170 
 +
  src/mesa/main/mtypes.h | 142 +
  3 files changed, 172 insertions(+), 141 deletions(-)
  create mode 100644 src/glsl/pipeline.h

 diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
 index ed90366..5264002 100644
 --- a/src/glsl/Makefile.am
 +++ b/src/glsl/Makefile.am
 @@ -145,6 +145,7 @@ libglsl_la_SOURCES = 
\
 glsl_lexer.cpp  \
 glsl_parser.cpp \
 glsl_parser.h   \
 +   pipeline.h  \

 This should probably go in LIBGLSL_FILES in Makefile.sources.

Oh, right.  That's better.


signature.asc
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/3 v2] mesa: Make a shared header for 3D pipeline enum / #defines.

2015-03-30 Thread Brian Paul

On 03/30/2015 03:46 PM, Eric Anholt wrote:

Kenneth Graunke kenn...@whitecape.org writes:


On Monday, March 30, 2015 11:44:19 AM Eric Anholt wrote:

Brian Paul bri...@vmware.com writes:


On 03/30/2015 10:49 AM, Eric Anholt wrote:

NIR uses these enums/#defines in nir_variables and associated intrinsics,
but I want to be able to use them from TGSI-NIR and NIR-TGSI.
Otherwise, we had to pull in all of mtypes.h.

This doesn't cover all of the enums we might want from a shared compiler
core (like varying slots or vert attribs), but it at least covers what I
need at the moment (system values and interp qualifiers).

v2: Move to src/glsl since util/ is really vague.  Include in Makefile.am
  list.  Use plain bitshifts and stdint types instead of undefined
  BITFIELD64_BIT.
---
   src/glsl/Makefile.am   |   1 +
   src/glsl/pipeline.h| 170 
+
   src/mesa/main/mtypes.h | 142 +
   3 files changed, 172 insertions(+), 141 deletions(-)
   create mode 100644 src/glsl/pipeline.h



pipeline.h seems a bit broadly named for the current contents.  Do you
expect to add many other things besides shader register names and interp
modes?


The things mentioned in the commit message, for sure. I could also
imagine enums like PIPE_FUNC_* too, as we may want to have NIR-level
programmable blending lowering or shadow compares, for example.


Though, I don't have better filename idea right now.


Exactly.


Maybe shader_enums.h?  Regardless,
Reviewed-by: Kenneth Graunke kenn...@whitecape.org


Would that make others happy?


Sounds good to me.

-Brian


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


Re: [Mesa-dev] [PATCH 1/3 v2] mesa: Make a shared header for 3D pipeline enum / #defines.

2015-03-30 Thread Eric Anholt
Kenneth Graunke kenn...@whitecape.org writes:

 On Monday, March 30, 2015 11:44:19 AM Eric Anholt wrote:
 Brian Paul bri...@vmware.com writes:
 
  On 03/30/2015 10:49 AM, Eric Anholt wrote:
  NIR uses these enums/#defines in nir_variables and associated intrinsics,
  but I want to be able to use them from TGSI-NIR and NIR-TGSI.
  Otherwise, we had to pull in all of mtypes.h.
 
  This doesn't cover all of the enums we might want from a shared compiler
  core (like varying slots or vert attribs), but it at least covers what I
  need at the moment (system values and interp qualifiers).
 
  v2: Move to src/glsl since util/ is really vague.  Include in Makefile.am
   list.  Use plain bitshifts and stdint types instead of undefined
   BITFIELD64_BIT.
  ---
src/glsl/Makefile.am   |   1 +
src/glsl/pipeline.h| 170 
  +
src/mesa/main/mtypes.h | 142 +
3 files changed, 172 insertions(+), 141 deletions(-)
create mode 100644 src/glsl/pipeline.h
 
 
  pipeline.h seems a bit broadly named for the current contents.  Do you 
  expect to add many other things besides shader register names and interp 
  modes?
 
 The things mentioned in the commit message, for sure. I could also
 imagine enums like PIPE_FUNC_* too, as we may want to have NIR-level
 programmable blending lowering or shadow compares, for example.
 
  Though, I don't have better filename idea right now.
 
 Exactly.

 Maybe shader_enums.h?  Regardless,
 Reviewed-by: Kenneth Graunke kenn...@whitecape.org

Would that make others happy?


signature.asc
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev