[Mesa-dev] [PATCH] r300g: make use of gallium's os_get_process_name()

Marek Olšák maraeo at gmail.com
Thu Jul 18 05:12:59 PDT 2013


Pushed, thanks.

Marek

On Thu, Jul 18, 2013 at 8:44 AM, Jonathan Gray <jsg at jsg.id.au> wrote:
> Lets the code compile on non Linux systems.
>
> Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> ---
>  src/gallium/drivers/r300/r300_chipset.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git src/gallium/drivers/r300/r300_chipset.c src/gallium/drivers/r300/r300_chipset.c
> index 11061ed..30e085a 100644
> --- src/gallium/drivers/r300/r300_chipset.c
> +++ src/gallium/drivers/r300/r300_chipset.c
> @@ -26,6 +26,7 @@
>
>  #include "util/u_debug.h"
>  #include "util/u_memory.h"
> +#include "os/os_process.h"
>
>  #include <stdio.h>
>  #include <errno.h>
> @@ -47,9 +48,13 @@ static void r300_apply_hyperz_blacklist(struct r300_capabilities* caps)
>          "firefox",
>      };
>      int i;
> +    char proc_name[128];
> +
> +    if (!os_get_process_name(proc_name, sizeof(proc_name)))
> +        return;
>
>      for (i = 0; i < Elements(list); i++) {
> -        if (strcmp(list[i], program_invocation_short_name) == 0) {
> +        if (strcmp(list[i], proc_name) == 0) {
>              caps->zmask_ram = 0;
>              caps->hiz_ram = 0;
>              break;
> --
> 1.8.3.2
>
> _______________________________________________
> 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