Commit Graph

24 Commits

Author SHA1 Message Date
Chia-I Wu
1ab1b15e9d mesa, i965: prepare for more than 8 texture targets
3-bit fields are used store texture target in several places.  That will fail
when TEXTURE_EXTERNAL_INDEX, which happends to be the 9th texture target, is
added.  Make them 4-bit fields.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-03 15:09:44 +08:00
Eric Anholt
7ec2b0d0d6 mesa: Convert fixed function fragment program generator to GLSL IR.
This is a step towards providing a direct route for drivers accepting
GLSL IR for codegen.  Perhaps more importantly, it runs the fixed
function fragment program through the GLSL IR optimization.  Having
seen how easy it is to make ugly fixed function texenv code that can
do unnecessary work, this may improve real applicatinos.
2011-10-18 10:54:32 -07:00
Ian Romanick
35613afee3 mesa: Remove unused gl_program::Attributes
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-04 13:17:48 -07:00
Ian Romanick
cd76f114e6 mesa: Remove unused field gl_program::Varying
Lots of things set and copy this field around, but nothing uses it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-30 15:37:00 -07:00
Bryan Cain
4683529048 Merge branch 'glsl-to-tgsi'
Conflicts:
	src/mesa/state_tracker/st_atom_pixeltransfer.c
	src/mesa/state_tracker/st_program.c
2011-08-04 15:43:34 -05:00
Bryan Cain
6d89abadbc mesa: support boolean and integer-based parameters in prog_parameter
The functionality is not used by anything yet, and the glUniform functions will
need to be reworked before this can reach its full usefulness.  It is
nonetheless a step towards integer support in the state tracker and classic drivers.
2011-08-01 17:59:07 -05:00
Bryan Cain
1e5fd8e480 mesa: fix segfault when no Mesa IR is generated 2011-08-01 17:59:07 -05:00
Dave Airlie
323e4bff79 mesa: split _mesa_reference_program() into hot/cold paths.
inline the hotpath of the reference remaining the same. This shouldn't
penalise the slow path at all but improve the hot path so we don't have
to jump to the function.

It also moves some assert checks under an #ifndef NDEBUG.

Minor clean-ups added by Brian.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-07-14 08:09:38 -06:00
Ian Romanick
4d203a01e2 mesa: Kill gl_fragment_program::FogOption with fire
All drivers expect this to always be GL_NONE.  Don't let there be any
opportunity for a bad value to leak out and infect some unsuspecting
driver.  If any driver for hardware that had fixed-function
per-fragment fog (i915 and perhaps some r300-ish) was ever going to
add support, it would have done it by now.

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
2011-04-21 17:33:29 -07:00
Brian Paul
874a2c0b7d mesa: core support for GL_ARB_texture_buffer_object
No GLSL or driver support yet.
2011-04-05 19:02:09 -06:00
Brian Paul
11150e4667 mesa: use BITFIELD64_BIT() macro 2011-03-15 18:21:36 -06:00
Eric Anholt
098f9c5325 Revert "mesa: Convert fixed function fragment program generator to GLSL IR."
This reverts commit 7cb87dffce.
There were regressions (Bug #35244) and more review has been requested.
2011-03-12 15:11:01 -08:00
Eric Anholt
7cb87dffce mesa: Convert fixed function fragment program generator to GLSL IR.
This is a step towards providing a direct route for drivers accepting
GLSL IR for codegen.  Perhaps more importantly, it runs the fixed
function fragment program through the GLSL IR optimization.  Having
seen how easy it is to make ugly fixed function texenv code that can
do unnecessary work, this may improve real applicatinos.
2011-03-11 12:55:14 -08:00
Brian Paul
8ad821df0a mesa: added gl_program_constants::MaxAddressOffset
See https://bugs.freedesktop.org/show_bug.cgi?id=29418
2011-03-02 09:32:47 -07:00
Vinson Lee
21750a2d9d mesa: Include mfeatures.h in program.c.
Include mfeatures.h for feature tests.
2011-01-09 00:47:33 -08:00
Brian Paul
c628fd743e mesa: replace #defines with new gl_shader_type enum 2010-11-23 15:52:43 -07:00
Brian Paul
512f840702 mesa: _mesa_valid_register_index() to validate register indexes 2010-11-23 15:52:43 -07:00
Brian Paul
f72e4b306b mesa: silence enum comparison warning
http://bugs.freedesktop.org/show_bug.cgi?id=31069
2010-10-25 09:10:36 -06:00
Kristian Høgsberg
f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Luca Barbieri
029c181571 mesa: don't smash the stack in _mesa_find_used_registers
At some point this actually triggered, not sure if it still does.

Give a meaningful assert and refuse to smash the stack anyway.
2010-09-05 17:57:12 +02:00
Brian Paul
4567b47953 mesa: additional program limit assertions 2010-08-10 08:38:19 -06:00
Brian Paul
56643096f1 mesa: added gl_program::IndirectRegisterFiles field
Now drivers, etc. can know which register files are accessed with
indirect addressing.  Before we just checked gl_program::NumAddressRegs
but didn't know if that was the constant buffer, temp regs, or what.

The only user of this new field so far will be the gallium state tracker.
2010-07-30 14:29:19 -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