Re: [Mesa-dev] [PATCH 10/16] gallium: add is_percentage and is_float fields to pipe_driver_query_info

2014-07-09 Thread Samuel Pitoiset

On 07/08/2014 06:27 PM, Marek Olšák wrote:

It would be nicer to define all the types as enums, e.g. enum
pipe_driver_query_type { PIPE_DRIVER_QUERY_TYPE_BYTES,
PIPE_DRIVER_QUERY_TYPE_PERCENTAGE, PIPE_DRIVER_QUERY_TYPE_FLOAT,
PIPE_DRIVER_QUERY_TYPE_UINT };

That would be nicer than a bunch of booleans.

If that's not possible, please document how the booleans interact with
each other.


I'll take a look at this.
Thanks.



Marek

On Mon, Jul 7, 2014 at 5:47 PM, Samuel Pitoiset
samuel.pitoi...@gmail.com wrote:

This will be used by GL_AMD_performance_monitor.

Signed-off-by: Samuel Pitoiset samuel.pitoi...@gmail.com
---
  src/gallium/include/pipe/p_defines.h | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/src/gallium/include/pipe/p_defines.h 
b/src/gallium/include/pipe/p_defines.h
index 501c1e2..db5c9bf 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -740,6 +740,8 @@ struct pipe_driver_query_info
 unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */
 union pipe_numeric_type_union max_value; /* max value that can be returned 
*/
 boolean uses_byte_units; /* whether the result is in bytes */
+   boolean is_percentage;
+   boolean is_float;
 unsigned group_id;
  };

--
2.0.0

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


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


Re: [Mesa-dev] [PATCH 10/16] gallium: add is_percentage and is_float fields to pipe_driver_query_info

2014-07-08 Thread Marek Olšák
It would be nicer to define all the types as enums, e.g. enum
pipe_driver_query_type { PIPE_DRIVER_QUERY_TYPE_BYTES,
PIPE_DRIVER_QUERY_TYPE_PERCENTAGE, PIPE_DRIVER_QUERY_TYPE_FLOAT,
PIPE_DRIVER_QUERY_TYPE_UINT };

That would be nicer than a bunch of booleans.

If that's not possible, please document how the booleans interact with
each other.

Marek

On Mon, Jul 7, 2014 at 5:47 PM, Samuel Pitoiset
samuel.pitoi...@gmail.com wrote:
 This will be used by GL_AMD_performance_monitor.

 Signed-off-by: Samuel Pitoiset samuel.pitoi...@gmail.com
 ---
  src/gallium/include/pipe/p_defines.h | 2 ++
  1 file changed, 2 insertions(+)

 diff --git a/src/gallium/include/pipe/p_defines.h 
 b/src/gallium/include/pipe/p_defines.h
 index 501c1e2..db5c9bf 100644
 --- a/src/gallium/include/pipe/p_defines.h
 +++ b/src/gallium/include/pipe/p_defines.h
 @@ -740,6 +740,8 @@ struct pipe_driver_query_info
 unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */
 union pipe_numeric_type_union max_value; /* max value that can be 
 returned */
 boolean uses_byte_units; /* whether the result is in bytes */
 +   boolean is_percentage;
 +   boolean is_float;
 unsigned group_id;
  };

 --
 2.0.0

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


[Mesa-dev] [PATCH 10/16] gallium: add is_percentage and is_float fields to pipe_driver_query_info

2014-07-07 Thread Samuel Pitoiset
This will be used by GL_AMD_performance_monitor.

Signed-off-by: Samuel Pitoiset samuel.pitoi...@gmail.com
---
 src/gallium/include/pipe/p_defines.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/include/pipe/p_defines.h 
b/src/gallium/include/pipe/p_defines.h
index 501c1e2..db5c9bf 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -740,6 +740,8 @@ struct pipe_driver_query_info
unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */
union pipe_numeric_type_union max_value; /* max value that can be returned 
*/
boolean uses_byte_units; /* whether the result is in bytes */
+   boolean is_percentage;
+   boolean is_float;
unsigned group_id;
 };
 
-- 
2.0.0

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