Commit Graph

41722 Commits

Author SHA1 Message Date
José Fonseca
e1bc68b014 scons: Fix cross-compilation.
Hairy stuff. Don't know how to do it better though.
2011-01-13 20:53:42 +00:00
Christian König
0448f73f06 r600g: add missing RECIPSQRT_CLAMPED to r600_bc_get_num_operands 2011-01-13 21:29:47 +01:00
Christian König
a25b91c2c2 r600g: rework bank swizzle code 2011-01-13 21:22:00 +01:00
Christian König
89275c0b36 r600g: fix alu slot assignment 2011-01-13 19:41:07 +01:00
Christian König
236e99fe05 r600g: optimize away CF ALU instructions even if type doesn't match 2011-01-13 19:41:07 +01:00
Christoph Bumiller
370ae0bd61 nvc0: identify POINT_RASTER_RULES, add POINT_SMOOTH state
Point smoothing requires rasterization rules to be set to OGL.

Sorry for the extra noise caused by the header update.
2011-01-13 19:36:25 +01:00
Chia-I Wu
abbb1c8f08 draw: Fix an off-by-one bug in a vsplit assertion.
When use_spoken is true, istart (the first vertex of this segment) is
replaced by i0 (the spoken vertex of the fan).  There are still icount
vertices.

Thanks to Brian Paul for spotting this.
2011-01-14 02:02:26 +08:00
Vinson Lee
1f66930332 i965: Remove unnecessary headers. 2011-01-13 09:28:47 -08:00
Vinson Lee
d599df8a8c targets/egl-static: Remove unnecessary header. 2011-01-13 09:16:25 -08:00
Vinson Lee
eb70e58caf r600g: Silence uninitialized variable warnings. 2011-01-13 09:07:19 -08:00
Vinson Lee
d76f1da7cb mesa: Add missing break statement in SARGB8 case. 2011-01-13 08:53:33 -08:00
Brian Paul
ca31c596e8 egl: need stdio.h for non-Windows build too to avoid compiler warning 2011-01-13 09:25:55 -07:00
Paulo Zanoni
dad914f6b2 dri_util: fail driCreateNewScreen if InitScreen is NULL
Without this, X doesn't start with UMS on r300g.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-13 07:44:33 -07:00
José Fonseca
9277a62aa3 scons: Ensure the OpenVG/EGL import libs are also prefixed with 'lib'. 2011-01-13 12:33:41 +00:00
José Fonseca
63528c4510 scons: Build libOpenVG.dll & libEGL.dll
But without creating liblibOpenVG or liblibEGL elsewhere.

Thanks Chia-I Wu for pointing this out.
2011-01-13 11:54:43 +00:00
José Fonseca
80f18876f6 util: Undo spurious changes in last commit. 2011-01-13 11:45:40 +00:00
José Fonseca
fe2cfd9b19 util: Don't limit debug_printf message length on unices. 2011-01-13 11:44:16 +00:00
Chia-I Wu
a22a332fc7 egl: Improve driver selection.
The idea is to be able to match a driver using the following order

  try egl_gallium with hw renderer
  try egl_dri2
  try egl_gallium with sw renderer
  try egl_glx

given the module list

  egl_gallium
  egl_dri2
  egl_glx

For that, UseFallback initialization option is added.  The module list
is matched twice: with the option unset and with the option set.  In the
first pass, egl_gallium skips its sw renderer and egl_glx rejects to
initialize since UseFallback is not set.  In the second pass,
egl_gallium skips its hw renderer and egl_dri2 rejects to initialize
since UseFallback is set.  The process stops at the first driver that
initializes the display.
2011-01-13 18:15:45 +08:00
Chia-I Wu
655e459892 egl: Simplify driver matching.
Add initialization options that drv->API.Initialize should support.
Replace drv->Probe by TestOnly initialization option and simplify
_eglMatchDriver.
2011-01-13 18:10:38 +08:00
Chia-I Wu
a4a38dcf61 egl: Cleanup _EGLDisplay initialization.
Reorder/rename and document the fields that should be set by the driver during
initialization.  Drop the major/minor arguments from drv->API.Initialize.
2011-01-13 17:57:38 +08:00
Kenneth Graunke
47b2af2c62 glsl/s_expression: Read and ignore Scheme-style comments.
A single-semicolon until the end of the line, i.e.
; this is a comment.
2011-01-12 23:55:34 -08:00
Kenneth Graunke
5bfb68cd0f glsl/builtins: Remove unnecessary (constant bool (1)) from assignments.
This isn't strictly necessary, but is definitely nicer.
2011-01-12 23:55:34 -08:00
Kenneth Graunke
bbafd2b849 ir_reader: Make assignment conditions optional.
You can now simply write (assign (xy) <lhs> <rhs>) instead of the
verbose (assign (constant bool (1)) (xy) <lhs> <rhs>).
2011-01-12 23:55:34 -08:00
Kenneth Graunke
b74ff382a4 ir_reader: Convert to a class.
This makes it unnecessary to pass _mesa_glsl_parse_state around
everywhere, making at least the prototypes a lot easier to read.

It's also more C++-ish than a pile of static C functions.
2011-01-12 23:55:34 -08:00
Kenneth Graunke
ec7e4f0ec5 ir_reader: Combine the three dereference reading functions into one.
These used to be more complicated, but now are so simple there's no real
point in keeping them separate.
2011-01-12 23:55:34 -08:00
Kenneth Graunke
e486fca2d3 ir_reader: Relax requirement that function arguments be s_lists.
All of these functions used to take s_list pointers so they wouldn't all
need SX_AS_LIST conversions and error checking.  However, the new
pattern matcher conveniently does this for us in one centralized place.

So there's no need to insist on s_list.  Switching to s_expression saves
a bit of code and is somewhat cleaner.
2011-01-12 23:55:33 -08:00
Kenneth Graunke
d798815272 ir_reader: Remove s_list::length() method.
Most code now relies on the pattern matcher rather than this function,
and for the only remaining case, not using this saves an iteration.
2011-01-12 23:55:33 -08:00
Kenneth Graunke
daeb0c646e ir_reader: Add a pattern matching system and use it everywhere.
Previously, the IR reader was riddled with code that:
1. Checked for the right number of list elements (via a linked list walk)
2. Retrieved references to each component (via ->next->next pointers)
3. Downcasted as necessary to make sure that each sub-component was the
   right type (i.e. symbol, int, list).
4. Checking that the tag (i.e. "declare") was correct.

This was all very ad-hoc and a bit ugly.  Error checking had to be done
at both steps 1, 3, and 4.  Most code didn't even check the tag, relying
on the caller to do so.  Not all callers did.

The new pattern matching module performs the whole process in a single
straightforward function call, resulting in shorter, more readable code.

Unfortunately, MSVC does not support C99-style anonymous arrays, so the
pattern must be declared outside of the match call.
2011-01-12 23:55:33 -08:00
Dave Airlie
407184fe08 mesa/srgb: handle SARGB8 case in the sw fbo renderer. 2011-01-13 16:51:30 +10:00
Fredrik Höglund
71b889f904 st/mesa: fix a regression from cae2bb76
stObj->pt is null when a TFP texture is passed to st_finalize_texture,
and with the changes introduced in the above commit this resulted in a
new texture being created and the existing image being copied into it.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-01-13 01:22:20 -05:00
Ben Skeggs
bd2b72359e nvc0: disable calling of sw methods we don't implement
Left in the code as a marker of what NVIDIA do, just in case we need
to do this some day.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-01-13 15:26:31 +10:00
Dave Airlie
8c8e26d66a mesa/fbo: prevent assert trigger on i965 with piglit fbo-srgb test. 2011-01-13 15:17:34 +10:00
Ben Skeggs
0c1db2feb9 nvc0: fix mp_stack_bo relocation
Fixes a PT_NOT_PRESENT error cause by:
- allocating in VRAM
- emitting GART relocs to 0x17bc/0x17c0, moving the buffer
- telling the bufmgr that the buffer should be in VRAM when we use it,
  but not correcting the value sent to 0x17bc/0x17c0.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-01-13 13:31:29 +10:00
Vinson Lee
31b1051663 mesa: Move loop variable declarations outside for loop in extensions.c.
Fixes MSVC build.
2011-01-12 17:43:28 -08:00
Brian Paul
dd973cd9e8 mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()
Fixes a failed assertion when a renderbuffer ID that was gen'd but not
previously bound was passed to glFramebufferRenderbuffer().  Generate
the same error that NVIDIA does.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-12 18:14:18 -07:00
Brian Paul
67722ae403 mesa: don't assert in GetIntegerIndexed, etc
We were getting an assertion upon invalid pname.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-12 18:13:18 -07:00
Brian Paul
2fa6012f6a mesa: fix num_draw_buffers==0 in fixed-function fragment program generation
This fixes a problem when glDrawBuffers(GL_NONE).  The fragment program
was writing to color output[0] but OutputsWritten was 0.  That led to a
failed assertion in the Mesa->TGSI translation code.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-12 17:55:45 -07:00
Brian Paul
30616fdacf st/mesa: add st_BeginQuery() case for GL_ANY_SAMPLES_PASSED
Fixes piglit occlusion_query2 failure.
2011-01-12 17:55:44 -07:00
Brian Paul
1b173fb3ba glsl: remove trailing comma to silence warning 2011-01-12 17:55:44 -07:00
Brian Paul
4d96af9337 noop: change var type to silence warning 2011-01-12 17:55:44 -07:00
Kenneth Graunke
b076551e3b glsl/Makefile: Fix build with --as-needed. 2011-01-12 16:37:03 -08:00
Vinson Lee
356e2e962f mesa: Move declaration before code in extensions.c.
Fixes SCons build.
2011-01-12 16:23:11 -08:00
Chad Versace
a7b5664c05 mesa: Change OES_point_sprite to depend on ARB_point_sprite
The extension string in GLES1 contexts always advertised
GL_OES_point_sprite. Now advertisement depends on ARB_point_sprite being
enabled.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
2011-01-12 15:45:03 -08:00
Chad Versace
039150169e mesa: Change dependencies of some OES extension strings
Change all OES extension strings that depend on ARB_framebuffer_object to
instead depend on EXT_framebuffer_object.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
2011-01-12 15:45:03 -08:00
Chad Versace
19418e921a mesa: Add/remove extensions in extension string
Add GL_OES_stencil8 to ES2.

Remove the following:
   GL_OES_compressed_paletted_texture : ES1
   GL_OES_depth32                     : ES1, ES2
   GL_OES_stencil1                    : ES1, ES2
   GL_OES_stencil4                    : ES1, ES2
Mesa advertised these extensions, but did not actually support them.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
2011-01-12 15:45:03 -08:00
Chad Versace
9b260c377f mesa: Refactor handling of extension strings
Place GL, GLES1, and GLES2 extensions in a unified extension table. This
allows one to enable, disable, and query the status of GLES1 and GLES2
extensions by name.

When tested on Intel Ironlake, this patch did not alter the extension
string [as given by glGetString(GL_EXTENSIONS)] for any API.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-01-12 15:45:03 -08:00
Ian Romanick
bd33055ef4 glsl: Track variable usage, use that to enforce semantics
In particular, variables cannot be redeclared invariant after being
used.

Fixes piglit test invariant-05.vert and bugzilla #29164.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-12 14:30:31 -08:00
Eric Anholt
c3f000b392 i965/fs: Do flat shading when appropriate.
We were trying to interpolate, which would end up doing unnecessary
math, and doing so on undefined values.   Fixes glsl-fs-flat-color.
2011-01-12 13:51:01 -08:00
Christian König
6881262eff r600g: also look at tex inst when for maximum gpu count 2011-01-12 20:41:15 +01:00
Vinson Lee
a42906f862 generate_builtins.py: Add missing import.
Import sys for sys.exit.
2011-01-12 11:35:43 -08:00