mesa.git
13 years agoscons: Add nvc0 to SConscript.
Vinson Lee [Tue, 25 Jan 2011 01:48:24 +0000 (17:48 -0800)]
scons: Add nvc0 to SConscript.

13 years agovega: implement handler/pointer conversion using a hash table
Brian Paul [Sun, 23 Jan 2011 18:47:03 +0000 (11:47 -0700)]
vega: implement handler/pointer conversion using a hash table

Before, we were just casting between 32-bit VGHandles and 64-bit pointers.

13 years agovega: remove redundant functions found elsewhere
Brian Paul [Sun, 23 Jan 2011 18:47:03 +0000 (11:47 -0700)]
vega: remove redundant functions found elsewhere

13 years agovega: replace casts with pointer/handle conversion functions
Brian Paul [Sun, 23 Jan 2011 18:47:03 +0000 (11:47 -0700)]
vega: replace casts with pointer/handle conversion functions

Per the spec, all OpenVG handles are 32-bit.  We can't just cast them
to/from integers on 64-bit systems.

Start fixing that mess by introducing a set of handle/pointer conversion
functions in handle.h.  The next step is to implement a handle/pointer
hash table...

13 years agoglx: fix request lengths
Julien Cristau [Sun, 23 Jan 2011 16:26:35 +0000 (08:26 -0800)]
glx: fix request lengths

We were sending too long requests for GLXChangeDrawableAttributes,
GLXGetDrawableAttributes, GLXDestroyPixmap and GLXDestroyWindow.

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

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agosvga: Add more swrast debuging
Jakob Bornecrantz [Wed, 29 Dec 2010 11:50:59 +0000 (12:50 +0100)]
svga: Add more swrast debuging

13 years agosvga: Use get once helpers for context debug envs
Jakob Bornecrantz [Wed, 29 Dec 2010 08:59:28 +0000 (09:59 +0100)]
svga: Use get once helpers for context debug envs

13 years agorbug: Fix surface reference leak
Jakob Bornecrantz [Thu, 16 Dec 2010 04:33:46 +0000 (05:33 +0100)]
rbug: Fix surface reference leak

13 years agoglsl: Fix mingw crosscompile
Jakob Bornecrantz [Mon, 24 Jan 2011 22:26:03 +0000 (23:26 +0100)]
glsl: Fix mingw crosscompile

13 years agor600g: FLT_TO_INT* are vector instructions on Evergreen.
Henri Verbeet [Mon, 24 Jan 2011 23:27:50 +0000 (00:27 +0100)]
r600g: FLT_TO_INT* are vector instructions on Evergreen.

FLT_TO_INT is a vector instruction, despite what the (current) documentation
says. FLT_TO_INT_FLOOR and FLT_TO_INT_RPI aren't explicitly mentioned in the
documentation, but those are vector instructions too.

13 years agograw: add a test showing the new sampling scheme in action
Zack Rusin [Mon, 24 Jan 2011 22:53:29 +0000 (17:53 -0500)]
graw: add a test showing the new sampling scheme in action

13 years agogallium: implement modern sampling scheme
Zack Rusin [Mon, 24 Jan 2011 22:47:10 +0000 (17:47 -0500)]
gallium: implement modern sampling scheme

largely a merge of the previously discussed origin/gallium-resource-sampling
but updated.
the idea is to allow arbitrary binding of resources, the way opencl, new gl
versions and dx10+ require, i.e.
    DCL RES[0], 2D, FLOAT

    LOAD DST[0], SRC[0], RES[0]
    SAMPLE DST[0], SRC[0], RES[0], SAMP[0]

13 years agost/mesa: Enable EXT_texture_format_BGRA8888 for gles1/2
Benjamin Franzke [Fri, 21 Jan 2011 13:29:32 +0000 (14:29 +0100)]
st/mesa: Enable EXT_texture_format_BGRA8888 for gles1/2

13 years agost/mesa: support internalFormat=GL_BGRA in TexImage2D
Benjamin Franzke [Fri, 21 Jan 2011 13:29:06 +0000 (14:29 +0100)]
st/mesa: support internalFormat=GL_BGRA in TexImage2D

13 years agomesa/es: require internalFormat==format in TexImage2D
Benjamin Franzke [Fri, 21 Jan 2011 13:26:09 +0000 (14:26 +0100)]
mesa/es: require internalFormat==format in TexImage2D

13 years agomesa: allow internalFormat=GL_BGRA_EXT in TexImage2D
Benjamin Franzke [Fri, 21 Jan 2011 13:24:11 +0000 (14:24 +0100)]
mesa: allow internalFormat=GL_BGRA_EXT in TexImage2D

13 years agomesa: s/movzxw/movzwl/ in read_rgba_span_x86.S
Dimitry Andric [Mon, 24 Jan 2011 21:36:37 +0000 (14:36 -0700)]
mesa: s/movzxw/movzwl/ in read_rgba_span_x86.S

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33386
NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: s/movzx/movzbl/
Dimitry Andric [Mon, 24 Jan 2011 21:34:10 +0000 (14:34 -0700)]
mesa: s/movzx/movzbl/

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33388
NOTE: This is a candidate for the 7.9 and 7.10 branches.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agoglsl: Remove long unused 'configure.ac' file.
Kenneth Graunke [Mon, 24 Jan 2011 18:33:38 +0000 (10:33 -0800)]
glsl: Remove long unused 'configure.ac' file.

This was from way back when glsl2 lived in its own repository.

13 years agodraw: Do not use LLVM's opaque types.
José Fonseca [Mon, 24 Jan 2011 09:48:45 +0000 (09:48 +0000)]
draw: Do not use LLVM's opaque types.

Contrary what the name may suggest, LLVM's opaque types are used for
recursive types -- types whose definition refers itself -- so opaque
types correspond to pre-declaring a structure in C. E.g.:

   struct node;

   struct link {
      ....
      struct node *next;
   };

   struct node {
      struct link link;
   }

Void pointers are also disallowed by LLVM. So the suggested way of creating
what's commonly referred as "opaque pointers" is using byte pointer (i.e.,
uint8_t * ).

13 years agoadd machine generated files to .gitignore
Tim Wiederhake [Mon, 24 Jan 2011 15:59:17 +0000 (07:59 -0800)]
add machine generated files to .gitignore

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agosecure malloc in translate_cache_create
Tim Wiederhake [Mon, 24 Jan 2011 15:59:15 +0000 (07:59 -0800)]
secure malloc in translate_cache_create

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agoosmesa: mklib requires arguments before objects
Christopher James Halse Rogers [Mon, 24 Jan 2011 04:22:47 +0000 (20:22 -0800)]
osmesa: mklib requires arguments before objects

Fixes the build when selecting driver=osmesa and building static libraries.
Otherwise, mklib tries to add the ‘-ltalloc’ object to the archive, which
obviously fails.

Clients which statically link to osmesa will need to link to libtalloc also,
as specified in the Libs.private of osmesa.pc.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33360
NOTE: This is a candidate for the 7.10 branch.

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agost/xorg: Fix build failure against xserver with XF86_CRTC_VERSION < 3.
Michel Dänzer [Mon, 24 Jan 2011 14:48:13 +0000 (15:48 +0100)]
st/xorg: Fix build failure against xserver with XF86_CRTC_VERSION < 3.

Reported by Vinson Lee.

13 years agor300g: remove unused function
Marek Olšák [Mon, 24 Jan 2011 12:30:36 +0000 (13:30 +0100)]
r300g: remove unused function

13 years agor300g: remove any traces of depth_clamp
Marek Olšák [Mon, 24 Jan 2011 12:29:19 +0000 (13:29 +0100)]
r300g: remove any traces of depth_clamp

I couldn't make it work.

GB_TILE_CONFIG.Z_EXTENDED, which enables per-pixel Z clamping, and
VAP_CLIP_CNTL.CLIP_DISABLE, which disables clipping, do help, but they
also add regressions like random graphics corruptions in some games.

13 years agor300g: handle PIPE_CAP_INSTANCED_DRAWING in get_param
Marek Olšák [Mon, 24 Jan 2011 10:39:28 +0000 (11:39 +0100)]
r300g: handle PIPE_CAP_INSTANCED_DRAWING in get_param

13 years agor600c: only colors can be flat shaded
Andre Maasikas [Mon, 24 Jan 2011 08:17:46 +0000 (10:17 +0200)]
r600c: only colors can be flat shaded

fixes stellarium text and menu display

13 years agoutil: Add function logger helpers
Jakob Bornecrantz [Sun, 23 Jan 2011 20:28:44 +0000 (21:28 +0100)]
util: Add function logger helpers

13 years agoRevert "r300g/swtcl: re-enable LLVM"
Jakob Bornecrantz [Mon, 24 Jan 2011 02:25:17 +0000 (03:25 +0100)]
Revert "r300g/swtcl: re-enable LLVM"

This reverts commit 88550083b3857184445075e70fed8b2eed4952a1.

13 years agodraw: Init llvm if not provided
Jakob Bornecrantz [Sun, 23 Jan 2011 04:22:30 +0000 (05:22 +0100)]
draw: Init llvm if not provided

13 years agoi915g: Remove draw_flushes and state that we don't need to track
Jakob Bornecrantz [Mon, 24 Jan 2011 01:03:59 +0000 (02:03 +0100)]
i915g: Remove draw_flushes and state that we don't need to track

13 years agoi915g: Improve constant handling
Jakob Bornecrantz [Sun, 23 Jan 2011 23:35:53 +0000 (00:35 +0100)]
i915g: Improve constant handling

13 years agor300g: Increase fragment shader limits for r400 cards
Tom Stellard [Mon, 13 Dec 2010 17:11:25 +0000 (09:11 -0800)]
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.

13 years agogldirect: remove _NEW_ACCUM
Brian Paul [Sun, 23 Jan 2011 21:06:01 +0000 (14:06 -0700)]
gldirect: remove _NEW_ACCUM

13 years agoi965: remove _NEW_ACCUM
Brian Paul [Sun, 23 Jan 2011 21:03:01 +0000 (14:03 -0700)]
i965: remove _NEW_ACCUM

13 years agonvc0: implement point coord replacement
Christoph Bumiller [Sun, 23 Jan 2011 20:29:30 +0000 (21:29 +0100)]
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.

13 years agomesa: add ARB_framebuffer_sRGB as alias of the EXT variant
Marek Olšák [Sun, 23 Jan 2011 12:28:06 +0000 (13:28 +0100)]
mesa: add ARB_framebuffer_sRGB as alias of the EXT variant

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: return GL_LINEAR for ..COLOR_ENCODING if framebuffer_sRGB is unsupported
Marek Olšák [Sun, 23 Jan 2011 12:26:43 +0000 (13:26 +0100)]
mesa: return GL_LINEAR for ..COLOR_ENCODING if framebuffer_sRGB is unsupported

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agovega: sort filenames in Makefile, SConscript
Brian Paul [Sun, 23 Jan 2011 17:06:24 +0000 (10:06 -0700)]
vega: sort filenames in Makefile, SConscript

13 years agomesa: get rid of _NEW_ACCUM, clean-up _NEW_* #defines
Brian Paul [Sun, 23 Jan 2011 16:48:49 +0000 (09:48 -0700)]
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.

13 years agomesa: smarter glTexParameter state invalidation
Brian Paul [Sun, 23 Jan 2011 16:10:35 +0000 (09:10 -0700)]
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.

13 years agor300g: support sRGB colorbuffers
Marek Olšák [Sun, 23 Jan 2011 11:53:17 +0000 (12:53 +0100)]
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.

13 years agor300/compiler: remove any code related to relative addressing of temporaries
Marek Olšák [Sun, 23 Jan 2011 11:03:59 +0000 (12:03 +0100)]
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).

13 years agonvc0: fix emit_cvt for ceil, floor and trunc
Christoph Bumiller [Sun, 23 Jan 2011 12:09:10 +0000 (13:09 +0100)]
nvc0: fix emit_cvt for ceil, floor and trunc

13 years agonvc0: remove bad assert and emit TEMP movs instead
Christoph Bumiller [Sat, 22 Jan 2011 12:59:47 +0000 (13:59 +0100)]
nvc0: remove bad assert and emit TEMP movs instead

13 years agonvc0: fix address and value slot assignment in load combining
Christoph Bumiller [Sun, 23 Jan 2011 12:05:44 +0000 (13:05 +0100)]
nvc0: fix address and value slot assignment in load combining

13 years agonvc0: don't omit highest bit of branch target
Christoph Bumiller [Fri, 21 Jan 2011 17:40:41 +0000 (18:40 +0100)]
nvc0: don't omit highest bit of branch target

Fixes negative relative branch offsets.

13 years agonvc0: recognize r63 as zero in constant folding
Christoph Bumiller [Fri, 21 Jan 2011 16:04:25 +0000 (17:04 +0100)]
nvc0: recognize r63 as zero in constant folding

13 years agonvc0: add MARK_RING where missing to avoid too many relocs errors
Christoph Bumiller [Fri, 21 Jan 2011 15:52:17 +0000 (16:52 +0100)]
nvc0: add MARK_RING where missing to avoid too many relocs errors

13 years agonvc0: don't apply base vertex to per-instance arrays
Christoph Bumiller [Fri, 21 Jan 2011 15:46:36 +0000 (16:46 +0100)]
nvc0: don't apply base vertex to per-instance arrays

13 years agonvc0: commute sources of SET too if beneficial
Christoph Bumiller [Fri, 21 Jan 2011 15:27:31 +0000 (16:27 +0100)]
nvc0: commute sources of SET too if beneficial

13 years agonvc0: accept neg abs modifiers on lg2
Christoph Bumiller [Fri, 21 Jan 2011 15:23:44 +0000 (16:23 +0100)]
nvc0: accept neg abs modifiers on lg2

13 years agoglsl: Don't assert when the value returned by a function has no rvalue
Ian Romanick [Sun, 23 Jan 2011 01:47:05 +0000 (17:47 -0800)]
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.

13 years agost/mesa: ensure that all pixel paths operation on linear RGB data, not sRGB
Brian Paul [Sun, 23 Jan 2011 01:28:20 +0000 (18:28 -0700)]
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

13 years agosoftpipe: pass surface format to get/put_tile functions
Brian Paul [Sun, 23 Jan 2011 00:18:53 +0000 (17:18 -0700)]
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.

13 years agogallium/util: added pipe_put_tile_rgba_format()
Brian Paul [Sun, 23 Jan 2011 00:06:13 +0000 (17:06 -0700)]
gallium/util: added pipe_put_tile_rgba_format()

13 years agogallium/util: simplify pipe_get_tile_rgba()
Brian Paul [Sun, 23 Jan 2011 00:03:51 +0000 (17:03 -0700)]
gallium/util: simplify pipe_get_tile_rgba()

Implement it in terms of pipe_get_tile_rgba_format()

13 years agogallium/softpipe: replace pipe_get_tile_swizzle()
Brian Paul [Sat, 22 Jan 2011 23:59:22 +0000 (16:59 -0700)]
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.

13 years agosoftpipe: use proper type for format field
Brian Paul [Sat, 22 Jan 2011 23:53:16 +0000 (16:53 -0700)]
softpipe: use proper type for format field

13 years agogallium/util: added util_format_linear()
Brian Paul [Sat, 22 Jan 2011 01:30:46 +0000 (18:30 -0700)]
gallium/util: added util_format_linear()

13 years agost/mesa: update comment, use st_fb_orientation()
Brian Paul [Sat, 22 Jan 2011 00:35:08 +0000 (17:35 -0700)]
st/mesa: update comment, use st_fb_orientation()

13 years agost/mesa: comments in update_viewport()
Brian Paul [Sat, 22 Jan 2011 00:34:42 +0000 (17:34 -0700)]
st/mesa: comments in update_viewport()

13 years agoscons: Add support for GLES.
Chia-I Wu [Fri, 14 Jan 2011 09:50:29 +0000 (17:50 +0800)]
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.

13 years agomapi: ENTRY_CURRENT_TABLE_GET should be stringified.
Chia-I Wu [Fri, 21 Jan 2011 08:56:55 +0000 (16:56 +0800)]
mapi: ENTRY_CURRENT_TABLE_GET should be stringified.

So that it can be renamed to _glapi_get_dispatch.

13 years agoglcpp: Regenerate parser files.
Kenneth Graunke [Sun, 16 Jan 2011 13:38:20 +0000 (05:38 -0800)]
glcpp: Regenerate parser files.

13 years agoglcpp: Remove use of talloc reference counting.
Kenneth Graunke [Sat, 15 Jan 2011 23:20:11 +0000 (15:20 -0800)]
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).

13 years agoglsl, i965: Remove unnecessary talloc includes.
Kenneth Graunke [Wed, 19 Jan 2011 10:56:06 +0000 (02:56 -0800)]
glsl, i965: Remove unnecessary talloc includes.

These are already picked up by ir.h or glsl_types.h.

13 years agora: Use the same context when realloc'ing arrays.
Kenneth Graunke [Fri, 21 Jan 2011 23:39:57 +0000 (15:39 -0800)]
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.

13 years agoglsl: Improve error message when read-only vars are written
Chad Versace [Fri, 21 Jan 2011 21:44:08 +0000 (13:44 -0800)]
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

13 years agoglsl: Mark 'in' variables at global scope as read-only
Chad Versace [Thu, 20 Jan 2011 22:12:16 +0000 (14:12 -0800)]
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

13 years agoglsl: Remove unused class ast_declaration_statment
Chad Versace [Tue, 18 Jan 2011 23:50:14 +0000 (15:50 -0800)]
glsl: Remove unused class ast_declaration_statment

13 years agoi915g: Don't (un)map vbuf on each (un)map call
Jakob Bornecrantz [Wed, 1 Dec 2010 04:49:42 +0000 (05:49 +0100)]
i915g: Don't (un)map vbuf on each (un)map call

13 years agoi915g: Don't do unnecessary copies of constants
Jakob Bornecrantz [Wed, 1 Dec 2010 04:45:42 +0000 (05:45 +0100)]
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.

13 years agoi915g: Don't emit FS constants when VS contants change
Jakob Bornecrantz [Mon, 29 Nov 2010 20:37:09 +0000 (21:37 +0100)]
i915g: Don't emit FS constants when VS contants change

13 years agoi915g: Use slab allocator for transfers
Jakob Bornecrantz [Fri, 3 Dec 2010 18:42:45 +0000 (19:42 +0100)]
i915g: Use slab allocator for transfers

Also remove unused i915_transfer struct

13 years agost/dri: Fix warning
Jakob Bornecrantz [Fri, 21 Jan 2011 17:10:31 +0000 (18:10 +0100)]
st/dri: Fix warning

13 years agor600g: check if hardware blits are possible bevore enabling tilling
Christian König [Sun, 9 Jan 2011 12:18:48 +0000 (13:18 +0100)]
r600g: check if hardware blits are possible bevore enabling tilling

13 years agor600g: FLT_TO_INT_FLOOR is trans instruction
Alex Deucher [Fri, 21 Jan 2011 17:39:07 +0000 (12:39 -0500)]
r600g: FLT_TO_INT_FLOOR is trans instruction

Add missing evergreen FLT_TO_INT_FLOOR instruction.

13 years agomesa: EXT_framebuffer_sRGB interface additions.
Dave Airlie [Sun, 16 Jan 2011 23:45:26 +0000 (09:45 +1000)]
mesa: EXT_framebuffer_sRGB interface additions.

This adds the get/enable enums and internal gl_config storage
for this extension.

In theory this is all that is needed to enable this extension
from what I can see, since its not mandatory to implement the
features if you don't advertise the visuals or the fb configs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600c: get OQ results only for 4 DBs on r600 class
Andre Maasikas [Fri, 21 Jan 2011 09:48:03 +0000 (11:48 +0200)]
r600c: get OQ results only for 4 DBs on r600 class

- since evergreen addition which increased this to 8 depth backends
  other bytes may contain garbage values

13 years agodocs: update README.WIN32 per Karl's request
Brian Paul [Fri, 21 Jan 2011 01:52:39 +0000 (18:52 -0700)]
docs: update README.WIN32 per Karl's request

13 years agointel: Fix typeos from 3d028024 and 790ff232
Ian Romanick [Thu, 20 Jan 2011 21:51:07 +0000 (13:51 -0800)]
intel: Fix typeos from 3d028024 and 790ff232

...and remove egg from face.

13 years agoi915: Set correct values for range/precision of fragment shader types
Ian Romanick [Thu, 20 Jan 2011 20:07:51 +0000 (12:07 -0800)]
i915: Set correct values for range/precision of fragment shader types

13 years agoi965: Set correct values for range/precision of fragment shader types
Ian Romanick [Thu, 20 Jan 2011 20:07:21 +0000 (12:07 -0800)]
i965: Set correct values for range/precision of fragment shader types

13 years agomesa: Set correct values for range/precision of shader integer types
Ian Romanick [Thu, 20 Jan 2011 20:05:38 +0000 (12:05 -0800)]
mesa: Set correct values for range/precision of shader integer types

13 years agomesa: Connect glGetShaderPrecisionFormat into the dispatch table
Ian Romanick [Thu, 20 Jan 2011 20:05:14 +0000 (12:05 -0800)]
mesa: Connect glGetShaderPrecisionFormat into the dispatch table

13 years agosoftpipe: check for null pointers during context create/destroy
Brian Paul [Thu, 20 Jan 2011 20:46:53 +0000 (13:46 -0700)]
softpipe: check for null pointers during context create/destroy

See http://bugs.freedesktop.org/show_bug.cgi?id=32309
Apparently, malloc() is failing during context creation.  Not
checking for nulls here led to crashes elsewhere.

13 years agograw: fix logic error in pixel format selection
Brian Paul [Thu, 20 Jan 2011 20:32:35 +0000 (13:32 -0700)]
graw: fix logic error in pixel format selection

The loop to choose a pixel format for the window was incrementing
'i' after we succeeded in creating the window so if we chose format[0]
for graw_create_window_and_screen() we were putting format[1] in
the pipe_resource template for creating the render target.

This only worked because of the order of the elements in the formats[]
array.

The graw_xlib.c code now properly compares the requested gallium pixel
format against the visual's color layout.

Update all the graw demos to fix the off-by-one-i error.

13 years agoFix the build from 887d2b64
Ian Romanick [Thu, 20 Jan 2011 19:30:14 +0000 (11:30 -0800)]
Fix the build from 887d2b64

Thanks to all the include frobbing, GLuint is not known in some places
that included enums.h.

13 years agomesa: clean-up _mesa_lookup_prim_by_nr()
Brian Paul [Thu, 20 Jan 2011 16:38:49 +0000 (09:38 -0700)]
mesa: clean-up _mesa_lookup_prim_by_nr()

Remove the redundant public _mesa_prim_name[] array.

13 years agomesa: move extra prim mode #defines
Brian Paul [Thu, 20 Jan 2011 16:38:08 +0000 (09:38 -0700)]
mesa: move extra prim mode #defines

13 years agovbo: added comment
Brian Paul [Thu, 20 Jan 2011 16:33:43 +0000 (09:33 -0700)]
vbo: added comment

13 years agomesa: minor formatting fixes
Brian Paul [Thu, 20 Jan 2011 16:10:03 +0000 (09:10 -0700)]
mesa: minor formatting fixes

13 years agost/mesa: clean up the sampler view format code
Brian Paul [Thu, 20 Jan 2011 15:51:07 +0000 (08:51 -0700)]
st/mesa: clean up the sampler view format code

13 years agomesa: document sRGBDecode field
Brian Paul [Thu, 20 Jan 2011 15:50:39 +0000 (08:50 -0700)]
mesa: document sRGBDecode field

13 years agost/mesa: formatting, whitespace fixes
Brian Paul [Thu, 20 Jan 2011 15:38:19 +0000 (08:38 -0700)]
st/mesa: formatting, whitespace fixes

13 years agor600c: bump sq gpr resources if a shader needs more than default
Andre Maasikas [Thu, 20 Jan 2011 11:05:21 +0000 (13:05 +0200)]
r600c: bump sq gpr resources if a shader needs more than default

ideally this should be set once in the beginning of CS but there's
no way to change values there while in the middle of rendering.
For now reemitting SQ setup seems to work probably due to
r700WaitForIdleClean after each render

currently does not to try to decrease values once increased

fixes hangs in glsl-vs-vec4-indexing-temp-src-in-nested-loop-combined
glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined for my rv740
maybe more for other chips

13 years agoglapi: Fix OpenGL and OpenGL ES interop.
Chia-I Wu [Sun, 26 Dec 2010 10:24:13 +0000 (18:24 +0800)]
glapi: Fix OpenGL and OpenGL ES interop.

When --enable-shared-glapi is specified, libGL will share libglapi with
OpenGL ES instead of defining its own copy of glapi.  This makes sure an
app will get only one copy of glapi in its address space.

The new option is disabled by default.  When enabled, libGL and libglapi
must be built from the same source tree and distributed together.  This
requirement comes from the fact that the dispatch offsets used by these
libraries are re-assigned whenever GLAPI XMLs are changed.

For GLX, indirect rendering for has_different_protocol() functions is
tricky.  A has_different_protocol() function is assigned only one
dispatch offset, yet each entry point needs a different protocol opcode.
It cannot be supported by the shared glapi.  The fix to this is to make
glXGetProcAddress handle such functions specially before calling
_glapi_get_proc_address.

Note that these files are automatically generated/re-generated

 src/glx/indirect.c
 src/glx/indirect.h
 src/mapi/glapi/glapi_mapi_tmp.h

13 years agoglapi: Fix OpenGL ES 1.1 and 2.0 interop.
Chia-I Wu [Sun, 26 Dec 2010 10:02:59 +0000 (18:02 +0800)]
glapi: Fix OpenGL ES 1.1 and 2.0 interop.

Move _glapi_* symbols from libGLESv1_CM.so and libGLESv2.so to
libglapi.so.  This makes sure an app will get only one copy of glapi in
its address space.

Note that with this change, libGLES* and libglapi must be built from the
same source tree and distributed together.  This requirement comes from
the fact that the dispatch offsets used by these libraries are
re-assigned whenever GLAPI XMLs are changed.