[Mesa-dev] [PATCH 00/12] RFC: add support of ARB_separate_shader_object extensions V3
Gregory Hainaut
gregory.hainaut at gmail.com
Fri May 3 10:44:04 PDT 2013
Please find an implementation of the ARB_separate_shader_objects extensions. I concentrate
mostly on the state part of the extensions aka the pipeline object. I think GLSL
already compiled program separately anyway.
I test my implementation on the test that I send on piglit mailing list. All tests
are ok but I miss a test for new uniform function. Besides there are still some parts unimplemented:
1/ GLX Protocol: dropped
2/ Display list: would be done later if someone is interested otherwise dropped
Stuff that bug me:
1/ I implement the feature as a pure mesa state. I don't know if they're any rule to create driver functions. Maybe it
would be better to add CreatePipelineObject/DeletePipelineObject/BindPipeline/UseProgramStages. Opinion is welcome
A github branch can be found here (based on v2 but v3 add only comment):
* https://github.com/gregory38/mesa-sso/tree/sso2
V2:
* fix ralloc memory leak
* follow mesa formating rule
* rename Pipeline.PipelineObj to Pipeline.Current
* rename gl_shader_state to gl_pipeline_object
* rebase on current mesa
V3:
* resend properly the patches on the mesa mailing list
* Add minor comment
Note: Rebase done on ac1118d53c0b22db8dcd6fcdcd2d1a245037dbc1
Gregory Hainaut (12):
sso: Create extensions entry points
sso: Add pipeline container/state
sso: add support of GL_PROGRAM_SEPARABLE and CreateShaderProgramv
sso: implement ActiveShaderProgram & GetProgramPipelineiv
sso: replace Shader binding point with _Shader
sso: rename Shader to the pointer _Shader
sso: update meta state
sso: Implement _mesa_UseProgramStages
sso: implement BindProgramPipeline
sso: update glGet: GL_PROGRAM_PIPELINE_BINDING
sso: implement ValidateProgramPipeline and GetProgramPipelineInfoLog
sso: Finally enable the extension on Gallium
src/mapi/glapi/gen/ARB_separate_shader_objects.xml | 401 ++++++++++
src/mapi/glapi/gen/Makefile.am | 1 +
src/mapi/glapi/gen/gl_API.xml | 6 +-
src/mapi/glapi/gen/gl_genexec.py | 1 +
src/mesa/drivers/common/meta.c | 38 +-
src/mesa/drivers/dri/i965/brw_gs.c | 2 +-
src/mesa/drivers/dri/i965/brw_shader.cpp | 4 +-
src/mesa/drivers/dri/i965/brw_vs.c | 4 +-
src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 2 +-
src/mesa/drivers/dri/i965/brw_wm.c | 2 +-
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 +-
src/mesa/drivers/dri/i965/gen6_sol.c | 6 +-
src/mesa/drivers/dri/i965/gen6_vs_state.c | 2 +-
src/mesa/drivers/dri/i965/gen6_wm_state.c | 2 +-
src/mesa/drivers/dri/i965/gen7_sol_state.c | 4 +-
src/mesa/drivers/dri/i965/gen7_vs_state.c | 2 +-
src/mesa/drivers/dri/i965/gen7_wm_state.c | 2 +-
src/mesa/main/api_validate.c | 2 +-
src/mesa/main/context.c | 44 +-
src/mesa/main/extensions.c | 1 +
src/mesa/main/ff_fragment_shader.cpp | 8 +-
src/mesa/main/get.c | 19 +
src/mesa/main/get_hash_params.py | 3 +
src/mesa/main/mtypes.h | 43 +-
src/mesa/main/pipelineobj.c | 834 ++++++++++++++++++++
src/mesa/main/pipelineobj.h | 102 +++
src/mesa/main/shaderapi.c | 252 ++++--
src/mesa/main/shaderapi.h | 10 +-
src/mesa/main/state.c | 14 +-
src/mesa/main/texstate.c | 12 +-
src/mesa/main/transformfeedback.c | 4 +-
src/mesa/main/uniform_query.cpp | 75 +-
src/mesa/main/uniforms.c | 466 ++++++++++-
src/mesa/main/uniforms.h | 86 ++
src/mesa/program/ir_to_mesa.cpp | 12 +-
src/mesa/sources.mak | 1 +
src/mesa/state_tracker/st_atom_clip.c | 2 +-
src/mesa/state_tracker/st_atom_constbuf.c | 4 +-
src/mesa/state_tracker/st_cb_drawpixels.c | 2 +-
src/mesa/state_tracker/st_draw.c | 6 +-
src/mesa/state_tracker/st_extensions.c | 1 +
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
src/mesa/state_tracker/st_program.c | 6 +-
src/mesa/swrast/s_fragprog.c | 2 +-
44 files changed, 2319 insertions(+), 175 deletions(-)
create mode 100644 src/mapi/glapi/gen/ARB_separate_shader_objects.xml
create mode 100644 src/mesa/main/pipelineobj.c
create mode 100644 src/mesa/main/pipelineobj.h
--
1.7.10.4
More information about the mesa-dev
mailing list