Commit graph

6553 commits

Author SHA1 Message Date
Corbin Simpson
4769566500 r300compiler, r300 classic, r300g: Add support for MRTs in the frag shader.
This maybe breaks the vert compiler. Hopefully not.
2010-02-02 04:53:12 -08:00
Michal Krol
ad83f3bf0a tgsi: ureg_DECL_gs_input() accepts shader semantics. 2010-02-02 10:42:13 +01:00
Igor Oliveira
301a9437cc vega: implement tgsi_ureg shaders cache 2010-02-02 00:21:56 -05:00
Igor Oliveira
231d5457b2 vega: change tgsi asm by tgsi_ureg 2010-02-02 00:21:52 -05:00
Corbin Simpson
565f0cef26 r300g: Fix funky segfault. 2010-02-01 19:48:24 -08:00
Chia-I Wu
01dcadab8b st/egl: Wrong context might be used in eglBindTexImage.
If the pbuffer surface is current, gctx is set to the current context.
Make sure it is set to OpenGL ES 1 context again before binding.
2010-02-02 11:35:11 +08:00
Corbin Simpson
9a1bf52c18 r300g: Inline immediates where possible.
Oh look, more gears. Seems to work just fine though.
2010-02-01 12:48:33 -08:00
Vinson Lee
12f66b6dc9 st/dri: Remove duplicate type qualifier. 2010-01-31 23:52:48 -08:00
Vinson Lee
dfd76c0044 i965g: Add missing va_end. 2010-01-31 23:47:07 -08:00
Vinson Lee
2de590eacd r300g: Fix memory leak on memory allocation failure. 2010-01-31 22:38:25 -08:00
Marcin Kościelnicki
de917c1c61 nv04: Update to new nouveau_class.h
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-02-01 01:30:19 +01:00
Marcin Slusarz
112def3c17 nv50/nv40/nv30: fix small memory leak of nouveau_resources on screen_destroy
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-02-01 01:28:06 +01:00
Francisco Jerez
71b32cc838 nv10, nv20: Fix build. 2010-02-01 01:26:36 +01:00
Vinson Lee
d36e90f580 r300g: Silence uninitialized variable warning. 2010-01-30 22:50:35 -08:00
Chia-I Wu
216925ccd1 egl: Initialize display configs with the display.
This changes _eglInitConfig to take the display as its argument.
2010-01-31 14:46:14 +08:00
Chia-I Wu
d69242be55 egl: Initialize display resources with their display.
Change _eglInitSurface, _eglInitContext, and _eglInitImage to take an
_EGLDisplay instead of an _EGLDriver.  This is a more natural form, and
plus, the display encodes information such as the extensions supported
that might be required for attribute list parsing.
2010-01-31 14:46:14 +08:00
Vinson Lee
5ad488908b i915: Set bit field of length 1 light_twoside to unsigned. 2010-01-30 22:36:54 -08:00
Chia-I Wu
66f0517695 st/egl: Do not ignore configs without a renderable type.
Configs without a renderable type are still informative for programs
such as eglinfo.
2010-01-31 11:20:15 +08:00
Chia-I Wu
6d12c7083e st/egl: Remove egl_g3d_get_current_context.
There is now _eglGetAPIContext that can return the current context of
the given API.
2010-01-31 11:20:15 +08:00
Corbin Simpson
a794c660d3 Revert "r300g: Don't handle SHADOW_AMBIENT."
This reverts commit 627a45848f.

I was wrong. Who could have known? :3
2010-01-30 14:30:13 -08:00
Corbin Simpson
b6ac2403ac r300g: Independent blend enables only work on r500. 2010-01-30 12:33:44 -08:00
Corbin Simpson
627a45848f r300g: Don't handle SHADOW_AMBIENT.
Bisected so that only this commit has to be reverted if I'm wrong.

...Pfft, like I'm ever wrong. :3
2010-01-30 12:23:43 -08:00
Corbin Simpson
f7467f7437 r300g: Fix comment on SHADOW_AMBIENT. 2010-01-30 12:23:24 -08:00
Corbin Simpson
268cc5ff38 gallium-docs: Fix missing PIPE_CAPs.
Hmm, need to cross-ref those TGSI things. My work is never done... :3
2010-01-30 12:16:10 -08:00
Corbin Simpson
bfbec0818f r300g: Dual-source blending isn't possible, period. 2010-01-30 12:03:20 -08:00
Mathias Fröhlich
5a64bdaa01 r300g: Add alpha render targets.
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Tested-by: Mathias Fröhlich <Mathias.Froehlich@gmx.net>
2010-01-30 11:40:41 -08:00
Chia-I Wu
5714e674c7 st/egl: eglBindTexImage should bind to an OpenGL ES texture.
The spec says that it only works with OpenGL ES.
2010-01-30 23:15:21 +08:00
Chia-I Wu
00e1790f32 egl: Rename Binding to CurrentContext in _EGLSurface.
A context can be bound to a surface just like it can be bound to a
thread.  CurrentContext is a more consistent name.
2010-01-30 22:57:18 +08:00
Roland Scheidegger
847ac8ec5f gallium: fix blend state cso
if independent blend state was disabled, only the data from first rt was
stored, however the comparison used the full state, hence there never was
a match and always a new object was created.
Fixes a huge performance drop with llvmpipe due to recompilation.
2010-01-30 01:58:00 +01:00
Brian Paul
98f3f1c695 gallium: document pipe_context::get_query_result() 2010-01-29 14:01:34 -07:00
Luca Barbieri
b2299d80b4 softpipe: support all TGSI fragment coord conventions (v4)
Changes in v4:
- Rebase and modify for changes in previous patches

Changes in v3:
- Use positive caps instead of negative caps

Changes in v2:
- Now takes the fragment convention directly from the fragment shader

Adds internal support for all fragment coord conventions to softpipe.

This patch is not required for use with the current state trackers, but it
allows softpipe to run any TGSI program and enhances performance.
2010-01-29 14:14:29 +01:00
Luca Barbieri
6c403750d6 tgsi: add caps for fragment coord conventions (v3)
Changes in v3:
- Renumber caps to accomodate caps to add to master in the meantime
- Document caps
- Add unsupported caps to *_screen.c too

Changes in v2:
- Split for properties patch
- Use positive caps instead of negative caps

This adds 4 caps to indicate support of each of the fragment coord
conventions.

All drivers are also modifed to add the appropriate caps.

Some drivers were incorrectly using non-Gallium-default conventions,
and caps for them have them set so that they will behave correctly
after the later state tracker patches.

This drivers are softpipe/llvmpipe (uses integer rather than half
integer) and pre-nv50 Nouveau (uses lower left rather than upper left).

Other drivers might be broken. With this patchset, fixing them is
only a matter of exposing the appropriate caps that match the behavior
of the existing code.

Drivers are encouraged to support all conventions themselves for better
performance, and this feature is added to softpipe in a later patch.
2010-01-29 14:13:14 +01:00
Luca Barbieri
73317139a4 tgsi: add properties for fragment coord conventions (v3)
Changes in v3:
- Documented the new properties
- Added comments for property values
- Rebased to current master

Changes in v2:
- Caps are added in a separate, subsequent patch

This adds two TGSI fragment program properties that indicate the
fragment coord conventions.

The properties behave as described in the extension spec for
GL_ARB_fragment_coord_conventions, but the default origin in
upper left instead of lower left as in OpenGL.

The syntax is:
PROPERTY FS_COORD_ORIGIN [UPPER_LEFT|LOWER_LEFT]
PROPERTY FS_COORD_PIXEL_CENTER [HALF_INTEGER|INTEGER]

The names have been chosen for consistency with the GS properties
and the OpenGL extension spec.

The defaults are of course the previously assumed conventions:
UPPER_LEFT and HALF_INTEGER.
2010-01-29 14:13:14 +01:00
Vinson Lee
548b9c4ece svga: Remove unnecessary headers. 2010-01-28 17:32:33 -08:00
Vinson Lee
7280c4c9fe softpipe: Remove unnecessary header. 2010-01-28 15:56:50 -08:00
Vinson Lee
1a2f9d722e llvmpipe: Remove unnecessary header. 2010-01-28 15:54:57 -08:00
Corbin Simpson
0087322729 r300g: Clean up blend masks, change caps.
progs/tests/drawbuffers should work, except I can't test it. GG new
shader parser. GG.
2010-01-28 13:39:47 -08:00
Corbin Simpson
2e481e9fad gallium-docs: Minor grammar, need to talk about dual-source blends. 2010-01-28 13:37:09 -08:00
Corbin Simpson
505a43aff2 gallium-docs: Clean up constantbuf info a bit.
Hmm, does this belong in context, next to set_constant_buffer? Maybe
a paragraph in shaders might be useful.
2010-01-28 12:35:12 -08:00
Corbin Simpson
a5f7c63fc0 gallium-docs: Add PIPE_CAP info. 2010-01-28 12:22:51 -08:00
Jakob Bornecrantz
c75e238434 st/xorg: Update to new libkms interface but be backwards compatible 2010-01-28 18:37:54 +00:00
Roland Scheidegger
9b346f83a7 Merge commit 'origin/perrtblend'
Conflicts:
	src/gallium/drivers/softpipe/sp_screen.c
	src/gallium/include/pipe/p_defines.h
2010-01-28 17:23:58 +01:00
Roland Scheidegger
2fa34bf44c gallium: remove PIPE_CAP_S3TC, and add PIPE_CAP_DUAL_SOURCE_BLEND
there's no point in keeping deprecated PIPE_CAPS around since there's no
stable interface (yet).
Reuse the enum for PIPE_CAP_DUAL_SOURCE_BLEND. Drivers advertizing this
will accept the pipe blendfactors with SRC1 in them and be able to do dual
source blending (src color from pixel shader output 0, and blendfactor with
SRC1 will come from output 1, only one render target may be bound when using
any of these blend factors).
2010-01-28 17:11:49 +01:00
Michal Krol
9e895831bc tgsi: Constants declared with ureg_DECL_constant() are one-dimensional.
This is to maintain backward compatibility with drivers
that don't support arrays of constant buffers.
2010-01-28 14:08:22 +01:00
Michal Krol
3ba2ab3a23 tgsi: Add ureg_property_gs_output_prim/max_vertices(). 2010-01-28 14:08:19 +01:00
Michal Krol
6522804cb3 docs: Implement constant buffer CAPs. 2010-01-28 14:08:16 +01:00
Michal Krol
3320acb67d softpipe: Report some sane values for constant buffer CAP queries. 2010-01-28 14:08:12 +01:00
Michal Krol
25123e0c88 gallium: Add CAPs for constant buffers. 2010-01-28 14:08:08 +01:00
Michal Krol
7c5f255201 gallium: Rename PIPE_MAX_CONSTANT to PIPE_MAX_CONSTANT_BUFFERS. 2010-01-28 14:08:03 +01:00
Michal Krol
333c035a51 regress: Add vertex shaders tests for constant buffers. 2010-01-28 14:07:58 +01:00