diff options
author | Jonathan Marek <[email protected]> | 2018-12-18 20:15:57 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-01-22 14:45:03 +0000 |
commit | 67610a0323ddfe0d7cced121abb43286b862b495 (patch) | |
tree | 994887050ff640f4c2db9f56ec55688d2f1412a4 /src/gallium/drivers/freedreno/freedreno_screen.c | |
parent | da3ca69afadb142c1591c75c2bfd345c8d4337de (diff) |
freedreno: a2xx: NIR backend
This patch replaces the a2xx TGSI compiler with a NIR compiler.
It also adds several new features:
-gl_FrontFacing, gl_FragCoord, gl_PointCoord, gl_PointSize
-control flow (including loops)
-texture related features (LOD/bias, cubemaps)
-filling scalar ALU slot when possible
Signed-off-by: Jonathan Marek <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_screen.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_screen.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 03b358782c1..e59922cba47 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -58,6 +58,7 @@ #include "ir3/ir3_nir.h" +#include "a2xx/ir2.h" /* XXX this should go away */ #include "state_tracker/drm_driver.h" @@ -496,16 +497,9 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen, case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return 16; case PIPE_SHADER_CAP_PREFERRED_IR: - if (is_ir3(screen)) - return PIPE_SHADER_IR_NIR; - return PIPE_SHADER_IR_TGSI; + return PIPE_SHADER_IR_NIR; case PIPE_SHADER_CAP_SUPPORTED_IRS: - if (is_ir3(screen)) { - return (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_TGSI); - } else { - return (1 << PIPE_SHADER_IR_TGSI); - } - return 0; + return (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_TGSI); case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: return 32; case PIPE_SHADER_CAP_SCALAR_ISA: @@ -636,7 +630,7 @@ fd_get_compiler_options(struct pipe_screen *pscreen, if (is_ir3(screen)) return ir3_get_compiler_options(screen->compiler); - return NULL; + return ir2_get_compiler_options(); } boolean |