[Mesa-dev] [PATCH 0/9] cs: Add gl_NumWorkGroups

Jordan Justen jordan.l.justen at intel.com
Fri Sep 25 15:39:06 PDT 2015


git://people.freedesktop.org/~jljusten/mesa cs-num-work-groups-v1
http://patchwork.freedesktop.org/bundle/jljusten/cs-num-work-groups-v1

I recently sent a piglit patch for the ARB_compute_shader
indirect-compute test: "arb_compute_shader: Use gl_NumWorkGroups in
global ID tests"

These patches allow the arb_compute_shader-indirect-compute test (with
the patch added to piglit) to pass.

To test, I use i965 and set MESA_GL_VERSION_OVERRIDE=4.3,
MESA_GLSL_VERSION_OVERRIDE=430 and
MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader.

Jordan Justen (9):
  mesa/cs: Add MESA_VERBOSE=api support in DispatchCompute*
  i965/cs: Re-emit push constants and cs_state on new batches
  i965/cs: Re-emit cs_state when surfaces have changed
  i965/cs: Store compute invocation information in brw context
  i965/cs: Add a binding table entry for gl_NumWorkGroups
  i965/cs: Setup surface binding for gl_NumWorkGroups
  glsl/cs: Add gl_NumWorkGroups as a system value
  nir: Convert SYSTEM_VALUE_NUM_WORK_GROUPS to a nir intrinsic
  i965/cs: Generate code to load gl_NumWorkGroups

 src/glsl/builtin_variables.cpp                   |  2 +-
 src/glsl/nir/nir.c                               |  4 ++
 src/glsl/nir/nir_intrinsics.h                    |  1 +
 src/glsl/shader_enums.h                          |  1 +
 src/mesa/drivers/dri/i965/brw_compute.c          | 52 +++++++++++++-----------
 src/mesa/drivers/dri/i965/brw_context.h          | 27 +++++++++++-
 src/mesa/drivers/dri/i965/brw_fs.cpp             | 20 +++++++--
 src/mesa/drivers/dri/i965/brw_fs.h               |  3 +-
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp         | 28 +++++++++++++
 src/mesa/drivers/dri/i965/brw_state.h            |  1 +
 src/mesa/drivers/dri/i965/brw_state_upload.c     |  3 ++
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 43 ++++++++++++++++++++
 src/mesa/drivers/dri/i965/gen7_cs_state.c        |  9 ++--
 src/mesa/main/compute.c                          |  7 ++++
 14 files changed, 167 insertions(+), 34 deletions(-)

-- 
2.5.1



More information about the mesa-dev mailing list