tools/null_state_gen: Add copyrights
PATCH 1/6 tools/null_state_gen: Add copyrights
to files where they were missing.
--- tools/null_state_gen/intel_null_state_gen.c | 27 +++++++++++++++++++++++++++ tools/null_state_gen/intel_renderstate_gen6.c | 26 ++++++++++++++++++++++++++ tools/null_state_gen/intel_renderstate_gen7.c | 9 +++++---- tools/null_state_gen/intel_renderstate_gen8.c | 26 ++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 4 deletions(-)
tools/null_state_gen/intel_null_state_gen.c +27 -0
@@ -1,3 +1,30 @@ +/* +* Copyright © 2014 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +* +* Authors: +* Mika Kuoppala <[email protected]> +* Armin Reese <[email protected]> +*/ +#include <stdio.h> #include <stdlib.h> #include <errno.h>
tools/null_state_gen/intel_renderstate_gen6.c +26 -0
@@ -1,3 +1,29 @@ +/* +* Copyright © 2014 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +* +* Authors: +* Mika Kuoppala <[email protected]> +*/ +#include "intel_batchbuffer.h" #include <lib/gen6_render.h> #include <lib/intel_reg.h>
tools/null_state_gen/intel_renderstate_gen7.c +5 -4
@@ -17,16 +17,17 @@* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -* IN THE SOFTWARE. +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +* +* Authors: +* Mika Kuoppala <[email protected]> */ -#include "intel_batchbuffer.h" #include <lib/gen7_render.h> #include <lib/intel_reg.h> #include <string.h> -#include <stdio.h> static const uint32_t ps_kernel[][4 ] = { {0x0080005a ,0x2e2077bd ,0x000000c0 ,0x008d0040 },
tools/null_state_gen/intel_renderstate_gen8.c +26 -0
@@ -1,3 +1,29 @@ +/* +* Copyright © 2014 Intel Corporation +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +* +* Authors: +* Mika Kuoppala <[email protected]> +*/ +#include "intel_batchbuffer.h" #include <lib/gen8_render.h> #include <lib/intel_reg.h>
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/6 tools/null_state_gen: Add more debug output
Be more verbose about the state size we generate.
--- tools/null_state_gen/intel_null_state_gen.c | 36 ++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-)
tools/null_state_gen/intel_null_state_gen.c +28 -8
@@ -32,8 +32,6 @@#include "intel_batchbuffer.h" -#define STATE_ALIGN 64 -extern int gen6_setup_null_render_state (struct intel_batchbuffer *batch);extern int gen7_setup_null_render_state (struct intel_batchbuffer *batch);extern int gen8_setup_null_render_state (struct intel_batchbuffer *batch);
@@ -47,36 +45,52 @@ static void print_usage(char *s) s); } +/* Creates the intel_renderstate_genX.c file for the particular +* GEN product +*/ static int print_state (int gen,struct intel_batchbuffer *batch) {int i; +unsigned long cmds; + +fprintf (stderr,"Generating for gen%d\n" , gen);printf ("#include \"intel_renderstate.h\"\n\n" ); +/* Relocation offsets. These are byte offsets in the golden context +* batch buffer where the BB graphics address will be added to +* the indirect state offset already stored in those locations. The +* resulting value will inform the GPU where the indirect states are. +*/ printf ("static const u32 gen%d_null_state_relocs[] = {\n" , gen);for (i =0 ; i < batch->cmds->num_items; i++) {if (intel_batch_is_reloc (batch, i))printf ("\t0x%08x,\n" , i *4 ); } -printf ("\t%d,\n" ,-1 ); -printf ("};\n\n" ); +printf ("\t-1,\n};\n\n" ); +/* GPU commands to execute to set up the RCS golden state. This +* state will become the default config. +*/ printf ("static const u32 gen%d_null_state_batch[] = {\n" , gen);for (i =0 ; i <intel_batch_num_cmds (batch); i++) { +const int offset = i *4 ;const struct bb_item *cmd =intel_batch_cmd_get (batch, i);printf ("\t0x%08x," , cmd->data);if (debug) -printf ("\t /* 0x%08x %s '%s' */" , i *4 , -intel_batch_type_as_str (cmd), cmd->str); +printf ("\t /* 0x%08x %s '%s' */" , offset, +intel_batch_type_as_str (cmd), cmd->str); -if (i *4 == batch->cmds_end_offset) +if (offset == batch->cmds_end_offset) { + cmds = i +1 ;printf ("\t /* cmds end */" ); + }if (intel_batch_is_reloc (batch, i))printf ("\t /* reloc */" ); -if (i *4 == batch->state_start_offset) +if (offset == batch->state_start_offset)printf ("\t /* state start */" );if (i ==intel_batch_num_cmds (batch) -1 )
@@ -87,9 +101,15 @@ static int print_state(int gen, struct intel_batchbuffer *batch)printf ("};\n\nRO_RENDERSTATE(%d);\n" , gen); +fprintf (stderr,"Commands %lu (%lu bytes)\n" , cmds, cmds *4 ); +fprintf (stderr,"State %lu (%lu bytes)\n" , batch->state->num_items, batch->state->num_items *4 ); +fprintf (stderr,"Total %lu (%lu bytes)\n" , batch->cmds->num_items, batch->cmds->num_items *4 ); +fprintf (stderr,"\n" ); +return 0 ; } +/* Selects generator function for the given product and executes it. */ static int do_generate (int gen) {struct intel_batchbuffer *batch;
Signature · 1 line
1.9.1
PATCH 3/6 tools/null_state_gen: Limit the total state len to 4096 bytes
In reply to Mika KuoppalaCurrently our kernel side buffer object is only one page. Limit the amount of dwords to 1024 to enforce this.
--- tools/null_state_gen/intel_batchbuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/null_state_gen/intel_batchbuffer.h +1 -1
@@ -34,7 +34,7 @@#include <stdint.h> #define MAX_RELOCS 64 -#define MAX_ITEMS 4096 +#define MAX_ITEMS 1024#define MAX_STRLEN 256#define ALIGN (x, y) (((x) + (y)-1) & ~((y)-1))
Signature · 1 line
1.9.1
PATCH 4/6 tools/null_state_gen: Add macro to emit commands with null state
In reply to Mika KuoppalaIn null/golden context there are multiple state commands where the actual state is always zero. For more compact batch representation add a macro which just emits command and the rest of the state as zero.
v2: - Be more verbose about length bias (Bradley Volkin)
- strip out unrelated state_offset declaration (Bradley Volkin)
--- tools/null_state_gen/intel_batchbuffer.c | 15 +++++++++++++++ tools/null_state_gen/intel_batchbuffer.h | 7 +++++++ 2 files changed, 22 insertions(+)
tools/null_state_gen/intel_batchbuffer.c +15 -0
@@ -274,3 +274,18 @@ const char *intel_batch_type_as_str(const struct bb_item *item)return "UNKNOWN" ; } + +void intel_batch_cmd_emit_null (struct intel_batchbuffer *batch, +const int cmd,const int len,const int len_bias, +const char *str) +{ +int i; + +assert (len >1 ); +assert ((len - len_bias) >=0 ); + +bb_area_emit (batch->cmds, (cmd | (len - len_bias)),CMD , str); + +for (i = len_bias-1 ; i < len; i++) +OUT_BATCH (0 ); +}
tools/null_state_gen/intel_batchbuffer.h +7 -0
@@ -69,6 +69,9 @@ struct intel_batchbuffer {struct intel_batchbuffer *intel_batchbuffer_create (void ); +#define OUT_CMD_B (cmd, len, bias) intel_batch_cmd_emit_null(batch, (cmd), (len), (bias), #cmd " " #len) +#define OUT_CMD (cmd, len) OUT_CMD_B(cmd, len, 2) +#define OUT_BATCH (d) bb_area_emit(batch->cmds, d, CMD, #d)#define OUT_BATCH_STATE_OFFSET (d) bb_area_emit(batch->cmds, d, STATE_OFFSET, #d)#define OUT_RELOC (batch, read_domain, write_domain, d) bb_area_emit(batch->cmds, d, RELOC, #d)
@@ -94,4 +97,8 @@ const char *intel_batch_type_as_str(const struct bb_item *item);void bb_area_emit (struct bb_area *a,uint32_t dword,item_type type,const char *str);void bb_area_emit_offset (struct bb_area *a,unsigned i,uint32_t dword,item_type type,const char *str); +void intel_batch_cmd_emit_null (struct intel_batchbuffer *batch, +const int cmd, +const int len,const int len_bias, +const char *str);#endif
Signature · 1 line
1.9.1
PATCH 5/6 tools/null_state_gen: Add Gen8 golden state
In reply to Mika KuoppalaPreviously we didn't have a clear understanding what is necessary for a pipeline state to be properly initialized. So we had to improvise and use a stripped out render copy.
Now we have a more clear understanding so switch out render copy based frankenstate to state we can call golden state.
v2: - export intel_batch_state_offset
- add 3DSTATE_RASTER (Bradley Volkin)
--- lib/gen6_render.h | 5 +- lib/gen8_render.h | 24 + tools/null_state_gen/intel_batchbuffer.h | 2 +- tools/null_state_gen/intel_renderstate_gen8.c | 850 +++++++++----------------- 4 files changed, 305 insertions(+), 576 deletions(-)
lib/gen6_render.h +3 -2
@@ -41,7 +41,7 @@/* These two are BLC and CTG only, not BW or CL */ #define GEN6_3DSTATE_AA_LINE_PARAMS GEN6_3D(3, 1, 0xa)#define GEN6_3DSTATE_GS_SVB_INDEX GEN6_3D(3, 1, 0xb) - +#define GEN6_3DSTATE_MONOFILTER_SIZE GEN6_3D(3, 1, 0x11)#define GEN6_3DPRIMITIVE GEN6_3D(3, 3, 0)#define GEN6_3DSTATE_CLEAR_PARAMS GEN6_3D(3, 1, 0x10)
@@ -91,6 +91,7 @@# define GEN6_3DSTATE_SF_TRI_PROVOKE_SHIFT 29# define GEN6_3DSTATE_SF_LINE_PROVOKE_SHIFT 27# define GEN6_3DSTATE_SF_TRIFAN_PROVOKE_SHIFT 25 +# define GEN6_3DSTATE_SF_VERTEX_SUB_PIXEL_PRECISION_SHIFT 12#define GEN6_3DSTATE_WM GEN6_3D(3, 0, 0x14)/* DW2 */
@@ -303,7 +304,6 @@#define GEN6_EU_ATT_CLR_1 0x8834#define GEN6_EU_RDATA 0x8840 -#define GEN6_PIPE_CONTROL GEN6_3D(3, 2, 0)#define GEN6_3DPRIMITIVE GEN6_3D(3, 3, 0)
@@ -411,6 +411,7 @@/* for GEN6_STATE_BASE_ADDRESS */ #define BASE_ADDRESS_MODIFY (1 << 0) +#define BUFFER_SIZE_MODIFY (1 << 0)/* for GEN6_3DSTATE_PIPELINED_POINTERS */ #define GEN6_GS_DISABLE 0
lib/gen8_render.h +24 -0
@@ -8,6 +8,8 @@#define GEN7_3DSTATE_URB_DS (0x7832 << 16)#define GEN7_3DSTATE_URB_GS (0x7833 << 16) +# define GEN7_WM_LEGACY_DIAMOND_LINE_RASTERIZATION (1 << 26) +#define GEN6_3DSTATE_SCISSOR_STATE_POINTERS GEN6_3D(3, 0, 0xf)#define GEN7_3DSTATE_CLEAR_PARAMS GEN6_3D(3, 0, 0x04)#define GEN7_3DSTATE_DEPTH_BUFFER GEN6_3D(3, 0, 0x05)
@@ -29,6 +31,7 @@#define GEN7_3DSTATE_CONSTANT_GS GEN6_3D(3, 0, 0x16)#define GEN7_3DSTATE_CONSTANT_HS GEN6_3D(3, 0, 0x19)#define GEN7_3DSTATE_CONSTANT_DS GEN6_3D(3, 0, 0x1a) +#define GEN7_3DSTATE_CONSTANT_PS GEN6_3D(3, 0, 0x17)#define GEN7_3DSTATE_HS GEN6_3D(3, 0, 0x1b)#define GEN7_3DSTATE_TE GEN6_3D(3, 0, 0x1c)#define GEN7_3DSTATE_DS GEN6_3D(3, 0, 0x1d)
@@ -44,6 +47,12 @@# define GEN8_RASTER_FRONT_WINDING_CCW (1 << 21)# define GEN8_RASTER_CULL_NONE (1 << 16)#define GEN7_3DSTATE_PS GEN6_3D(3, 0, 0x20) +# define GEN7_PS_SPF_MODE (1 << 31) + +# define GEN7_SF_POINT_WIDTH_FROM_SOURCE (1 << 11) + +# define GEN7_VS_FLOATING_POINT_MODE_ALTERNATE (1 << 16) +#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP \ GEN6_3D(3, 0, 0x21)#define GEN8_3DSTATE_PS_BLEND GEN6_3D(3, 0, 0x4d)
@@ -68,14 +77,26 @@#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS GEN6_3D(3, 0, 0x2e)#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS GEN6_3D(3, 0, 0x2f) +#define GEN8_3DSTATE_VF GEN6_3D(3, 0, 0x0c)#define GEN8_3DSTATE_VF_TOPOLOGY GEN6_3D(3, 0, 0x4b) +#define GEN8_3DSTATE_BIND_TABLE_POOL_ALLOC GEN6_3D(3, 1, 0x19) +#define GEN8_3DSTATE_GATHER_POOL_ALLOC GEN6_3D(3, 1, 0x1a) +#define GEN8_3DSTATE_DX9_CONSTANT_BUFFER_POOL_ALLOC GEN6_3D(3, 1, 0x1b)#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS GEN6_3D(3, 1, 0x12)#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS GEN6_3D(3, 1, 0x13)#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS GEN6_3D(3, 1, 0x14)#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS GEN6_3D(3, 1, 0x15)#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS GEN6_3D(3, 1, 0x16) +#define GEN8_3DSTATE_VF_SGVS GEN6_3D(3, 0, 0x4a) +#define GEN8_3DSTATE_SO_DECL_LIST GEN6_3D(3, 1, 0x17) +#define GEN8_3DSTATE_SO_BUFFER GEN6_3D(3, 1, 0x18) +#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET GEN6_3D(3, 1, 0x06) +#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN GEN6_3D(3, 1, 0x07) +#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0 GEN6_3D(3, 1, 0x02) +#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1 GEN6_3D(3, 1, 0x0c) +/* Some random bits that we care about */ #define GEN7_VB0_BUFFER_ADDR_MOD_EN (1 << 14)#define GEN7_3DSTATE_PS_PERSPECTIVE_PIXEL_BARYCENTRIC (1 << 11)
@@ -84,6 +105,9 @@/* Random shifts */ #define GEN8_3DSTATE_PS_MAX_THREADS_SHIFT 23 +/* STATE_BASE_ADDRESS state size in pages*/ +#define GEN8_STATE_SIZE_PAGES (x) ((x) << 12) +/* Shamelessly ripped from mesa */ struct gen8_surface_state {
tools/null_state_gen/intel_batchbuffer.h +1 -1
@@ -84,7 +84,7 @@ uint32_t intel_batch_state_copy(struct intel_batchbuffer *batch, void *d, unsign const char *name);uint32_t intel_batch_state_alloc (struct intel_batchbuffer *batch,unsigned bytes,unsigned align,const char *name); - +uint32_t intel_batch_state_offset (struct intel_batchbuffer *batch,unsigned align);unsigned intel_batch_num_cmds (struct intel_batchbuffer *batch);struct bb_item *intel_batch_cmd_get (struct intel_batchbuffer *batch,unsigned i);
tools/null_state_gen/intel_renderstate_gen8.c +277 -573
985 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 6/6 tools/null_state_gen: Add GEN9 golden context batch buffer creation
In reply to Mika KuoppalaFrom: Armin Reese <[email protected]>
Modifications to 'null_state_gen' so it can generate GEN9 golden context batch buffer source for SKL.
v2: - rebased on top of gen8 changes (Mika)
- fixed state base address command size (Mika)
- base address size macro as pages (Mika)
v3: - rebased on top of current master (Mika)
- removed obsolete #includes (Mika)
- added copyright (Mika)
- render and component packing added (Mika)
--- lib/gen9_render.h | 2 + tools/null_state_gen/Makefile.am | 3 +- tools/null_state_gen/intel_null_state_gen.c | 8 +- tools/null_state_gen/intel_renderstate_gen9.c | 477 ++++++++++++++++++++++++++ 4 files changed, 487 insertions(+), 3 deletions(-) create mode 100644 tools/null_state_gen/intel_renderstate_gen9.c
lib/gen9_render.h +2 -0
@@ -4,6 +4,7 @@#include "gen8_render.h" #define GEN7_3DSTATE_VF GEN6_3D(3, 0, 0x0c) +#define GEN9_3DSTATE_COMPONENT_PACKING GEN6_3D(3, 0, 0x55)#define GEN9_SBE_ACTIVE_COMPONENT_NONE 0#define GEN9_SBE_ACTIVE_COMPONENT_XY 1
@@ -11,5 +12,6 @@#define GEN9_SBE_ACTIVE_COMPONENT_XYZW 3#define GEN9_PIPELINE_SELECTION_MASK (3 << 8) +#define GEN9_PIPELINE_SELECT (GEN6_3D(1, 1, 4) | (3 << 8))#endif
tools/null_state_gen/Makefile.am +2 -1
@@ -8,9 +8,10 @@ intel_null_state_gen_SOURCES = \ intel_renderstate_gen6.c \ intel_renderstate_gen7.c \ intel_renderstate_gen8.c \ + intel_renderstate_gen9.c \ intel_null_state_gen.c -gens := 6 7 8 +gens := 6 7 8 9 h = /tmp/intel_renderstate_gen$$gen.c state_headers: intel_null_state_gen
tools/null_state_gen/intel_null_state_gen.c +6 -2
@@ -35,14 +35,15 @@extern int gen6_setup_null_render_state (struct intel_batchbuffer *batch);extern int gen7_setup_null_render_state (struct intel_batchbuffer *batch);extern int gen8_setup_null_render_state (struct intel_batchbuffer *batch); +extern int gen9_setup_null_render_state (struct intel_batchbuffer *batch);static int debug =0 ;static void print_usage (char *s) {fprintf (stderr,"%s: <gen>\n" -" gen: gen to generate for (6,7,8)\n" , - s); +" gen: gen to generate for (6,7,8,9)\n" , + s); }/* Creates the intel_renderstate_genX.c file for the particular
@@ -132,6 +133,9 @@ static int do_generate(int gen)case 8 : null_state_gen = gen8_setup_null_render_state;break ; +case 9 : + null_state_gen = gen9_setup_null_render_state; +break ; }if (null_state_gen ==NULL ) {
tools/null_state_gen/intel_renderstate_gen9.c new file +477 -0
477 lines not on this page · raw message
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 6/6] tools/null_state_gen: Add GEN9 golden context batch buffer creation
Quoted 14 lines · Mika Kuoppala
From: Armin Reese <[email protected]>
Modifications to '
null_state_gen' so it can generate GEN9 golden context batch buffer source for SKL.v2: - rebased on top of gen8 changes (Mika)
- fixed state base address command size (Mika)
- base address size macro as pages (Mika)v3: - rebased on top of current master (Mika)
- removed obsolete #includes (Mika)
- added copyright (Mika)
- render and component packing added (Mika)
Quoted 5 lines
Cc Damien Lespiau <[email protected]>Cc Armin Reese <[email protected]>Cc Volkin, Bradley D <[email protected]>Signed-off-by Armin Reese <[email protected]> (v1)Signed-off-by Mika Kuoppala <[email protected]>
Hi,
This looks really good, I think we should just push it. There was a suggestion to make the null state generator output the copyright notice along with the generated file as well, but that can be done whenever.
Signature · 1 line
Damien
PATCH 1/1 tools/null_state_gen: Add copyright notice to state output
along with info about what generated it.
--- tools/null_state_gen/Makefile.am | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
tools/null_state_gen/Makefile.am +10 -2
@@ -1,3 +1,4 @@ +GPU_TOOLS_PATH := $(top_srcdir) AM_CPPFLAGS = -I$(top_srcdir) noinst_PROGRAMS = intel_null_state_gen
@@ -14,7 +15,14 @@ intel_null_state_gen_SOURCES = \ gens := 6 7 8 9 h = /tmp/intel_renderstate_gen$$gen.c -state_headers: intel_null_state_gen +states: intel_null_state_gen for gen in $(gens); do \ - ./intel_null_state_gen $$gen >$(h) ;\ + head -n 22 intel_null_state_gen.c >$(h); \ + if test -d $(GPU_TOOLS_PATH)/.git; then \ + echo -n " * Generated by: " >>$(h); \ + git describe >>$(h); \ + fi; \ + echo " */" >>$(h); \ + echo "" >>$(h); \ + ./intel_null_state_gen $$gen >>$(h); \ done
Signature · 1 line
1.9.1