diff options
author | Rob Clark <robclark@freedesktop.org> | 2015-05-23 13:37:41 -0400 |
---|---|---|
committer | Rob Clark <robclark@freedesktop.org> | 2015-06-21 07:53:50 -0400 |
commit | 694beb8b830c993e9bfb744655be3dbd558ab3a8 (patch) | |
tree | dcbfba77214b9ad8e9c7ab9001ffbdaeba1e1315 /src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | |
parent | 5c1e153467a50dec91df49239654017e9ed86d69 (diff) | |
download | external_mesa3d-694beb8b830c993e9bfb744655be3dbd558ab3a8.tar.gz external_mesa3d-694beb8b830c993e9bfb744655be3dbd558ab3a8.tar.bz2 external_mesa3d-694beb8b830c993e9bfb744655be3dbd558ab3a8.zip |
freedreno/ir3: introduce ir3_compiler object
Right now, just provides a cleaner way to get at the gpu-id, given the
separation between compiler and context. But we will need this also to
hold the reg-set for new register allocation.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3_cmdline.c')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index 44493c33c1..3fa886131f 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c @@ -216,6 +216,7 @@ int main(int argc, char **argv) const char *filename; struct tgsi_token toks[65536]; struct tgsi_parse_context parse; + struct ir3_compiler *compiler; struct ir3_shader_variant v; struct ir3_shader_key key = {}; const char *info; @@ -319,8 +320,11 @@ int main(int argc, char **argv) break; } + /* TODO cmdline option to target different gpus: */ + compiler = ir3_compiler_create(320); + info = "NIR compiler"; - ret = ir3_compile_shader_nir(&v, toks, key); + ret = ir3_compile_shader_nir(compiler, &v, toks, key); if (ret) { fprintf(stderr, "compiler failed!\n"); return ret; |