[Mesa-dev] [PATCH 00/22] i965/gen7: Initial geometry shader support, part 2

Paul Berry stereotype441 at gmail.com
Mon Aug 26 15:12:31 PDT 2013


This is a re-spin of patches 23-30 of my series "i965/gen7: Initial
geometry shader support." from 8/20.  Based on code review, I've made
the following changes:

- Rather than using "vec4_gs" to refer to the new user-programmable
  geometry shader functionality, and "gs" to refer to the old
  fixed-function stuff, we use "gs" to refer to the user-programmable
  geometry shaders and "ff_gs" to refer to the old fixed-function
  stuff.

- The contents of brw->vs and brw->gs are reorganized into three
  categories: brw->vec4, which contains global register allocation
  data structures that are shared between VS and GS,
  brw->{vs,gs}->base, which contains the the data that needs to be
  replicated between VS and GS, and brw->{vs,gs}->prog_data, which is
  different between VS and GS.

- The existing state atoms brw_vs_pull_constants,
  brw_vs_binding_table, gen6_vs_push_constants, brw_texture_surfaces,
  and gen7_vs_state are all refactored into general-purpose functions
  that implement functionality that is shared between vs and gs, and
  special-purpose functions that are vs-specific.  This makes it a lot
  simpler to add gs versions of all of these state atoms.

- I believe the code for setting up the sampler state is now correct
  (it's largely shared with VS so there's not much to it), but I have
  not yet had a chance to test it.


Once this series is applied, i965/gen7 users should be able to try out
geometry shaders by setting the environment variables:

MESA_GL_VERSION_OVERRIDE=3.2
MESA_GLSL_VERSION_OVERRIDE=150


As before, the following tasks still need to be done:

- Support EndPrimitive()

- Support gl_PrimitiveID (and gl_PrimitiveIDIn)

- Support >64 varying components

- Support new primitive types (e.g. GL_TRIANGLES_ADJACENCY)

- Support built-in variables being used as GS inputs
  (e.g. gl_in[].gl_PointSize)

- A lot more testing


This series is available on branch "gs-phase-3" of
https://github.com/stereotype441/mesa.git.  Additional unfinished
geometry shader work is in branch "gs".  Note that the "gs" branch is
rebased very frequently.


[PATCH 01/22] i965: rename legacy gs structs and functions to ff_gs.
[PATCH 02/22] i965: Rename user-defined gs structs from vec4_gs to gs.
[PATCH 03/22] i965: Move vec4 register allocation data structures to brw->vec4.
[PATCH 04/22] i965/gs: Update defines related to GS surface organization.
[PATCH 05/22] i965: Move data from brw->vs into a base class if gs will also need it.
[PATCH 06/22] i965/gs: Create brw_context::gs structure to track GS program state.
[PATCH 07/22] i965: Make CACHE_NEW_GS_PROG.
[PATCH 08/22] i965/gs: Allocate URB space for use by GS.
[PATCH 09/22] i965/gs: Allocate push constant space for use by GS.
[PATCH 10/22] i965: Make sure constants re-sent after constant buffer reallocation.
[PATCH 11/22] i965: generalize brw_vs_pull_constants in preparation for GS.
[PATCH 12/22] i965/vs: generalize brw_vs_binding_table in preparation for GS.
[PATCH 13/22] i965/gs: Implement support for geometry shader surfaces.
[PATCH 14/22] i965/gs: make the state atom for compiling Gen7 geometry shaders.
[PATCH 15/22] i965/vs: generalize gen6_vs_push_constants in preparation for GS.
[PATCH 16/22] i965: Modify signature to update_texture_surface functions.
[PATCH 17/22] i965/gs: generalize brw_texture_surfaces in preparation for gs.
[PATCH 18/22] i965/gs: add geometry shader support to brw_texture_surfaces.
[PATCH 19/22] i965/gs: Implement support for geometry shader samplers.
[PATCH 20/22] i965/gen7: merge defines for 3DSTATE{VS,GS,WM} dword 2
[PATCH 21/22] i965/gen7: Generalize gen7_vs_state in preparation for GS.
[PATCH 22/22] i965/gs: Add a state atom to set up geometry shader state.


More information about the mesa-dev mailing list