History log of /external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2c0d267717d9b01c644864bae945d29e0a6ca881 08-Nov-2016 Timothy Arceri <timothy.arceri@collabora.com> i965: stop passing gl_shader_program to brw_compile_gs() and gen6_gs_visitor()

Instead we caan just use gl_program.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
340b22c217f31330ae3bfaa523b574d98ca53e89 08-Nov-2016 Timothy Arceri <timothy.arceri@collabora.com> i965: eliminate gen6_xfb_enabled field in brw_gs_prog_data

We can just get this information from shader_info instead.

Note that passing gen6_gs_visitor() gl_program via _LinkedShaders
will go away in a later patch.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
700bc94dcebf4257740483d2ba467b138234fa1a 03-Nov-2016 Timothy Arceri <timothy.arceri@collabora.com> mesa/glsl: move LinkedTransformFeedback from gl_shader_program to gl_program

This will help allow us to store gl_program in the CurrentProgram array rather
than gl_shader_program which will allow a bunch of simplifications.

Note that we make LinkedTransformFeedback a pointer so we don't waste
memory creating a struct for each stage. We also store a pointer to
the gl_program that will contain the pointer in gl_shader_program so
we can get easy access to the correct stage.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
f182e5eafc31ebc7c140e9a369d5f747948733ae 17-Oct-2016 Kenneth Graunke <kenneth@whitecape.org> i965/vec4: Handle component qualifiers on non-generic varyings.

ARB_enhanced_layouts only requires component qualifier support for
generic varyings, so this is all the vec4 backend knew how to handle.

This patch extends the backend to handle it for all varyings, so we
can use store_output intrinsics with a component set for things like
clip/cull distances. We may want to use that for other VUE header
fields in the future as well.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
e1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b 13-Oct-2016 Timothy Arceri <timothy.arceri@collabora.com> nir/i965/anv/radv/gallium: make shader info a pointer

When restoring something from shader cache we won't have and don't
want to create a nir_shader this change detaches the two.

There are other advantages such as being able to reuse the
shader info populated by GLSL IR.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
ad175113023ec0f67bf51275d0aac20d9e3ea0b9 02-Mar-2016 Matt Turner <mattst88@gmail.com> i965/gen6/gs: Replace V-immediate with VF-immediate.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
f36993b46962eab4446bc1964eb47149751aee26 23-Nov-2015 Matt Turner <mattst88@gmail.com> i965: Clean up #includes in the compiler.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
f9a9ba5eac2f1934bd7fecc92cd309f22411164b 02-Nov-2015 Matt Turner <mattst88@gmail.com> i965/vec4: Replace src_reg(imm) constructors with brw_imm_*().

Cuts 1.5k of .text.

Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
fac9b21e037f9ce456039fbf35cd5fa573dee229 21-Oct-2015 Jason Ekstrand <jason.ekstrand@intel.com> i965/gs: Pull prog_data out of brw_gs_compile

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
6ac2bbec16d73f0cc58fc520c4165239461c59b3 21-Oct-2015 Jason Ekstrand <jason.ekstrand@intel.com> i965/gs: Use NIR instead of the brw_geometry_program for GS metadata

With this, we can remove the geometry program from brw_gs_compile.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
a23bdd1fae196e91ebfbb4b0c7730652c63a91ea 12-Mar-2015 Kenneth Graunke <kenneth@whitecape.org> i965/gs: Make MAX_GS_INPUT_VERTICES a #define in brw_context.h.

For scalar VS, I'll need this in brw_fs.cpp as well. It seems silly to
redeclare it in three places.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
1efbb8151b402f76df6dbf0b4ed9c2823e3a44fd 23-Sep-2015 Iago Toral Quiroga <itoral@igalia.com> i965/gs/gen6: Maximum allowed size of SEND messages is 15 (4 bits)

Comit d48ac9306619 addressed this for VS, but we forgot to do the same for
URB writes generated by the gen6 GS.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
ea006c4cb5eb2d98d6bfd5a6c32fcae10b636f17 01-Oct-2015 Jason Ekstrand <jason.ekstrand@intel.com> i965: Move binding table setup to codegen time.

Setting up binding tables really has little to do with the actual process
of turning shaders into instructions; it's more part of setting up
prog_data. This commit moves it out of the visitors and with the rest of
the prog_data setup stuff.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
28709e37d96d6b64753ca4dcce5fbfeb75f5b499 01-Oct-2015 Jason Ekstrand <jason.ekstrand@intel.com> i965/shader: Pull assign_common_binding_table_offsets out of backend_shader

This really has nothing to do with the backend compiler and we'd like to
eventually be able to set this up earlier in the compile process.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
1153f12076d121fd0213f58f1953872a60da041d 21-Sep-2015 Jason Ekstrand <jason.ekstrand@intel.com> i965/vec4: Delete the old ir_visitor code

Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
31a36ffbc81a4dd79b91bf0fc59f0e5f8d44dbd7 03-Sep-2015 Kenneth Graunke <kenneth@whitecape.org> i965/gs: Fix extra level of indentation left by the previous commit.

I left a bunch of code indented a level in the previous patch to make
the diff easier to read. But now we should fix that.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
df31c1850d14729e27513ae733110a668f6b6e95 05-Aug-2015 Kenneth Graunke <kenneth@whitecape.org> i965/gs: Use new NIR intrinsics.

By performing the vertex counting in NIR, we're able to elide a ton of
useless safety checks around every EmitVertex() call:

total instructions in shared programs: 3952 -> 3720 (-5.87%)
instructions in affected programs: 3491 -> 3259 (-6.65%)
helped: 11
HURT: 0

Improves performance in Gl32GSCloth by 0.671742% +/- 0.142202% (n=621)
on Haswell GT3e at 1024x768.

This should also make it easier to implement Broadwell's "Static Vertex
Count" feature someday.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
7eced3aa863394c6e74ac3f037ed1cf9c481fe37 13-Jul-2015 Samuel Iglesias Gonsalvez <siglesias@igalia.com> i965/gs/gen6: Refactor ir_emit_vertex and ir_end_primitive for gen6

So the implementation is independent of GLSL IR and the visit methods of the
gen6 GS visitor. This way we will be able to reuse that implementation directly
from the NIR vec4 backend.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
5750595ca97b2f8f18d22af35b431a6c66dd899a 22-Feb-2015 Jordan Justen <jordan.l.justen@intel.com> i965/gen6 gs: Convert brw_imm_ud/brw_imm_d to src_reg

Same idea as this patch, only for gen6_gs_visitor:

commit 49a938a265f5959c9b558995cc658f80acb6eb18
Author: Jordan Justen <jordan.l.justen@intel.com>
Date: Fri Feb 20 12:12:25 2015 -0800
i965/fs: Use fs_reg for CS/VS atomics pixel mask immediate data

Suggested-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
057e6e5251118623242db637dcde4acaef9fed86 22-Nov-2014 Matt Turner <mattst88@gmail.com> i965/gen6/gs: Don't declare a src_reg with struct.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
c66165ab2b15047792808433b788632a4b9df287 01-Aug-2014 Iago Toral Quiroga <itoral@igalia.com> i965/gen6/gs: Fix binding table clash between TF surfaces and textures.

For gen6 geometry shaders we use the first BRW_MAX_SOL_BINDINGS entries of the
binding table for transform feedback surfaces. However, vec4_visitor will
setup the binding table so that textures use the same space in the binding
table. This is done when calling assign_common_binding_table_offsets(0) as
part if its run() method.

To fix this clash we add a virtual method to the vec4_visitor hierarchy to
assign the binding table offsets, so that we can change this behavior
specifically for gen6 geometry shaders by mapping textures right after the
first BRW_MAX_SOL_BINDINGS entries.

Also, when there is no user-provided geometry shader, we only need to upload
the binding table if we have transform feedback, however, in the case of a
user-provided geometry shader, we can't only look into transform feedback
to make that decision.

This fixes multiple piglit tests for textureSize() and texelFetch() when these
functions are called from a geometry shader in gen6, like these:

bin/textureSize gs sampler2D -fbo -auto
bin/texelFetch gs usampler2D -fbo -auto

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
2614cde9981ee3609b8e22d84596603a1bd42212 13-Aug-2014 Iago Toral Quiroga <itoral@igalia.com> i965/gen6/gs: Avoid buffering transform feedback varyings twice.

Currently we buffer transform feedack varyings separately. This patch makes
it so that we reuse the values we have already buffered for all the output
varyings of the geometry shader instead.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
21204434845398de86fb707c78dd5bdd1fb5826f 31-Jul-2014 Samuel Iglesias Gonsalvez <siglesias@igalia.com> i965/gen6/gs: Buffer PSIZ/flags vertex data in gen6_gs_visitor

Since geometry shaders can alter the value of varyings packed in the first
output VUE slot (PSIZ), we need to buffer it together with all the other
vertex data so we can emit the right value for each vertex when we do the
URB writes.

This fixes the following piglit test in gen6:
tests/spec/glsl-1.50/execution/redeclare-pervertex-out-subset-gs.shader_test

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
fda4470944762dddaff249ea36d6e21aa5f8e2ca 18-Jul-2014 Samuel Iglesias Gonsalvez <siglesias@igalia.com> i965/gen6/gs: implement transform feedback support in gen6_gs_visitor

This takes care of generating code required to handle transform feedback.
Notice that transform feedback isn't enabled yet, since that requires
additional setups in other parts of the code that will come in later patches.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
1f77bfce7debe34366942ec441eda38747a47f74 23-Jul-2014 Samuel Iglesias Gonsalvez <siglesias@igalia.com> i965/gen6/gs: Add an additional parameter to the FF_SYNC opcode.

We will use this parameter in later patches to provide information relevant
to transform feedback that needs to be set as part of the FF_SYNC message.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
524ad6b901c3847db9d3528223d4ab2e2f517a1d 24-Jul-2014 Iago Toral Quiroga <itoral@igalia.com> i965/gen6/gs: Implement support for gl_PrimitiveIdIn.

For this we will need to move PrimitiveID information, delivered in the thread
payload in r0.1, to a separate register (we use GS_OPCODE_SET_PRIMITIVE_ID
for this), then map the corresponding varying slot to that register in the
setup_payload() method.

Notice that we cannot use a virtual register as the destination for the
PrimitiveID because we need to map all input attributes to hardware registers
in setup_payload(), which happens before virtual registers are mapped to
hardware registers. We could work around that issue if we were able to compute
the first non-payload register in emit_prolog() and move the PrimitiveID
information to that register, but we can't because at that point we still
don't know the final number uniforms that will be included in the payload.

So, what we do is to place PrimitiveID information in r1, which is always
delivered as part of the payload but its only populated with data
relevant for transform feedback when we set GEN6_GS_SVBI_PAYLOAD_ENABLE
in the 3DSTATE_GS state packet.

When we implement transform feedback, we wil make sure to move the value of r1
to another register before we overwrite it with the PrimitiveID.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
c091804f4cd282bfc03b02a7ef6c72e5f42f6c76 21-Jul-2014 Iago Toral Quiroga <itoral@igalia.com> i965/gen6/gs: Handle the case where a geometry shader emits no output.

In gen6 we need to end the thread differently depending on whether we have
emitted at least one vertex or not. In case we did, the EOT message must
always include the COMPLETE flag or else the GPU hangs. If we have not
produced any output, however, we can't use the COMPLETE flag.

This would lead us to end the program with an ENDIF opcode, which we want
to avoid (and actually is not permitted since it hits an assertion), so
instead what we do is that we always request a new VUE handle every time we do
an URB WRITE, even for the last vertex we emit. With this we make sure that
whether we have emitted at least one vertex or none at all we have to finish the
thread without writing to the URB, which works for both cases by setting the
COMPLETE and UNUSED flags in the EOT message.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
c1b8a5155b4026ac6d0fdeae9afd12e489ef106b 21-Jul-2014 Iago Toral Quiroga <itoral@igalia.com> i965/gen6/gs: Make sure we complete the last primitive.

Just in case the GS algorithm does not call EndPrimitive() for the last
primitive produced. This is relevant only for non point outputs, since for
this we are already setting the PrimEnd flag on each vertex we emit.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
d93ca68666675392e632a5c0f99a33ff25a42e53 18-Jul-2014 Iago Toral Quiroga <itoral@igalia.com> i965/gen6/gs: Implement geometry shaders for outputs other than points.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp
8411bf2c69136efcae594529f16e70ea0a22e271 16-Jul-2014 Iago Toral Quiroga <itoral@igalia.com> i965/gen6/gs: Add initial implementation for a gen6 geometry shader visitor.

Geometry shaders in gen6 are significantly different from gen7+ so it is better
to have them implemented in a different file rather than adding gen6 branching
paths all over brw_vec4_gs_visitor.cpp.

This commit adds an initial implementation that only handles point output, which
is the simplest case.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/gen6_gs_visitor.cpp