mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
r300g: make use of gallium's os_get_process_name()
Lets the code compile on non Linux systems. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Signed-off-by: Marek Olšák <maraeo@gmail.com>
This commit is contained in:
parent
148f0deb06
commit
0b405f364f
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue