diff options
author | Tim Rowley <[email protected]> | 2017-03-15 11:58:10 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-03-20 18:05:54 -0500 |
commit | 5d0b3b05a28b2e236d3d8aa7b6335b0be4f02eda (patch) | |
tree | f4b7983d240fc02a8125197583334d8cadfb6cb8 /src/gallium/drivers/swr | |
parent | 4ed72758db74943dbc611ef45b180df9fb8f656c (diff) |
swr: [rasterizer codegen] Fix generation of knobs
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r-- | src/gallium/drivers/swr/Makefile.am | 10 | ||||
-rw-r--r-- | src/gallium/drivers/swr/SConscript | 4 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/codegen/gen_backends.py | 2 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/codegen/gen_knobs.py | 2 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py | 2 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/codegen/templates/backend_template.cpp | 3 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder_template.hpp | 3 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/codegen/templates/knobs_template.cpp (renamed from src/gallium/drivers/swr/rasterizer/codegen/templates/knobs.template) | 5 |
8 files changed, 23 insertions, 8 deletions
diff --git a/src/gallium/drivers/swr/Makefile.am b/src/gallium/drivers/swr/Makefile.am index f9fda31c086..771f1a82439 100644 --- a/src/gallium/drivers/swr/Makefile.am +++ b/src/gallium/drivers/swr/Makefile.am @@ -71,19 +71,19 @@ swr_context_llvm.h: rasterizer/codegen/gen_llvm_types.py swr_context.h --input $(srcdir)/swr_context.h \ --output swr_context_llvm.h -rasterizer/codegen/gen_knobs.cpp: rasterizer/codegen/gen_knobs.py rasterizer/codegen/knob_defs.py rasterizer/codegen/templates/knobs.template +rasterizer/codegen/gen_knobs.cpp: rasterizer/codegen/gen_knobs.py rasterizer/codegen/knob_defs.py rasterizer/codegen/templates/knobs_template.cpp $(MKDIR_GEN) $(PYTHON_GEN) \ $(srcdir)/rasterizer/codegen/gen_knobs.py \ - --input $(srcdir)/rasterizer/codegen/templates/knobs.template \ + --input $(srcdir)/rasterizer/codegen/templates/knobs_template.cpp \ --output rasterizer/codegen/gen_knobs.cpp \ --gen_cpp -rasterizer/codegen/gen_knobs.h: rasterizer/codegen/gen_knobs.py rasterizer/codegen/knob_defs.py rasterizer/codegen/templates/knobs.template +rasterizer/codegen/gen_knobs.h: rasterizer/codegen/gen_knobs.py rasterizer/codegen/knob_defs.py rasterizer/codegen/templates/knobs_template.cpp $(MKDIR_GEN) $(PYTHON_GEN) \ $(srcdir)/rasterizer/codegen/gen_knobs.py \ - --input $(srcdir)/rasterizer/codegen/templates/knobs.template \ + --input $(srcdir)/rasterizer/codegen/templates/knobs_template.cpp \ --output rasterizer/codegen/gen_knobs.h \ --gen_h @@ -258,7 +258,7 @@ EXTRA_DIST = \ rasterizer/codegen/mako/runtime.py \ rasterizer/codegen/mako/template.py \ rasterizer/codegen/mako/util.py \ - rasterizer/codegen/templates/knobs.template \ + rasterizer/codegen/templates/knobs_template.cpp \ rasterizer/codegen/templates/ar_event_h.template \ rasterizer/codegen/templates/ar_event_cpp.template \ rasterizer/codegen/templates/ar_eventhandler_h.template \ diff --git a/src/gallium/drivers/swr/SConscript b/src/gallium/drivers/swr/SConscript index 6e228f43154..754e6784f2e 100644 --- a/src/gallium/drivers/swr/SConscript +++ b/src/gallium/drivers/swr/SConscript @@ -51,14 +51,14 @@ swrroot = '#src/gallium/drivers/swr/' env.CodeGenerate( target = 'rasterizer/codegen/gen_knobs.cpp', script = swrroot + 'rasterizer/codegen/gen_knobs.py', - source = 'rasterizer/codegen/templates/knobs.template', + source = 'rasterizer/codegen/templates/knobs_template.cpp', command = python_cmd + ' $SCRIPT --input $SOURCE --output $TARGET --gen_cpp' ) env.CodeGenerate( target = 'rasterizer/codegen/gen_knobs.h', script = swrroot + 'rasterizer/codegen/gen_knobs.py', - source = 'rasterizer/codegen/templates/knobs.template', + source = 'rasterizer/codegen/templates/knobs_template.cpp', command = python_cmd + ' $SCRIPT --input $SOURCE --output $TARGET --gen_h' ) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/gen_backends.py b/src/gallium/drivers/swr/rasterizer/codegen/gen_backends.py index d6367ca73f1..c889ea5816e 100644 --- a/src/gallium/drivers/swr/rasterizer/codegen/gen_backends.py +++ b/src/gallium/drivers/swr/rasterizer/codegen/gen_backends.py @@ -103,6 +103,7 @@ def main(args=sys.argv[1:]): write_template_to_file( templateCpp, baseCppName % str(fileNum), + cmdline=sys.argv, fileNum=fileNum, funcList=chunkedList[fileNum]) @@ -114,6 +115,7 @@ def main(args=sys.argv[1:]): write_template_to_file( templateCmake, cmakeFile, + cmdline=sys.argv, numFiles=numFiles, baseCppName=baseCppName.replace('\\','/')) diff --git a/src/gallium/drivers/swr/rasterizer/codegen/gen_knobs.py b/src/gallium/drivers/swr/rasterizer/codegen/gen_knobs.py index 225082e7882..50afdcdd10c 100644 --- a/src/gallium/drivers/swr/rasterizer/codegen/gen_knobs.py +++ b/src/gallium/drivers/swr/rasterizer/codegen/gen_knobs.py @@ -62,6 +62,7 @@ def main(args=sys.argv[1:]): if args.gen_h: write_template_to_file(args.input, args.output, + cmdline=sys.argv, filename='gen_knobs', knobs=knob_defs.KNOBS, includes=['core/knobs_init.h', 'common/os.h', 'sstream', 'iomanip'], @@ -70,6 +71,7 @@ def main(args=sys.argv[1:]): if args.gen_cpp: write_template_to_file(args.input, args.output, + cmdline=sys.argv, filename='gen_knobs', knobs=knob_defs.KNOBS, includes=['core/knobs_init.h', 'common/os.h', 'sstream', 'iomanip'], diff --git a/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py b/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py index 202dadaeeab..cfd63942dc1 100644 --- a/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py +++ b/src/gallium/drivers/swr/rasterizer/codegen/gen_llvm_ir_macros.py @@ -218,6 +218,7 @@ def generate_gen_h(functions, output_dir): write_template_to_file( template, output_filename, + cmdline=sys.argv, comment='Builder IR Wrappers', filename=filename, functions=templfuncs, @@ -244,6 +245,7 @@ def generate_x86_h(output_dir): write_template_to_file( template, output_filename, + cmdline=sys.argv, comment='x86 intrinsics', filename=filename, functions=functions, diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/backend_template.cpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/backend_template.cpp index bb770fa7790..4eb4ad4f2b3 100644 --- a/src/gallium/drivers/swr/rasterizer/codegen/templates/backend_template.cpp +++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/backend_template.cpp @@ -26,6 +26,9 @@ // // DO NOT EDIT // +// Generation Command Line: +// ${'\n// '.join(cmdline)} +// //============================================================================ #include "core/backend.h" diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder_template.hpp b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder_template.hpp index 6a56eb11573..2e957581ac4 100644 --- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder_template.hpp +++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder_template.hpp @@ -26,6 +26,9 @@ // // DO NOT EDIT // +// Generation Command Line: +// ${'\n// '.join(cmdline)} +// //============================================================================ #pragma once diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/knobs.template b/src/gallium/drivers/swr/rasterizer/codegen/templates/knobs_template.cpp index 1ae45e52e74..99294d2290e 100644 --- a/src/gallium/drivers/swr/rasterizer/codegen/templates/knobs.template +++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/knobs_template.cpp @@ -24,7 +24,7 @@ %>/****************************************************************************** * -* Copyright 2015-2016 +* Copyright 2015-2017 * Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,6 +49,9 @@ * * ======================= AUTO GENERATED: DO NOT EDIT !!! ==================== * +* Generation Command Line: +* ${'\n* '.join(cmdline)} +* ******************************************************************************/ %if gen_header: #pragma once |