Commit Graph

75 Commits

Author SHA1 Message Date
Brian Paul
2900e56f9d mesa: use gl_shader_type enum 2010-11-23 17:00:08 -07:00
Eric Anholt
d348b0c72d mesa: Fix delayed state flagging for EXT_sso-related program changes.
Flushing the vertices after having already updated the state doesn't
do any good.  Fixes useshaderprogram-flushverts-1.  As a side effect,
by moving it to the right place we end up skipping no-op state changes
for traditional glUseProgram.
2010-11-06 11:44:32 -07:00
Eric Anholt
a974949f3b mesa: Make metaops use program refcounts instead of names.
Fixes failure on restoring state when the program was active but
deleted, and the name no longer exists.

Bug #31194
2010-10-29 11:28:38 -07:00
Brian Paul
53eca8d216 mesa: plug in stubs for glBindFragDataLocation(), glGetFragDataLocation() 2010-10-28 21:17:41 -06:00
Ian Romanick
84eba3ef71 Track separate programs for each stage
The assumption is that all stages are the same program or that
varyings are passed between stages using built-in varyings.
2010-10-27 13:35:53 -07:00
Ian Romanick
75c6f47288 mesa: Track an ActiveProgram distinct from CurrentProgram
ActiveProgram is the GL_EXT_separate_shader_objects state variable
used for glUniform calls.  glUseProgram also sets this.
2010-10-27 13:35:53 -07:00
Ian Romanick
c72aa7fa58 mesa: Skeletal support for GL_EXT_separate_shader_objects
Really just filling in the entry points.  None of them do anything
other than validate their inputs.
2010-10-27 13:35:53 -07:00
Ian Romanick
7d8ba5f78f mesa: Clean up various 'unused parameter' warnings in shaderapi 2010-10-13 15:35:23 -07:00
Ian Romanick
ccc1c4c6d9 mesa: Clean up two 'comparison between signed and unsigned' warnings 2010-10-13 15:35:23 -07:00
Ian Romanick
5cb24c4a75 mesa: Refactor validation of shader targets
Actually validate that the implementation supports the particular
shader target as well.  Previously if a driver only supported vertex
shaders, for example, glCreateShaderObjectARB would gladly create a
fragment shader.

NOTE: this is a candidate for the 7.9 branch.
2010-10-13 15:35:18 -07:00
Kristian Høgsberg
f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Ian Romanick
2b70dbfe09 glsl2: Add EmitNoNoise flag, use it to remove noise opcodes 2010-09-09 15:39:52 -07:00
Luca Barbieri
e591c4625c glsl: add several EmitNo* options, and MaxUnrollIterations
This increases the chance that GLSL programs will actually work.

Note that continues and returns are not yet lowered, so linking
will just fail if not supported.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-09-08 20:36:37 -07:00
Luca Barbieri
6d3a2c97f4 glsl: make compiler options per-target
This allows us to specify different options, especially useful for chips
without unified shaders.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-09-08 20:36:37 -07:00
Eric Anholt
b2872ea353 Revert "mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH."
This reverts commit 001a7bfdfc.  I
hadn't found the section of the spec clarifying that the old behavior
was right.  Reverting fixes the new version of the testcase, and the
Humus demos that could no longer find their uniforms.

Bug #29782
Bug #29783
2010-08-25 16:45:31 -07:00
Eric Anholt
001a7bfdfc mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH.
Fixes: glsl-getactiveuniform-length.
2010-08-23 10:34:31 -07:00
Vinson Lee
a575067d70 mesa: Remove unnecessary heaaders from shaderapi.c. 2010-08-18 18:49:32 -07:00
Eric Anholt
afe125e0a1 Merge remote branch 'origin/master' into glsl2
This pulls in multiple i965 driver fixes which will help ensure better
testing coverage during development, and also gets past the conflicts
of the src/mesa/shader -> src/mesa/program move.

Conflicts:
	src/mesa/Makefile
	src/mesa/main/shaderapi.c
	src/mesa/main/shaderobj.h
2010-07-26 17:53:27 -07:00
Chia-I Wu
40ef298641 mesa: Fix OpenGL ES-only builds.
Check FEATURE_GL in _mesa_init_shader_dispatch and
_mesa_init_shader_uniform_dispatch.  OpenGL ES can not and does not use
_mesa_init_<...>_dispatch.  This is supposed to be temporary.  Ideally,
a more flexible way for initializing dispatch tables should be
developed.
2010-07-03 16:48:36 +08:00
Brian Paul
ae8164a67b mesa: add geometry shader fields to gl_shader_program
These 3 fields are per shader-program.  Copy them into the geometry
program at link time for convenient access later.

Also, add some missing glGetProgramiv() queries.
2010-07-02 15:36:14 -06:00
Brian Paul
291bcfd831 mesa: add missing error checks in _mesa_program_parameteri() 2010-07-02 09:09:06 -06:00
Zack Rusin
da7bd6a90e mesa: initial support for ARB_geometry_shader4
laying down the foundation for everything and implementing most of the
stuff.
linking, gl_VerticesIn and multidimensional inputs are left.
2010-06-28 22:53:21 -04:00
Brian Paul
ec2b92f98c mesa: rename src/mesa/shader/ to src/mesa/program/ 2010-06-10 23:23:13 -06:00
Brian Paul
f1c5043f94 mesa: move shader/slang/* sources to main/slang/*
Reduce the source tree depth a bit.
2010-06-10 22:48:16 -06:00
Brian Paul
a37b2219d6 mesa: refactor shader api / object code
Remove the unneeded ctx->Driver hooks for shader-related functions.
Move state and API-related things into main/.
2010-06-10 20:32:57 -06:00