Commit graph

41039 commits

Author SHA1 Message Date
Chia-I Wu
a19eaaa6c1 st/vega: Move masking after blending.
Masking should happen after blending.  The shader is not entirely
correct, but leave it as is for now.
2010-12-04 13:20:38 +08:00
Chia-I Wu
3b4c888653 st/vega: Refactor blend shaders.
Add a helper function, blend_generic, that supports all blend modes and
per-channel alpha.  Make other blend generators a wrapper to it.

Both the old and new code expects premultiplied colors, yet the input is
non-premultiplied.  Per-channel alpha is also not used for stencil
image.  They still need to be fixed.
2010-12-04 13:20:32 +08:00
Chia-I Wu
a09baf1668 st/vega: Add some comments to pipeline shaders. 2010-12-04 13:19:29 +08:00
Brian Paul
6c33e820d5 st/mesa: new comment about updating state vars 2010-12-03 17:07:16 -07:00
Brian Paul
64244dfd39 mesa: update comments, remove dead code 2010-12-03 16:45:44 -07:00
Brian Paul
6f851e6642 mesa: remove unneeded cast 2010-12-03 16:40:36 -07:00
Brian Paul
503983b09e mesa: make glGet*(GL_NONE) generate GL_INVALID_ENUM
In find_value() check if we've hit the 0th/invalid entry before checking
if the pname matches.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31987

NOTE: This is a candidate for the 7.9 branch.
2010-12-03 16:04:26 -07:00
Brian Paul
40ee69b4f3 swrast: restructure some glReadPixels() code 2010-12-03 15:26:31 -07:00
Brian Paul
5fc2548fae swrast: accept GL_RG in glReadPixels()
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32088
2010-12-03 15:26:31 -07:00
Kenneth Graunke
b7acf538af ir_print_visitor: Print out constant structure values.
In the form (constant type ((field1 value) (field2 value) ...))
2010-12-03 13:59:21 -08:00
Brian Paul
8d6a0dc7f3 swrast: fix indentation 2010-12-03 14:49:19 -07:00
Brian Paul
75746e3779 swrast: allow GL_RG format in glDrawPixels()
Restructure the switch statement to avoid having to add additional
color formats in the future.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32086
2010-12-03 14:48:03 -07:00
Brian Paul
b87369e863 mesa: consolidate some compiler -D flags
-D__STDC_CONSTANT_MACROS and -D__STDC_LIMIT_MACROS are only needed for
LLVM build.
2010-12-03 13:52:59 -07:00
Marek Olšák
9f7f093090 r300g: one more r500_index_bias_supported leftover 2010-12-03 20:59:55 +01:00
Marek Olšák
536d527020 r300g: add capability bit index_bias_supported
.. instead of calling r500_index_bias_supported(..) every draw call.
2010-12-03 20:34:56 +01:00
Jerome Glisse
edda44e0dc r600g: more indentation fix + warning silencing + dead code removal
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-03 13:06:53 -05:00
Jerome Glisse
119f00659c r600g: indentation fix
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-03 12:56:51 -05:00
Jerome Glisse
0b841b0349 r600g: update polygon offset only when rasterizer or zbuffer change
Aim is to build as little state as possible in draw functions.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-03 12:45:19 -05:00
Brian Paul
dbf996f308 llvmpipe: fix broken stencil writemask
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32070
2010-12-03 09:44:30 -07:00
Fabian Bieler
cd431a12bf r600g: set address of pop instructions to next instruction 2010-12-03 11:35:44 -05:00
Jerome Glisse
833f3a488a r600g: dump raw shader output for debugging
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-03 11:35:36 -05:00
Brian Paul
6d13ec7dc0 mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type
If querying the default/window-system FBO's attachment type, return
GL_FRAMEBUFFER_DEFAULT (per the GL_ARB_framebuffer_object spec).

See http://bugs.freedesktop.org/show_bug.cgi?id=31947

NOTE: This is a candidate for the 7.9 branch.
2010-12-03 08:32:29 -07:00
Brian Paul
20cf1851d8 mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query
Return 0 instead of generating an error.

See http://bugs.freedesktop.org/show_bug.cgi?id=30993

Note that piglit fbo-getframebufferattachmentparameter-01 still does
not pass.  But Mesa behaves the same as the NVIDIA driver in this case.
Perhaps the test is incorrect.

NOTE: This is a candidate for the 7.9 branch.
2010-12-03 08:24:51 -07:00
Brian Paul
14746b1d4f gallivm: fix null builder pointers 2010-12-03 07:38:02 -07:00
Chia-I Wu
5be631ce83 st/vega: Add a missing break. 2010-12-03 14:55:29 +08:00
Chia-I Wu
a84a1e344f st/vega: Move vertex transformation to shader.
It was done in path-to-polygon conversion.  That meant that the
results were invalidated when the transformation was modified, and CPU
had to recreate the vertex buffer with new vertices.  It could be a
performance hit for apps that animate.
2010-12-03 14:23:04 +08:00
Chia-I Wu
29bea39fde st/vega: Set pipe_resource::array_size to 1. 2010-12-03 14:22:32 +08:00
Chia-I Wu
9028f24b8a st/egl: Set pipe_resource::array_size to 1. 2010-12-03 14:22:32 +08:00
Marek Olšák
a60a5b850b r300g: do not remove unused constants if we are not near the limit 2010-12-03 06:32:10 +01:00
Marek Olšák
b088b255ec r300g: fix pointer arithmetic with void* in transfer_inline_write 2010-12-03 06:08:50 +01:00
Marek Olšák
d531f9c2f5 mesa, st/mesa: fix gl_FragCoord with FBOs in Gallium
gl_FragCoord.y needs to be flipped upside down if a FBO is bound.

This fixes:
- piglit/fbo-fragcoord
- https://bugs.freedesktop.org/show_bug.cgi?id=29420

Here I add a new program state STATE_FB_WPOS_Y_TRANSFORM, which is set based
on whether a FBO is bound. The state contains a pair of transformations.
It can be either (XY=identity, ZW=transformY) if a FBO is bound,
or (XY=transformY, ZW=identity) otherwise, where identity = (1, 0),
transformY = (-1, height-1).

A classic driver (or st/mesa) may, based on some other state, choose whether
to use XY or ZW, thus negate the conditional "if (is a FBO bound) ...".
The reason for this is that a Gallium driver is allowed to only support WPOS
relative to either the lower left or the upper left corner, so we must flip
the Y axis accordingly again. (the "invert" parameter in emit_wpos_inversion)

NOTE: This is a candidate for the 7.9 branch.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-12-03 05:56:40 +01:00
Marek Olšák
6a46fce14f r300g: implement simple transfer_inline_write for buffers
r600g might need something like that as well. This speeds up constant buffer
upload a bit.
2010-12-03 05:44:47 +01:00
Marek Olšák
3ba8843307 r300g: use internal BO handle for add_buffer and write_reloc
Small perf improvement in ipers.

radeon_drm_get_cs_handle is exactly what this commit tries to avoid
in every write_reloc.
2010-12-03 04:40:22 +01:00
Brian Paul
6299f241e9 gallivm/llvmpipe: remove lp_build_context::builder
The field was redundant.  Use the gallivm->builder value instead.
2010-12-02 18:11:16 -07:00
Brian Paul
36b09b5ded mesa: replace more MAX_WIDTH stack allocations with heap allocations 2010-12-02 18:07:03 -07:00
Marek Olšák
0c9a63db09 r300g: fix build 2010-12-03 00:54:41 +01:00
nobled
39c436a1a2 r300g: Drop unnecessary cast 2010-12-03 00:50:58 +01:00
nobled
7ed65f462a r300g: Abort if draw_create() fails
The other drivers need to be updated to do this, too.
2010-12-03 00:50:58 +01:00
nobled
d5bf231806 r300g: Abort if atom allocations fail 2010-12-03 00:50:58 +01:00
Ben Skeggs
a25cea19f2 nv50: silence some unknown get_param warnings
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-12-03 08:23:44 +10:00
Brian Paul
77ea102735 st/mesa: avoid large stack allocations in readpixels code 2010-12-02 14:29:07 -07:00
Brian Paul
aa28efe60d swrast: avoid large stack allocations in tex combine code 2010-12-02 14:29:07 -07:00
Brian Paul
25662f878e swrast: avoid large stack allocations in blend code 2010-12-02 14:29:07 -07:00
Brian Paul
2addcb7b50 mesa: replace large/MAX_WIDTH stack allocations with heap allocations 2010-12-02 14:29:01 -07:00
Brian Paul
896a08bde6 mesa: replace large/MAX_WIDTH stack allocations with heap allocations 2010-12-02 14:26:55 -07:00
Alex Deucher
fae7cb8ed8 r600g: bump texture/cb limits appropriately for evergreen 2010-12-02 16:11:08 -05:00
Alex Deucher
a3dc947057 r600c: bump texture limits to hw limits 2010-12-02 16:11:07 -05:00
Zack Rusin
e737b9294a gallium/util: add states relevant to geometry shaders 2010-12-02 15:50:15 -05:00
José Fonseca
64da9a1a04 mesa: Temporary hack to prevent stack overflow on windows
e.g. st_readpixels is trying to alloca() an huge ammount of memory from
the stack.
2010-12-02 20:30:59 +00:00
José Fonseca
63df5a464e wgl: Fix visual's buffer_mask configuration. 2010-12-02 20:21:39 +00:00