diff options
author | Rob Clark <[email protected]> | 2015-07-24 17:06:01 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-07-27 13:51:06 -0400 |
commit | 1b1ef6b4573ab9f21abd5fb374bc74d03390146d (patch) | |
tree | c025b018d0cb1b7dee0bc5dd8e06c40193b2eb73 | |
parent | 810763deb514c3fec41c3e95761de34e6211d291 (diff) |
freedreno/ir3: add stream-output support to cmdline compiler
A bit hard-coded configuration at the moment, but sufficient for now.
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index 68f08486075..ede29f445dc 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c @@ -93,8 +93,7 @@ static void print_usage(void) printf(" --saturate-s MASK - bitmask of samplers to saturate S coord\n"); printf(" --saturate-t MASK - bitmask of samplers to saturate T coord\n"); printf(" --saturate-r MASK - bitmask of samplers to saturate R coord\n"); - printf(" --nocp - disable copy propagation\n"); - printf(" --nir - use NIR compiler\n"); + printf(" --stream-out - enable stream-out (aka transform feedback)\n"); printf(" --help - show this message\n"); } @@ -114,6 +113,9 @@ int main(int argc, char **argv) fd_mesa_debug |= FD_DBG_DISASM; + memset(&s, 0, sizeof(s)); + memset(&v, 0, sizeof(v)); + /* cmdline args which impact shader variant get spit out in a * comment on the first line.. a quick/dirty way to preserve * that info so when ir3test recompiles the shader with a new @@ -170,6 +172,24 @@ int main(int argc, char **argv) continue; } + if (!strcmp(argv[n], "--stream-out")) { + struct pipe_stream_output_info *so = &s.stream_output; + debug_printf(" %s", argv[n]); + /* TODO more dynamic config based on number of outputs, etc + * rather than just hard-code for first output: + */ + so->num_outputs = 1; + so->stride[0] = 4; + so->output[0].register_index = 0; + so->output[0].start_component = 0; + so->output[0].num_components = 4; + so->output[0].output_buffer = 0; + so->output[0].dst_offset = 2; + so->output[0].stream = 0; + n++; + continue; + } + if (!strcmp(argv[n], "--help")) { print_usage(); return 0; @@ -193,10 +213,8 @@ int main(int argc, char **argv) if (!tgsi_text_translate(ptr, toks, Elements(toks))) errx(1, "could not parse `%s'", filename); - memset(&s, 0, sizeof(s)); s.tokens = toks; - memset(&v, 0, sizeof(v)); v.key = key; v.shader = &s; |