Re: [Mesa-dev] GL_AMD_performance_monitor for Nouveau

2014-07-07 Thread Samuel Pitoiset
On 07/05/2014 07:18 PM, Ilia Mirkin wrote: On Sat, Jul 5, 2014 at 2:49 PM, Samuel Pitoiset wrote: Hi, As part of my Google Summer of Code 2014, I implemented GL_AMD_performance_monitor for Nouveau using the state tracker of Gallium. Currently, only MP counters for NVC0+ (fermi) are exposed

Re: [Mesa-dev] [PATCH 06/11] gallium: add new counter types to pipe_driver_query_info

2014-07-07 Thread Samuel Pitoiset
On 07/06/2014 01:39 PM, Marek Olšák wrote: The same as patch 3 - this will break radeon. Marek Thanks for your reviews, I'll fix the radeon part. On Sat, Jul 5, 2014 at 8:49 PM, Samuel Pitoiset wrote: This will be used by GL_AMD_performance_monitor. Signed-off-by: Samuel Pit

[Mesa-dev] [PATCH 03/16] gallium: add a group_id field to pipe_driver_query_info v2

2014-07-07 Thread Samuel Pitoiset
V2: - make group_id the last field of this struct, this fixes drivers which use pipe_driver_query_info like radeon Signed-off-by: Samuel Pitoiset --- src/gallium/include/pipe/p_defines.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium

[Mesa-dev] [PATCH 15/16] [RFC] mesa/st: implement GL_AMD_performance_monitor v3

2014-07-07 Thread Samuel Pitoiset
From: Christoph Bumiller This is based on the original patch of Christoph Bumiller. (source: http://people.freedesktop.org/~chrisbmr/perfmon.diff) V2: (Samuel Pitoiset) - Fix compilation - Improve the original code - Rewrite some parts of the original code V3: - Do not use

[Mesa-dev] [PATCH 16/16] [RFC] mesa/st: enable GL_AMD_performance_monitor

2014-07-07 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/mesa/state_tracker/st_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 4207cb6..25042fb 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa

[Mesa-dev] [PATCH 09/16] gallium: replace pipe_driver_query_info::max_value by a union

2014-07-07 Thread Samuel Pitoiset
This allows to return different numeric types for queries. Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/hud/hud_driver_query.c| 2 +- src/gallium/drivers/freedreno/freedreno_query.c | 12 ++-- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 8 src/gallium

[Mesa-dev] [PATCH 13/16] gallium: make pipe_context::begin_query return a boolean

2014-07-07 Thread Samuel Pitoiset
This can be used to check if a query is unable to start. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/freedreno/freedreno_query.c| 4 ++-- src/gallium/drivers/freedreno/freedreno_query.h| 2 +- src/gallium/drivers/freedreno/freedreno_query_hw.c | 3 ++- src/gallium/drivers

[Mesa-dev] [PATCH 14/16] nvc0: make begin_query return false when all MP counters are used v2

2014-07-07 Thread Samuel Pitoiset
V2: - do not return immediately after nvc0_mp_pm_query_end() in order to set the current state of the given query Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gallium

[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 --- 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

[Mesa-dev] [PATCH 01/16] nvc0: allocate more space before a counter is configured v2

2014-07-07 Thread Samuel Pitoiset
On nvc0, a counter can up to 6 sources instead of only one for nve4+. This fixes a crash when a counter uses more than one source. V2: - add the Reviewed-by Signed-off-by: Samuel Pitoiset Reviewed-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 5 +++-- 1 file changed, 3

[Mesa-dev] [PATCH 05/16] svga: implement pipe_context::get_driver_query_group_info

2014-07-07 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/svga/svga_screen.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index b213b04..5621271 100644 --- a/src/gallium/drivers/svga

[Mesa-dev] [PATCH 07/16] radeon: implement pipe_context::get_driver_query_group_info

2014-07-07 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/radeon/r600_pipe_common.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 46e8a79..43d86a4 100644 --- a/src/gallium

[Mesa-dev] [PATCH 12/16] gallium: Add a f32 field to pipe_query_result

2014-07-07 Thread Samuel Pitoiset
This will be used for the GL_FLOAT counter type of AMD_performance_monitor. Signed-off-by: Samuel Pitoiset --- src/gallium/include/pipe/p_defines.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index db5c9bf

[Mesa-dev] [PATCH 06/16] freedreno: implement pipe_context::get_driver_query_group_info

2014-07-07 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/freedreno/freedreno_query.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/gallium/drivers/freedreno/freedreno_query.c b/src/gallium/drivers/freedreno/freedreno_query.c index cb3b49a..5dbac94 100644 --- a/src

[Mesa-dev] [PATCH 11/16] nvc0: use of new counter types

2014-07-07 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c index 3e8c90b..2ce4378 100644

[Mesa-dev] [PATCH 04/16] gallium: use of pipe_driver_query_info::group_id v2

2014-07-07 Thread Samuel Pitoiset
This adds two groups of queries for nvc0. All other drivers which use pipe_driver_query_info (freedreno, svga and radeon) only define one group of queries. V2: - rewrite commit message Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 4 src/gallium

[Mesa-dev] GL_AMD_performance_monitor v2

2014-07-07 Thread Samuel Pitoiset
Hello, This is the second version of GL_AMD_performance_monitor. V2 (global changes): - Fix radeon as pinpointd by Marek. - Implement pipe_driver_query_group_info for svga, radeon and freedreno GL_AMD_performance_monitor is now available for nvc0, svga, freedreno and radeon. Thanks in advanc

[Mesa-dev] [PATCH 08/16] nvc0: implement pipe_context::get_driver_query_group_info

2014-07-07 Thread Samuel Pitoiset
This adds two groups of queries. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 52 ++ src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 + src/gallium/drivers/nouveau/nvc0/nvc0_screen.h | 3 ++ 3 files changed, 56 insertions

[Mesa-dev] [PATCH 02/16] gallium: add pipe_context::get_driver_query_group_info

2014-07-07 Thread Samuel Pitoiset
This will be used to sort counters per group for GL_AMD_performance_monitor. Signed-off-by: Samuel Pitoiset --- src/gallium/include/pipe/p_defines.h | 7 +++ src/gallium/include/pipe/p_screen.h | 11 +++ 2 files changed, 18 insertions(+) diff --git a/src/gallium/include/pipe

Re: [Mesa-dev] [PATCH 03/16] gallium: add a group_id field to pipe_driver_query_info v2

2014-07-07 Thread Samuel Pitoiset
On 07/07/2014 05:12 PM, Ilia Mirkin wrote: On Mon, Jul 7, 2014 at 11:47 AM, Samuel Pitoiset wrote: V2: - make group_id the last field of this struct, this fixes drivers which use pipe_driver_query_info like radeon While I have no problem with this patch, how exactly would placing group_id

Re: [Mesa-dev] [PATCH 04/16] gallium: use of pipe_driver_query_info::group_id v2

2014-07-07 Thread Samuel Pitoiset
On 07/07/2014 05:13 PM, Ilia Mirkin wrote: On Mon, Jul 7, 2014 at 11:47 AM, Samuel Pitoiset wrote: This adds two groups of queries for nvc0. All other drivers which use pipe_driver_query_info (freedreno, svga and radeon) only define one group of queries. V2: - rewrite commit message

Re: [Mesa-dev] [PATCH 09/16] gallium: replace pipe_driver_query_info::max_value by a union

2014-07-07 Thread Samuel Pitoiset
On 07/07/2014 05:17 PM, Ilia Mirkin wrote: On Mon, Jul 7, 2014 at 11:47 AM, Samuel Pitoiset wrote: This allows to return different numeric types for queries. Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/hud/hud_driver_query.c| 2 +- src/gallium/drivers/freedreno

Re: [Mesa-dev] [PATCH 16/16] [RFC] mesa/st: enable GL_AMD_performance_monitor

2014-07-07 Thread Samuel Pitoiset
On 07/07/2014 05:23 PM, Ilia Mirkin wrote: On Mon, Jul 7, 2014 at 11:47 AM, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset --- src/mesa/state_tracker/st_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker

Re: [Mesa-dev] [PATCH 02/16] gallium: add pipe_context::get_driver_query_group_info

2014-07-07 Thread Samuel Pitoiset
docs bit in gallium/docs/source/screen.rst Otherwise looks ok to me. Roland Am 07.07.2014 17:47, schrieb Samuel Pitoiset: This will be used to sort counters per group for GL_AMD_performance_monitor. Signed-off-by: Samuel Pitoiset --- src/gallium/include/pipe/p_defines.h | 7 +++ src/ga

Re: [Mesa-dev] [PATCH 11/16] nvc0: use of new counter types

2014-07-07 Thread Samuel Pitoiset
On 07/07/2014 06:32 PM, Ilia Mirkin wrote: On Mon, Jul 7, 2014 at 11:47 AM, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers

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
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 wrote: This will be used by GL_AMD_performance_monitor. Signed-off-by: Samuel Pitoiset --- s

[Mesa-dev] GL_AMD_performance_monitor v3

2014-07-09 Thread Samuel Pitoiset
Hello, This is the third version of GL_AMD_performance_monitor. V2 (global changes): - Fix radeon as pinpointed by Marek - Implement pipe_driver_query_group_info for svga, radeon and freedreno V3 (global changes): - Re-organize the series according to hints of Ilia Mirkin - Document pipe_

[Mesa-dev] [PATCH 03/15] gallium: add new numeric types to pipe_query_result v2

2014-07-09 Thread Samuel Pitoiset
This will be used by GL_AMD_performance_monitor. V2: - add 'uint32_t u32' - rename 'float f32' to 'float f' - add some comments Signed-off-by: Samuel Pitoiset --- src/gallium/include/pipe/p_defines.h | 8 1 file changed, 8 insertions(+) diff --

[Mesa-dev] [PATCH 01/15] gallium: add pipe_screen::get_driver_query_group_info v2

2014-07-09 Thread Samuel Pitoiset
/pipe_context/pipe_screen in the commit msg - rewrite commit message Signed-off-by: Samuel Pitoiset --- src/gallium/docs/source/screen.rst | 10 ++ src/gallium/include/pipe/p_defines.h | 7 +++ src/gallium/include/pipe/p_screen.h | 11 +++ 3 files changed, 28 insertions(+) diff

[Mesa-dev] [PATCH 02/15] gallium: add new fields to pipe_driver_query_info v2

2014-07-09 Thread Samuel Pitoiset
According to the spec of GL_AMD_performance_monitor, valid type values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT. This also introduces the new field group_id in order to categorize queries into groups. V2: - add pipe_driver_query_type enum Signed-off-by: Samuel

[Mesa-dev] [PATCH 05/15] gallium: make pipe_context::begin_query return a boolean

2014-07-09 Thread Samuel Pitoiset
This can be used to check if a query is unable to start. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/freedreno/freedreno_query.c| 4 ++-- src/gallium/drivers/freedreno/freedreno_query.h| 2 +- src/gallium/drivers/freedreno/freedreno_query_hw.c | 3 ++- src/gallium/drivers

[Mesa-dev] [PATCH 14/15] nvc0: make begin_query return false when all MP counters are used v2

2014-07-09 Thread Samuel Pitoiset
V2: - do not return immediately after nvc0_mp_pm_query_end() in order to set the current state of the given query Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 06/15] mesa/st: implement GL_AMD_performance_monitor v4

2014-07-09 Thread Samuel Pitoiset
From: Christoph Bumiller This is based on the original patch of Christoph Bumiller. (source: http://people.freedesktop.org/~chrisbmr/perfmon.diff) Drivers must implement get_driver_query_group_info and get_driver_query_info in order to enable this extension. V2: (Samuel Pitoiset) - fix

[Mesa-dev] [PATCH 13/15] nvc0: expose driver queries with two groups

2014-07-09 Thread Samuel Pitoiset
This adds a new group for MP performance counters and requires to write our own implementation of get_driver_query_group_info. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 52 -- src/gallium/drivers/nouveau/nvc0/nvc0_screen.h | 5

[Mesa-dev] [PATCH 04/15] gallium: replace pipe_driver_query_info::max_value by a union v2

2014-07-09 Thread Samuel Pitoiset
gl_perf_monitor_counter_value Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/hud/hud_driver_query.c| 2 +- src/gallium/drivers/freedreno/freedreno_query.c | 12 ++-- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 8 src/gallium/drivers/radeon

[Mesa-dev] [PATCH 10/15] radeon: implement pipe_screen::get_driver_query_group_info v3

2014-07-09 Thread Samuel Pitoiset
This enables GL_AMD_performance_monitor for radeon. V2: - s/pipe_context/pipe_screen in the commit msg V3: - use util_get_driver_query_group_info Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/radeon/r600_pipe_common.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src

[Mesa-dev] [PATCH 15/15] nvc0: init all default values of pipe_driver_query_info

2014-07-09 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c index fcca1cb..6f9a1e6 100644 --- a

[Mesa-dev] [PATCH 07/15] gallium: add util_get_driver_query_group_info

2014-07-09 Thread Samuel Pitoiset
This generic function will be used to get groups of queries. Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/Makefile.sources | 1 + src/gallium/auxiliary/util/u_query.c | 46 ++ src/gallium/auxiliary/util/u_query.h | 44

[Mesa-dev] [PATCH 12/15] docs: mark GL_AMD_performance_monitor for the 10.3 release

2014-07-09 Thread Samuel Pitoiset
GL_AMD_performance_monitor is supported by nvc0, svga, freedreno and radeon. Signed-off-by: Samuel Pitoiset --- docs/relnotes/10.3.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes/10.3.html b/docs/relnotes/10.3.html index 2e718fc..e73e078 100644 --- a/docs/relnotes/10.3

[Mesa-dev] [PATCH 08/15] svga: implement pipe_screen::get_driver_query_group_info v3

2014-07-09 Thread Samuel Pitoiset
This enables GL_AMD_performance_monitor for svga. V2: - s/pipe_context/pipe_screen in the commit msg V3: - use util_get_driver_query_group_info Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/svga/svga_screen.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src

[Mesa-dev] [PATCH 11/15] nvc0: implement pipe_screen::get_driver_query_group_info v2

2014-07-09 Thread Samuel Pitoiset
This enables GL_AMD_performance_monitor for nvc0. V2: - use util_get_driver_query_group_info Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 10 ++ src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 + src/gallium/drivers/nouveau/nvc0/nvc0_screen.h

[Mesa-dev] [PATCH 09/15] freedreno: implement pipe_screen::get_driver_query_group_info v3

2014-07-09 Thread Samuel Pitoiset
This enables GL_AMD_performance_monitor for freedreno. V2: - s/pipe_context/pipe_screen in the commit msg V3: - use util_get_driver_query_group_info Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/freedreno/freedreno_query.c | 9 + 1 file changed, 9 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 12/15] docs: mark GL_AMD_performance_monitor for the 10.3 release

2014-07-09 Thread Samuel Pitoiset
On 07/09/2014 03:10 PM, Marek Olšák wrote: Also radeonsi, because the query code shared between both drivers. Added, thanks. Marek On Wed, Jul 9, 2014 at 4:34 PM, Samuel Pitoiset wrote: GL_AMD_performance_monitor is supported by nvc0, svga, freedreno and radeon. Signed-off-by: Samuel

Re: [Mesa-dev] [PATCH 08/15] svga: implement pipe_screen::get_driver_query_group_info v3

2014-07-09 Thread Samuel Pitoiset
On 07/09/2014 03:00 PM, Brian Paul wrote: On 07/09/2014 08:34 AM, Samuel Pitoiset wrote: This enables GL_AMD_performance_monitor for svga. V2: - s/pipe_context/pipe_screen in the commit msg V3: - use util_get_driver_query_group_info Signed-off-by: Samuel Pitoiset --- src/gallium

Re: [Mesa-dev] [PATCH 07/15] gallium: add util_get_driver_query_group_info

2014-07-09 Thread Samuel Pitoiset
On 07/09/2014 03:00 PM, Brian Paul wrote: On 07/09/2014 08:34 AM, Samuel Pitoiset wrote: This generic function will be used to get groups of queries. Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/Makefile.sources | 1 + src/gallium/auxiliary/util/u_query.c | 46

Re: [Mesa-dev] [PATCH 06/15] mesa/st: implement GL_AMD_performance_monitor v4

2014-07-09 Thread Samuel Pitoiset
On 07/09/2014 03:00 PM, Brian Paul wrote: In the subject, we usually use "st/mesa:". Okay. On 07/09/2014 08:34 AM, Samuel Pitoiset wrote: From: Christoph Bumiller This is based on the original patch of Christoph Bumiller. (source: http://people.freedesktop.org/~chrisbmr/pe

Re: [Mesa-dev] [PATCH 08/15] svga: implement pipe_screen::get_driver_query_group_info v3

2014-07-09 Thread Samuel Pitoiset
amuel Pitoiset wrote: On 07/09/2014 03:00 PM, Brian Paul wrote: On 07/09/2014 08:34 AM, Samuel Pitoiset wrote: This enables GL_AMD_performance_monitor for svga. V2: - s/pipe_context/pipe_screen in the commit msg V3: - use util_get_driver_query_group_info Signed-off-by: Samuel Pit

Re: [Mesa-dev] [PATCH 08/15] svga: implement pipe_screen::get_driver_query_group_info v3

2014-07-11 Thread Samuel Pitoiset
these constants like that, except if you are really disagree with them. Marek On Thu, Jul 10, 2014 at 12:27 AM, Samuel Pitoiset wrote: On 07/09/2014 09:49 PM, Marek Olšák wrote: If the driver queries are defined as an array, you can also use the Elements macro on the array. For sure, but we

[Mesa-dev] [PATCH 03/15] gallium: add new numeric types to pipe_query_result v2

2014-07-11 Thread Samuel Pitoiset
This will be used by GL_AMD_performance_monitor. V2: - add 'uint32_t u32' - rename 'float f32' to 'float f' - add some comments Signed-off-by: Samuel Pitoiset --- src/gallium/include/pipe/p_defines.h | 8 1 file changed, 8 insertions(+) diff --

[Mesa-dev] [PATCH 04/15] gallium: replace pipe_driver_query_info::max_value by a union v2

2014-07-11 Thread Samuel Pitoiset
gl_perf_monitor_counter_value Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/hud/hud_driver_query.c| 2 +- src/gallium/drivers/freedreno/freedreno_query.c | 12 ++-- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 8 src/gallium/drivers/radeon

[Mesa-dev] [PATCH 07/15] gallium: add util_get_driver_query_group_info v2

2014-07-11 Thread Samuel Pitoiset
This generic function will be used to get groups of queries. V2: - add some comments as request by Brian Paul - put the function name on the next line Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/Makefile.sources | 1 + src/gallium/auxiliary/util/u_query.c | 50

[Mesa-dev] [PATCH 10/15] radeon: implement pipe_screen::get_driver_query_group_info v4

2014-07-11 Thread Samuel Pitoiset
This enables GL_AMD_performance_monitor for radeon. V2: - s/pipe_context/pipe_screen in the commit msg V3: - use util_get_driver_query_group_info V4: - add R600_QUERY_COUNT in r600_pipe_common.h Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/radeon/r600_pipe_common.c | 9

[Mesa-dev] [PATCH 13/15] nvc0: expose driver queries with two groups

2014-07-11 Thread Samuel Pitoiset
This adds a new group for MP performance counters and requires to write our own implementation of get_driver_query_group_info. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 52 -- src/gallium/drivers/nouveau/nvc0/nvc0_screen.h | 5

[Mesa-dev] [PATCH 01/15] gallium: add pipe_screen::get_driver_query_group_info v2

2014-07-11 Thread Samuel Pitoiset
/pipe_context/pipe_screen in the commit msg - rewrite commit message Signed-off-by: Samuel Pitoiset --- src/gallium/docs/source/screen.rst | 10 ++ src/gallium/include/pipe/p_defines.h | 7 +++ src/gallium/include/pipe/p_screen.h | 11 +++ 3 files changed, 28 insertions(+) diff

[Mesa-dev] [PATCH 06/15] st/mesa: implement GL_AMD_performance_monitor v5

2014-07-11 Thread Samuel Pitoiset
From: Christoph Bumiller This is based on the original patch of Christoph Bumiller. (source: http://people.freedesktop.org/~chrisbmr/perfmon.diff) Drivers must implement get_driver_query_group_info and get_driver_query_info in order to enable this extension. V2: (Samuel Pitoiset) - fix

[Mesa-dev] [PATCH 11/15] nvc0: implement pipe_screen::get_driver_query_group_info v3

2014-07-11 Thread Samuel Pitoiset
This enables GL_AMD_performance_monitor for nvc0. V2: - use util_get_driver_query_group_info V3: - use of NVC0_QUERY_DRV_STAT_COUNT instead of a magic number Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 10 ++ src/gallium/drivers/nouveau/nvc0

[Mesa-dev] [PATCH 12/15] docs: mark GL_AMD_performance_monitor for the 10.3 release v2

2014-07-11 Thread Samuel Pitoiset
GL_AMD_performance_monitor is supported by nvc0, svga, freedreno, r600 and radeonsi. V2: - add radeonsi Signed-off-by: Samuel Pitoiset --- docs/relnotes/10.3.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes/10.3.html b/docs/relnotes/10.3.html index 2e718fc..625063d

[Mesa-dev] [PATCH 15/15] nvc0: init all default values of pipe_driver_query_info

2014-07-11 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c index fcca1cb..6f9a1e6 100644 --- a

[Mesa-dev] [PATCH 02/15] gallium: add new fields to pipe_driver_query_info v2

2014-07-11 Thread Samuel Pitoiset
According to the spec of GL_AMD_performance_monitor, valid type values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT. This also introduces the new field group_id in order to categorize queries into groups. V2: - add pipe_driver_query_type enum Signed-off-by: Samuel

[Mesa-dev] GL_AMD_performance_monitor v4

2014-07-11 Thread Samuel Pitoiset
Hello everyone, New version of GL_AMD_performance_monitor (version 4). V2 (global changes): - Fix radeon as pinpointed by Marek - Implement pipe_driver_query_group_info for svga, radeon and freedreno V3 (global changes): - Re-organize the series according to hints of Ilia Mirkin - Documen

[Mesa-dev] [PATCH 14/15] nvc0: make begin_query return false when all MP counters are used v2

2014-07-11 Thread Samuel Pitoiset
V2: - do not return immediately after nvc0_mp_pm_query_end() in order to set the current state of the given query Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 09/15] freedreno: implement pipe_screen::get_driver_query_group_info v4

2014-07-11 Thread Samuel Pitoiset
This enables GL_AMD_performance_monitor for freedreno. V2: - s/pipe_context/pipe_screen in the commit msg V3: - use util_get_driver_query_group_info V4: - add FD_QUERY_COUNT in freedreno_query.h Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/freedreno/freedreno_query.c | 9

[Mesa-dev] [PATCH 08/15] svga: implement pipe_screen::get_driver_query_group_info v4

2014-07-11 Thread Samuel Pitoiset
This enables GL_AMD_performance_monitor for svga. V2: - s/pipe_context/pipe_screen in the commit msg V3: - use util_get_driver_query_group_info V4: - add SVGA_QUERY_COUNT in svga_context.h Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/svga/svga_context.h | 1 + src/gallium

[Mesa-dev] [PATCH 05/15] gallium: make pipe_context::begin_query return a boolean

2014-07-11 Thread Samuel Pitoiset
This can be used to check if a query is unable to start. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/freedreno/freedreno_query.c| 4 ++-- src/gallium/drivers/freedreno/freedreno_query.h| 2 +- src/gallium/drivers/freedreno/freedreno_query_hw.c | 3 ++- src/gallium/drivers

[Mesa-dev] [PATCH] nvc0: Display an error when DRM version is too old to use performance counters

2013-06-20 Thread Samuel Pitoiset
From: Samuel --- src/gallium/drivers/nvc0/nvc0_query.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nvc0/nvc0_query.c b/src/gallium/drivers/nvc0/nvc0_query.c index 75c515a..7fc1ca9 100644 --- a/src/gallium/drivers/nvc0/nvc0_query.c +++ b/src/galli

[Mesa-dev] [PATCH 1/2] [RFC] nvc0: implement compute support for nvc0

2013-07-05 Thread Samuel Pitoiset
THER DEALINGS IN THE SOFTWARE. + * + * Authors: Samuel Pitoiset + */ + +#include "nvc0_context.h" +#include "nvc0_compute.h" + +int +nvc0_screen_compute_setup(struct nvc0_screen *screen, + struct nouveau_pushbuf *push) +{ + struct nouveau_object

[Mesa-dev] [PATCH 2/2] [RFC] nvc0: implement MP performance counters for nvc0:nvc8

2013-07-05 Thread Samuel Pitoiset
--- src/gallium/drivers/nvc0/nvc0_query.c | 413 - src/gallium/drivers/nvc0/nvc0_screen.h | 35 +++ 2 files changed, 440 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/nvc0/nvc0_query.c b/src/gallium/drivers/nvc0/nvc0_query.c index 75c515a..834d2

[Mesa-dev] [PATCH] ac: add missing GLSL_TYPE_FLOAT16 to glsl_base_to_llvm_type()

2019-01-14 Thread Samuel Pitoiset
Fix a crash with dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.float16 Signed-off-by: Samuel Pitoiset --- src/amd/common/ac_nir_to_llvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 5023b96f92d

Re: [Mesa-dev] [PATCH] radv: avoid context rolls when binding graphics pipelines

2019-01-14 Thread Samuel Pitoiset
Did you benchmark? On 1/14/19 5:01 PM, Rhys Perry wrote: It's common in some applications to bind a new graphics pipeline without ending up changing any context registers. This has a pipline have two command buffers: one for setting context registers and one for everything else. The context reg

Re: [Mesa-dev] [PATCH] radv: avoid context rolls when binding graphics pipelines

2019-01-14 Thread Samuel Pitoiset
hange with Dota 2 but I've heard it's cpu-bound. On Mon, 14 Jan 2019 at 16:05, Samuel Pitoiset wrote: Did you benchmark? On 1/14/19 5:01 PM, Rhys Perry wrote: It's common in some applications to bind a new graphics pipeline without ending up changing any context registers. This ha

[Mesa-dev] [PATCH v2] ac: add missing 16-bit types to glsl_base_to_llvm_type()

2019-01-14 Thread Samuel Pitoiset
Fix crashes with dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.*16 v2: - add INT16/UINT16 too - update commit description Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen (v1) --- src/amd/common/ac_nir_to_llvm.c | 5 + 1 file changed, 5 insertions(+) diff

[Mesa-dev] [PATCH] ac/nir: don't trash L1 caches for store operations with writeonly memory

2019-01-15 Thread Samuel Pitoiset
Ported from RadeonSI. Signed-off-by: Samuel Pitoiset --- src/amd/common/ac_nir_to_llvm.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 81a4149c321..bcec66fa107 100644 --- a/src

Re: [Mesa-dev] [PATCH] radv: prevent dirtying of dynamic state when it does not change

2019-01-16 Thread Samuel Pitoiset
I wrote a similar patch in the past but I didn't notice any improvements. Though, as we already check state changes in some other places, I think it's better to be consistent. With the TODO comment removed, patch is: Reviewed-by: Samuel Pitoiset On 1/15/19 10:59 PM, Rhys Perry wr

[Mesa-dev] [PATCH 1/4] radv: remove old_fence parameter from si_cs_emit_write_event_eop()

2019-01-17 Thread Samuel Pitoiset
This parameter is actually useless as the immediate value can always be zero. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 2 +- src/amd/vulkan/radv_private.h| 1 - src/amd/vulkan/radv_query.c | 4 ++-- src/amd/vulkan/si_cmd_buffer.c | 9 - 4 files

[Mesa-dev] [PATCH 2/4] radv: only allocate the GFX9 fence and EOP BOs for the gfx queue

2019-01-17 Thread Samuel Pitoiset
It's invalid to emit a ZPASS_DONE event on the compute queue, and the fence BO is unused on the compute queue (ie. we don't flush CB or DB caches). This saves some space in the upload BO. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 3 ++- 1 file changed, 2

[Mesa-dev] [PATCH 4/4] radv: always pass the GFX9 fence data to si_cs_emit_cache_flush()

2019-01-17 Thread Samuel Pitoiset
Remove two useless checks. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 11 ++- src/amd/vulkan/si_cmd_buffer.c | 9 ++--- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c

[Mesa-dev] [PATCH 3/4] radv: compute the GFX9 fence VA at allocation time

2019-01-17 Thread Samuel Pitoiset
Instead of doing every time we emit cache flushes. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 12 ++-- src/amd/vulkan/radv_private.h| 3 +-- src/amd/vulkan/si_cmd_buffer.c | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/amd

[Mesa-dev] [PATCH 1/4] radv: drop unused code related to 16 sample locations

2019-01-17 Thread Samuel Pitoiset
The driver only supports up to 8 sample locations. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_device.c | 2 -- src/amd/vulkan/radv_meta_resolve.c | 8 src/amd/vulkan/radv_nir_to_llvm.c | 3 --- 3 files changed, 13 deletions(-) diff --git a/src/amd/vulkan

[Mesa-dev] [PATCH 4/4] radv: initialize the per-queue descriptor BO only once

2019-01-17 Thread Samuel Pitoiset
Totally useless to write the descriptors inside the loop. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_device.c | 47 ++-- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index

[Mesa-dev] [PATCH 2/4] radv: reduce size of the per-queue descriptor BO

2019-01-17 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index b2112a6ed34..488ed0b6225 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan

[Mesa-dev] [PATCH 3/4] radv: do not write unused descriptors to the per-queue BO

2019-01-17 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_device.c | 252 ++- 1 file changed, 128 insertions(+), 124 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 488ed0b6225..0bb2dcdcc20 100644 --- a/src/amd/vulkan

[Mesa-dev] [PATCH] radv: try to select better export formats for chips without Rb+

2019-01-22 Thread Samuel Pitoiset
Max Waves: 12317 -> 12314 (-0.02 %) This helps some Rise Of Tomb Raider shaders, especially when an expcnt instruction is added between two MRT exports. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_pipeline.c | 27 ++- 1 file changed, 22 insertions(+), 5 deleti

[Mesa-dev] [PATCH] radv: improve gathering of load_push_constants with dynamic bindings

2019-01-22 Thread Samuel Pitoiset
ckets that are emitted. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_descriptor_set.c | 3 +++ src/amd/vulkan/radv_descriptor_set.h | 1 + src/amd/vulkan/radv_shader_info.c| 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_descriptor_set.c b/sr

Re: [Mesa-dev] [PATCH] radv: try to select better export formats for chips without Rb+

2019-01-23 Thread Samuel Pitoiset
On 1/22/19 10:50 PM, Bas Nieuwenhuizen wrote: On Tue, Jan 22, 2019 at 4:32 PM Samuel Pitoiset wrote: For some R8 formats, it's useless to export two channels when no alpha blending is used. I assume the CB should automatically clamps its inputs. 29077 shaders in 15096 tests Totals:

[Mesa-dev] [PATCH] radv: fix computing number of user SGPRs for streamout buffers

2019-01-23 Thread Samuel Pitoiset
Streamout buffers are emitted like push constants. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_nir_to_llvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 40812fa7ffb..7f1aa17b0d5 100644 --- a/src

[Mesa-dev] [PATCH 1/3] radv: remove radv_userdata_info::indirect field

2019-01-25 Thread Samuel Pitoiset
Always false. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 2 -- src/amd/vulkan/radv_nir_to_llvm.c | 15 ++- src/amd/vulkan/radv_shader.h | 1 - 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src

[Mesa-dev] [PATCH 3/3] radv: set noalias/dereferenceable LLVM attributes based on param types

2019-01-25 Thread Samuel Pitoiset
Instead of using this useless array_params_mask variable. This should set these two attributes to streamout buffers too. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_nir_to_llvm.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/amd/vulkan

[Mesa-dev] [PATCH 2/3] radv: simplify allocating user SGPRS for descriptor sets

2019-01-25 Thread Samuel Pitoiset
Unnecesary to check the current stages if desc_set_used_mask is used. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_nir_to_llvm.c | 102 ++ 1 file changed, 34 insertions(+), 68 deletions(-) diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan

[Mesa-dev] [RFC PATCH 2/4] radv: gather if shaders load dynamic offsets separately

2019-01-25 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_shader.h | 1 + src/amd/vulkan/radv_shader_info.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 0f049f9a528..09bc5c2d4a9 100644 --- a/src/amd/vulkan/radv_shader.h

[Mesa-dev] [RFC PATCH 3/4] radv: keep track of the number of remaining user SGPRs

2019-01-25 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_nir_to_llvm.c | 4 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index b655e2c2e2c..11417c5991b 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan

[Mesa-dev] [RFC PATCH 1/4] radv: gather more info about push constants

2019-01-25 Thread Samuel Pitoiset
This is needed in order to inline some push constants when possible. This also adds a new helper for initializing the pass. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_nir_to_llvm.c | 2 ++ src/amd/vulkan/radv_private.h | 2 ++ src/amd/vulkan/radv_shader.h | 4 src

[Mesa-dev] [RFC PATCH 4/4] radv: add support for push constants inlining when possible

2019-01-25 Thread Samuel Pitoiset
s: 1464 -> 1509 (3.07 %) Code Size: 8028188 -> 7842040 (-2.32 %) bytes Max Waves: 69580 -> 69655 (0.11 %) Signed-off-by: Samuel Pitoiset --- src/amd/common/ac_nir_to_llvm.c | 23 +++-- src/amd/common/ac_shader_abi.h| 4 ++ src/amd/vulkan/radv_cmd_buffer.c | 78 +

[Mesa-dev] [PATCH] radv: re-enable fast depth clears for 16-bit surfaces on VI

2019-01-28 Thread Samuel Pitoiset
layer of a D16 array texture individually. So it doesn't hit the fast clear path. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta_clear.c | 8 1 file changed, 8 deletions(-) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index b613

Re: [Mesa-dev] [RFC PATCH 1/4] radv: gather more info about push constants

2019-01-28 Thread Samuel Pitoiset
On 1/28/19 5:58 PM, Bas Nieuwenhuizen wrote: On Fri, Jan 25, 2019 at 5:27 PM Samuel Pitoiset wrote: This is needed in order to inline some push constants when possible. This also adds a new helper for initializing the pass. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan

[Mesa-dev] [PATCH 01/19] radv: bail out when no image transitions will be performed

2019-01-29 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 7f7f052986e..5ecaf829cb0 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan

[Mesa-dev] [PATCH 03/19] radv: remove useless MAYBE_UNUSED in CmdBeginRenderPass()

2019-01-29 Thread Samuel Pitoiset
Trivial. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 5ecaf829cb0..dcd20595eeb 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b

[Mesa-dev] [PATCH 02/19] radv: remove unused radv_render_pass_attachment::view_mask

2019-01-29 Thread Samuel Pitoiset
Trivial. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_pass.c| 10 -- src/amd/vulkan/radv_private.h | 1 - 2 files changed, 11 deletions(-) diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c index 3652eb7ce69..3a70006f6bb 100644 --- a/src/amd/vulkan

[Mesa-dev] [PATCH 15/19] radv: accumulate all ingoing external dependencies to the first subpass

2019-01-29 Thread Samuel Pitoiset
In case two or more subpasses declare ingoing external dependencies. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_pass.c | 4 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c index 0a37392322f..08ea2454750 100644 --- a/src/amd

[Mesa-dev] [PATCH 04/19] radv: add radv_cmd_buffer_begin_subpass() helper

2019-01-29 Thread Samuel Pitoiset
To unify some code in BeginRenderPass() and NextSubpass(). Based on Intel ANV driver. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_cmd_buffer.c | 44 +++- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src

[Mesa-dev] [PATCH 00/19] radv: some render pass related changes/cleanups

2019-01-29 Thread Samuel Pitoiset
stuff here and there. Please review, Thanks! Samuel Pitoiset (19): radv: bail out when no image transitions will be performed radv: remove unused radv_render_pass_attachment::view_mask radv: remove useless MAYBE_UNUSED in CmdBeginRenderPass() radv: add radv_cmd_buffer_begin_subpass() helper

<    2   3   4   5   6   7   8   9   10   11   >