Commit Graph

41959 Commits

Author SHA1 Message Date
Andre Maasikas 92767e9052 r600c: only colors can be flat shaded
fixes stellarium text and menu display
2011-01-24 10:23:19 +02:00
Jakob Bornecrantz b7d2919e8e util: Add function logger helpers 2011-01-24 03:37:57 +01:00
Jakob Bornecrantz a82408c353 Revert "r300g/swtcl: re-enable LLVM"
This reverts commit 88550083b3.
2011-01-24 03:26:59 +01:00
Jakob Bornecrantz 4c73030d47 draw: Init llvm if not provided 2011-01-24 03:26:59 +01:00
Jakob Bornecrantz 832029e1c1 i915g: Remove draw_flushes and state that we don't need to track 2011-01-24 03:26:59 +01:00
Jakob Bornecrantz 9a9630dcf0 i915g: Improve constant handling 2011-01-24 03:26:59 +01:00
Tom Stellard c40ec20c27 r300g: Increase fragment shader limits for r400 cards
r400 fragment shaders now support up to 64 temporary registers,
512 ALU instructions, and 512 TEX instructions.
2011-01-23 17:47:48 -08:00
Brian Paul 1bf3c75825 gldirect: remove _NEW_ACCUM 2011-01-23 14:06:21 -07:00
Brian Paul c78b48d808 i965: remove _NEW_ACCUM 2011-01-23 14:06:21 -07:00
Christoph Bumiller a287a758c6 nvc0: implement point coord replacement
But we have to cheat and peek at the GENERIC semantic indices the
state tracker uses for TEXn.
Only outputs from 0x300 to 0x37c can be replaced, and so we have to
know on shader compilation which ones to put there in order to keep
doing separate shader objects properly.

At some point I'll probably create a patch that makes gallium not
force us to discard the information about what is a TexCoord.
2011-01-23 21:35:27 +01:00
Marek Olšák f154cd2315 mesa: add ARB_framebuffer_sRGB as alias of the EXT variant
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-23 20:59:46 +01:00
Marek Olšák 81ae8c6313 mesa: return GL_LINEAR for ..COLOR_ENCODING if framebuffer_sRGB is unsupported
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-23 20:59:46 +01:00
Brian Paul 2dac3f995b vega: sort filenames in Makefile, SConscript 2011-01-23 10:15:07 -07:00
Brian Paul fb7efb1b19 mesa: get rid of _NEW_ACCUM, clean-up _NEW_* #defines
The _NEW_ACCUM flag was only set when changing the accumulation
buffer clear color and never used anywhere.  Reclaim that dirty bit.
Clean up the definitions of the other dirty bit flags.
2011-01-23 09:50:52 -07:00
Brian Paul f4dc24a0b5 mesa: smarter glTexParameter state invalidation
Only a few texture object parameters can effect texture completeness:
min level, max level, minification filter.  Don't mark the texture
incomplete for other texture object state changes.
2011-01-23 09:50:52 -07:00
Marek Olšák 91eba2567e r300g: support sRGB colorbuffers
We are not required to do the linear->sRGB conversion if ARB_framebuffer_sRGB
is unsupported. However I think the conversion should work in hw except
for blending, which matches the D3D9 behavior.
2011-01-23 13:32:56 +01:00
Marek Olšák ffcdd49c69 r300/compiler: remove any code related to relative addressing of temporaries
The hw can't do it and the code was useless anyway (it's lowered
in the GLSL compiler).
2011-01-23 13:32:56 +01:00
Christoph Bumiller 835c4ea105 nvc0: fix emit_cvt for ceil, floor and trunc 2011-01-23 13:09:10 +01:00
Christoph Bumiller 95eef7a705 nvc0: remove bad assert and emit TEMP movs instead 2011-01-23 13:07:30 +01:00
Christoph Bumiller f9bb1c8b33 nvc0: fix address and value slot assignment in load combining 2011-01-23 13:05:44 +01:00
Christoph Bumiller 005d186d66 nvc0: don't omit highest bit of branch target
Fixes negative relative branch offsets.
2011-01-23 13:03:20 +01:00
Christoph Bumiller 419ff10b0e nvc0: recognize r63 as zero in constant folding 2011-01-23 13:03:15 +01:00
Christoph Bumiller bf1df06773 nvc0: add MARK_RING where missing to avoid too many relocs errors 2011-01-23 13:03:10 +01:00
Christoph Bumiller 49f16c96f1 nvc0: don't apply base vertex to per-instance arrays 2011-01-23 13:03:00 +01:00
Christoph Bumiller c18aa3c73f nvc0: commute sources of SET too if beneficial 2011-01-23 13:01:33 +01:00
Christoph Bumiller 8e572998fc nvc0: accept neg abs modifiers on lg2 2011-01-23 13:01:22 +01:00
Ian Romanick 2db46fe5f0 glsl: Don't assert when the value returned by a function has no rvalue
The rvalue of the returned value can be NULL if the shader says
'return foo();' and foo() is a function that returns void.

Existing GLSL specs do *NOT* say that this is an error.  The type of
the return value is void.  If the return type of the function is also
void, then this should compile without error.  I expect that future
versions of the GLSL spec will fix this (wink, wink, nudge, nudge).

Fixes piglit test glsl-1.10/compiler/expressions/return-01.vert and
bugzilla #33308.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-22 18:04:40 -08:00
Brian Paul 9d380f487a st/mesa: ensure that all pixel paths operation on linear RGB data, not sRGB
Before, we were converting between linear/sRGB in glReadPixels,
glDrawPixels, glAccum, etc if the renderbuffer was an sRGB texture.
Those all need to operate on pixel values as-is without conversion.

Also, when setting up render-to-texture, if the texture is sRGB the
pipe_surface view must be linear RGB.  This will change when we
support GL_ARB_framebuffer_sRGB.

This fixes http://bugs.freedesktop.org/show_bug.cgi?id=33353
2011-01-22 18:33:35 -07:00
Brian Paul 4c9ad084c1 softpipe: pass surface format to get/put_tile functions
When we read/write image tiles we need to use the format specified
in the pipe_surface, not the pipe_transfer format (which comes from
the underlying texture/resource format).

This comes up when rendering to sRGB surfaces (via OpenGL render to
texture).  Ignoring the new GL_ARB/EXT_framebuffer_sRGB extension
for now, when we render to a sRGB surface we need to treat it like
a regular, linear colorspace RGB surface.  Before, when we read/wrote
tiles to sRGB surfaces we were inadvertantly doing the color space
conversion.
2011-01-22 18:33:35 -07:00
Brian Paul e75844b4e0 gallium/util: added pipe_put_tile_rgba_format() 2011-01-22 18:33:35 -07:00
Brian Paul 3ce1ec853b gallium/util: simplify pipe_get_tile_rgba()
Implement it in terms of pipe_get_tile_rgba_format()
2011-01-22 18:33:35 -07:00
Brian Paul 90671fcdda gallium/softpipe: replace pipe_get_tile_swizzle()
The new function, pipe_get_tile_rgba_format(), no longer takes a
swizzle (we weren't actually using it anywhere).  Rename it to
indicate that the format is passed explicitly.
2011-01-22 18:33:35 -07:00
Brian Paul 4e2c077879 softpipe: use proper type for format field 2011-01-22 18:33:35 -07:00
Brian Paul 11fbdf726d gallium/util: added util_format_linear() 2011-01-22 18:33:35 -07:00
Brian Paul 4c251b8861 st/mesa: update comment, use st_fb_orientation() 2011-01-22 18:33:35 -07:00
Brian Paul bd67962c5e st/mesa: comments in update_viewport() 2011-01-22 18:33:35 -07:00
Chia-I Wu bb770af3a5 scons: Add support for GLES.
GLES can be enabled by running scons with

  $ scons gles=yes

When gles=yes is given, the build is changed in three ways.  First,
libmesa.a will be built with FEATURE_ES1 and FEATURE_ES2.  This makes
DRI drivers and libEGL support and advertise GLES support.  Second, GLES
libraries will be created.  They are libGLESv1_CM, libGLESv2, and
libglapi.  Last, libGL or opengl32 will link to libglapi.  This change
is required as _glapi_* will be declared as __declspec(dllimport) in
libmesa.a on windows.  libmesa.a expects those symbols to be defined in
another DLL.  Due to this change to GL, GLES support is marked
experimental.

Note that GLES requires libxml2-python to generate some of its sources.
2011-01-22 11:59:05 +08:00
Chia-I Wu 3f04314ae2 mapi: ENTRY_CURRENT_TABLE_GET should be stringified.
So that it can be renamed to _glapi_get_dispatch.
2011-01-22 11:58:38 +08:00
Kenneth Graunke 0db3161036 glcpp: Regenerate parser files. 2011-01-21 15:41:19 -08:00
Kenneth Graunke 6ecee54a9a glcpp: Remove use of talloc reference counting.
We almost always want to simply steal; we only need to copy when copying
a token list (in which case we're already cloning stuff anyway).
2011-01-21 15:41:19 -08:00
Kenneth Graunke e256e4743c glsl, i965: Remove unnecessary talloc includes.
These are already picked up by ir.h or glsl_types.h.
2011-01-21 15:41:19 -08:00
Kenneth Graunke 819f92deaa ra: Use the same context when realloc'ing arrays.
The original allocations use regs->regs as the context, so talloc will
happily ignore the context given here.  Change it to match to clarify
that it isn't changing.
2011-01-21 15:39:57 -08:00
Chad Versace b66be7518a glsl: Improve error message when read-only vars are written
Improves the cases when:
* an explicit assignment references the read-only variable
* an 'out' or 'inout' function parameter references the read-only variable
2011-01-21 14:06:28 -08:00
Chad Versace 01a584d093 glsl: Mark 'in' variables at global scope as read-only
Fixes Piglit tests:
spec/glsl-1.30/compiler/storage-qualifiers/static-write-centroid-in-01.frag
spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-01.frag
spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-02.frag
2011-01-21 14:06:28 -08:00
Chad Versace f633b993b0 glsl: Remove unused class ast_declaration_statment 2011-01-21 14:06:25 -08:00
Jakob Bornecrantz 8af583f6e8 i915g: Don't (un)map vbuf on each (un)map call 2011-01-21 20:53:29 +01:00
Jakob Bornecrantz 0c3352b6df i915g: Don't do unnecessary copies of constants
Even tho st/mesa use user buffers for constants align buffers
other state trackers doesn't use user buffers.
2011-01-21 20:53:29 +01:00
Jakob Bornecrantz 2e60aa511d i915g: Don't emit FS constants when VS contants change 2011-01-21 20:53:29 +01:00
Jakob Bornecrantz 7287964f94 i915g: Use slab allocator for transfers
Also remove unused i915_transfer struct
2011-01-21 20:53:29 +01:00
Jakob Bornecrantz 484edfc815 st/dri: Fix warning 2011-01-21 20:53:29 +01:00