Quellcode durchsuchen

llvmpipe: add debug option to enable OpenCL support.

LP_DEBUG=cl will enable CL support for now.

Acked-by: Roland Scheidegger <sroland@vmware.com>
master
Dave Airlie vor 6 Jahren
Ursprung
Commit
c8042c289e
2 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 1
    0
      src/gallium/drivers/llvmpipe/lp_debug.h
  2. 4
    2
      src/gallium/drivers/llvmpipe/lp_screen.c

+ 1
- 0
src/gallium/drivers/llvmpipe/lp_debug.h Datei anzeigen

#define DEBUG_FS 0x8000 #define DEBUG_FS 0x8000
#define DEBUG_CS 0x10000 #define DEBUG_CS 0x10000
#define DEBUG_TGSI_IR 0x20000 #define DEBUG_TGSI_IR 0x20000
#define DEBUG_CL 0x40000


/* Performance flags. These are active even on release builds. /* Performance flags. These are active even on release builds.
*/ */

+ 4
- 2
src/gallium/drivers/llvmpipe/lp_screen.c Datei anzeigen

{ "fs", DEBUG_FS, NULL }, { "fs", DEBUG_FS, NULL },
{ "cs", DEBUG_CS, NULL }, { "cs", DEBUG_CS, NULL },
{ "tgsi_ir", DEBUG_TGSI_IR, NULL }, { "tgsi_ir", DEBUG_TGSI_IR, NULL },
{ "cl", DEBUG_CL, NULL },
DEBUG_NAMED_VALUE_END DEBUG_NAMED_VALUE_END
}; };
#endif #endif
{ {
switch(shader) switch(shader)
{ {
case PIPE_SHADER_FRAGMENT:
case PIPE_SHADER_COMPUTE: case PIPE_SHADER_COMPUTE:
if ((LP_DEBUG & DEBUG_CL) && param == PIPE_SHADER_CAP_SUPPORTED_IRS)
return (1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_NIR_SERIALIZED);
case PIPE_SHADER_FRAGMENT:
if (param == PIPE_SHADER_CAP_PREFERRED_IR) { if (param == PIPE_SHADER_CAP_PREFERRED_IR) {
struct llvmpipe_screen *lscreen = llvmpipe_screen(screen); struct llvmpipe_screen *lscreen = llvmpipe_screen(screen);
if (lscreen->use_tgsi) if (lscreen->use_tgsi)
else else
return PIPE_SHADER_IR_NIR; return PIPE_SHADER_IR_NIR;
} }

switch (param) { switch (param) {
default: default:
return gallivm_get_shader_param(param); return gallivm_get_shader_param(param);

Laden…
Abbrechen
Speichern