From 0b405f364f57245f673f678d73d7180400593489 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Thu, 18 Jul 2013 16:44:25 +1000 Subject: r300g: make use of gallium's os_get_process_name() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lets the code compile on non Linux systems. Signed-off-by: Jonathan Gray Signed-off-by: Marek Olšák --- src/gallium/drivers/r300/r300_chipset.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/r300') diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c index 11061edc590..30e085ac517 100644 --- a/src/gallium/drivers/r300/r300_chipset.c +++ b/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 #include @@ -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; -- cgit v1.2.3