mesa.git
13 years agost/mesa: fix a regression from cae2bb76
Fredrik Höglund [Thu, 6 Jan 2011 22:12:08 +0000 (23:12 +0100)]
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>
13 years agonvc0: disable calling of sw methods we don't implement
Ben Skeggs [Thu, 13 Jan 2011 05:25:37 +0000 (15:25 +1000)]
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>
13 years agomesa/fbo: prevent assert trigger on i965 with piglit fbo-srgb test.
Dave Airlie [Thu, 13 Jan 2011 05:16:11 +0000 (15:16 +1000)]
mesa/fbo: prevent assert trigger on i965 with piglit fbo-srgb test.

13 years agonvc0: fix mp_stack_bo relocation
Ben Skeggs [Thu, 13 Jan 2011 03:23:55 +0000 (13:23 +1000)]
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>
13 years agomesa: Move loop variable declarations outside for loop in extensions.c.
Vinson Lee [Thu, 13 Jan 2011 01:43:28 +0000 (17:43 -0800)]
mesa: Move loop variable declarations outside for loop in extensions.c.

Fixes MSVC build.

13 years agomesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()
Brian Paul [Thu, 13 Jan 2011 01:14:14 +0000 (18:14 -0700)]
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.

13 years agomesa: don't assert in GetIntegerIndexed, etc
Brian Paul [Thu, 13 Jan 2011 01:12:46 +0000 (18:12 -0700)]
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.

13 years agomesa: fix num_draw_buffers==0 in fixed-function fragment program generation
Brian Paul [Thu, 13 Jan 2011 00:32:00 +0000 (17:32 -0700)]
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.

13 years agost/mesa: add st_BeginQuery() case for GL_ANY_SAMPLES_PASSED
Brian Paul [Wed, 12 Jan 2011 21:50:41 +0000 (14:50 -0700)]
st/mesa: add st_BeginQuery() case for GL_ANY_SAMPLES_PASSED

Fixes piglit occlusion_query2 failure.

13 years agoglsl: remove trailing comma to silence warning
Brian Paul [Wed, 12 Jan 2011 21:39:42 +0000 (14:39 -0700)]
glsl: remove trailing comma to silence warning

13 years agonoop: change var type to silence warning
Brian Paul [Wed, 12 Jan 2011 21:39:24 +0000 (14:39 -0700)]
noop: change var type to silence warning

13 years agoglsl/Makefile: Fix build with --as-needed.
Kenneth Graunke [Thu, 13 Jan 2011 00:37:03 +0000 (16:37 -0800)]
glsl/Makefile: Fix build with --as-needed.

13 years agomesa: Move declaration before code in extensions.c.
Vinson Lee [Thu, 13 Jan 2011 00:23:11 +0000 (16:23 -0800)]
mesa: Move declaration before code in extensions.c.

Fixes SCons build.

13 years agomesa: Change OES_point_sprite to depend on ARB_point_sprite
Chad Versace [Wed, 12 Jan 2011 23:21:23 +0000 (15:21 -0800)]
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>
13 years agomesa: Change dependencies of some OES extension strings
Chad Versace [Tue, 11 Jan 2011 22:56:13 +0000 (14:56 -0800)]
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>
13 years agomesa: Add/remove extensions in extension string
Chad Versace [Mon, 10 Jan 2011 05:53:52 +0000 (21:53 -0800)]
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>
13 years agomesa: Refactor handling of extension strings
Chad Versace [Sun, 9 Jan 2011 18:53:52 +0000 (10:53 -0800)]
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>
13 years agoglsl: Track variable usage, use that to enforce semantics
Ian Romanick [Sat, 8 Jan 2011 02:34:58 +0000 (18:34 -0800)]
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.

13 years agoi965/fs: Do flat shading when appropriate.
Eric Anholt [Wed, 12 Jan 2011 20:52:16 +0000 (12:52 -0800)]
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.

13 years agor600g: also look at tex inst when for maximum gpu count
Christian König [Wed, 12 Jan 2011 19:39:40 +0000 (20:39 +0100)]
r600g: also look at tex inst when for maximum gpu count

13 years agogenerate_builtins.py: Add missing import.
Vinson Lee [Wed, 12 Jan 2011 19:35:43 +0000 (11:35 -0800)]
generate_builtins.py: Add missing import.

Import sys for sys.exit.

13 years agometa: Actually use mipmapping when generating mipmaps.
Eric Anholt [Wed, 12 Jan 2011 18:12:00 +0000 (10:12 -0800)]
meta: Actually use mipmapping when generating mipmaps.

With the change to not reset baselevel, this GL_LINEAR filtering was
resulting in generating mipmaps off of the base level instead of the
next higher detail level.  Fixes fbo-generatemipmap-filtering.

Reported by: Neil Roberts <neil@linux.intel.com>

13 years agoi965: Clarify when we need to (re-)calculate live intervals.
Eric Anholt [Wed, 12 Jan 2011 18:10:01 +0000 (10:10 -0800)]
i965: Clarify when we need to (re-)calculate live intervals.

The ad-hoc placement of recalculation somewhere between when they got
invalidated and when they were next needed was confusing.  This should
clarify what's going on here.

13 years agor600g: implement output modifiers and use them to further optimize LRP
Christian König [Thu, 16 Dec 2010 15:42:14 +0000 (16:42 +0100)]
r600g: implement output modifiers and use them to further optimize LRP

13 years agor600g: use special constants for 0, 1, -1, 1.0f, 0.5f etc
Christian König [Tue, 14 Dec 2010 22:38:30 +0000 (23:38 +0100)]
r600g: use special constants for 0, 1, -1, 1.0f, 0.5f etc

13 years agor600g: optimize temp register handling for LRP
Christian König [Tue, 14 Dec 2010 19:49:31 +0000 (20:49 +0100)]
r600g: optimize temp register handling for LRP

13 years agor600g: optimize away CF_INST_POP
Christian König [Mon, 13 Dec 2010 23:43:53 +0000 (00:43 +0100)]
r600g: optimize away CF_INST_POP

If last instruction is an CF_INST_ALU we don't need to emit an
additional CF_INST_POP for stack clean up after an IF ELSE ENDIF.

13 years agor600g: make dumping of shaders an option
Christian König [Wed, 12 Jan 2011 18:02:03 +0000 (19:02 +0100)]
r600g: make dumping of shaders an option

13 years agor600g: fix alu dumping
Christian König [Fri, 17 Dec 2010 21:57:36 +0000 (22:57 +0100)]
r600g: fix alu dumping

13 years agor600g: improve r600_bc_dump
Christian König [Thu, 16 Dec 2010 21:05:33 +0000 (22:05 +0100)]
r600g: improve r600_bc_dump

13 years agoi965/vs: When MOVing to produce ABS, strip negate of the operand.
Eric Anholt [Wed, 12 Jan 2011 17:40:05 +0000 (09:40 -0800)]
i965/vs: When MOVing to produce ABS, strip negate of the operand.

We were returning the negative absolute value, instead of the absolute
value.  Fixes glsl-vs-abs-neg.

13 years agoi965/fs: When producing ir_unop_abs of an operand, strip negate.
Eric Anholt [Wed, 12 Jan 2011 17:37:07 +0000 (09:37 -0800)]
i965/fs: When producing ir_unop_abs of an operand, strip negate.

We were returning the negative absolute value, instead of the absolute
value.  Fixes glsl-fs-abs-neg.

13 years agoglsl: Make builtin_compiler build on Windows with MSVC.
José Fonseca [Wed, 12 Jan 2011 16:58:37 +0000 (16:58 +0000)]
glsl: Make builtin_compiler build on Windows with MSVC.

13 years agoglsl: Make builtin_compiler portable for non-unices.
José Fonseca [Wed, 12 Jan 2011 16:31:07 +0000 (16:31 +0000)]
glsl: Make builtin_compiler portable for non-unices.

13 years agogetopt: Make code more portable.
José Fonseca [Wed, 12 Jan 2011 16:08:22 +0000 (16:08 +0000)]
getopt: Make code more portable.

13 years agogetopt: Import OpenBSD getopt implementation for MSVC.
José Fonseca [Wed, 12 Jan 2011 15:32:17 +0000 (15:32 +0000)]
getopt: Import OpenBSD getopt implementation for MSVC.

13 years agoscons: Update windows build for vgapi->openvg rename.
José Fonseca [Wed, 12 Jan 2011 15:13:57 +0000 (15:13 +0000)]
scons: Update windows build for vgapi->openvg rename.

13 years agoscons: Fix build on systems without libOpenVG.so
José Fonseca [Wed, 12 Jan 2011 15:06:57 +0000 (15:06 +0000)]
scons: Fix build on systems without libOpenVG.so

13 years agoegl: When EGL_DRIVER is set, do not add other drivers.
Chia-I Wu [Wed, 12 Jan 2011 09:49:43 +0000 (17:49 +0800)]
egl: When EGL_DRIVER is set, do not add other drivers.

Setting EGL_DRIVER forces the driver to be loaded, as documented.  There
should be no fallbacks.

13 years agoegl: libEGL depends on LOCAL_LIBS.
Chia-I Wu [Wed, 12 Jan 2011 10:09:12 +0000 (18:09 +0800)]
egl: libEGL depends on LOCAL_LIBS.

So that libEGL is rebuilt whenever LOCAL_LIBS changes.

13 years agoegl_dri2: Fix eglGetProcAddress.
Chia-I Wu [Wed, 12 Jan 2011 10:06:47 +0000 (18:06 +0800)]
egl_dri2: Fix eglGetProcAddress.

The driver struct is zeroed after dri2_load.  Oops.

13 years agoscons: Updates for targets/egl-static.
Chia-I Wu [Sun, 9 Jan 2011 15:37:32 +0000 (23:37 +0800)]
scons: Updates for targets/egl-static.

Update SConscripts to re-enable or add support for EGL on windows and
x11 platforms respectively.  targets/egl-gdi is replaced by
targets/egl-static, where "-static" means pipe drivers and state
trackers are linked to statically by egl_gallium, and egl_gallium is a
built-in driver of libEGL.  There is no more egl_gallium.dll on Windows.

13 years agotargets/egl-static: New EGL target for scons.
Chia-I Wu [Mon, 10 Jan 2011 04:39:46 +0000 (12:39 +0800)]
targets/egl-static: New EGL target for scons.

This target is based on and replaces egl-gdi.  It is suitable for both
windows and x11.

13 years agoglsl: Add type inference support for remaining expression opcodes.
Kenneth Graunke [Tue, 7 Dec 2010 00:00:24 +0000 (16:00 -0800)]
glsl: Add type inference support for remaining expression opcodes.

13 years agoi965: Tighten up the check for flow control interfering with coalescing.
Eric Anholt [Tue, 11 Jan 2011 23:13:49 +0000 (15:13 -0800)]
i965: Tighten up the check for flow control interfering with coalescing.

This greatly improves codegen for programs with flow control by
allowing coalescing for all instructions at the top level, not just
ones that follow the last flow control in the program.

13 years agor600g: texture instructions also work fine with TGSI_FILE_INPUT
Christian König [Sun, 12 Dec 2010 14:37:54 +0000 (15:37 +0100)]
r600g: texture instructions also work fine with TGSI_FILE_INPUT

13 years agor600g: DP4 also supports writemasking
Christian König [Tue, 14 Dec 2010 18:32:08 +0000 (19:32 +0100)]
r600g: DP4 also supports writemasking

13 years agor600g: Why all this fiddling with tgsi_helper_copy?
Christian König [Sun, 12 Dec 2010 14:13:39 +0000 (15:13 +0100)]
r600g: Why all this fiddling with tgsi_helper_copy?

tgsi_helper_copy is used on several occasions to copy a temporary result
into the real destination register to emulate writemasks for OP3 and
reduction operations. According to R600 ISA that's unnecessary.

This patch fixes this use for MAD, CMP and DP4.

13 years agor600g: fix tex and vtx joining
Christian König [Thu, 16 Dec 2010 21:23:48 +0000 (22:23 +0100)]
r600g: fix tex and vtx joining

13 years agoglsl: Fix the lowering of variable array indexing to not lose write_masks.
Eric Anholt [Tue, 11 Jan 2011 22:50:19 +0000 (14:50 -0800)]
glsl: Fix the lowering of variable array indexing to not lose write_masks.

Fixes glsl-complex-subscript on 965.

13 years agoi965: Remove dead fallback for stencil _Enabled but no stencil buffer.
Eric Anholt [Tue, 11 Jan 2011 21:34:40 +0000 (13:34 -0800)]
i965: Remove dead fallback for stencil _Enabled but no stencil buffer.

The _Enabled field is the thing that takes into account whether
there's a stencil buffer.  Tested with piglit glx-visuals-stencil.

13 years agor600g: Fixed SIN/COS/SCS for the case where the operand is a literal.
Tilman Sauerbeck [Thu, 6 Jan 2011 20:35:19 +0000 (21:35 +0100)]
r600g: Fixed SIN/COS/SCS for the case where the operand is a literal.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600c: add evergreen ARL support.
Alberto Milone [Thu, 2 Dec 2010 12:34:35 +0000 (13:34 +0100)]
r600c: add evergreen ARL support.

Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
13 years agonoop: remove dead dri target
Jerome Glisse [Tue, 11 Jan 2011 19:46:09 +0000 (14:46 -0500)]
noop: remove dead dri target

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
13 years agor600g: move user fence into base radeon structure
Jerome Glisse [Tue, 11 Jan 2011 19:29:33 +0000 (14:29 -0500)]
r600g: move user fence into base radeon structure

This avoid any issue when context is free and we still try to
access fence through radeon structure.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
13 years agoconfigure: bump libdrm version requirement to 2.4.23
Brian Paul [Tue, 11 Jan 2011 16:42:52 +0000 (09:42 -0700)]
configure: bump libdrm version requirement to 2.4.23

NOTE: This is a candidate for the 7.10 (and 7.9?) branch.

13 years agomesa: include teximage.h to silence warning
Brian Paul [Tue, 11 Jan 2011 16:37:35 +0000 (09:37 -0700)]
mesa: include teximage.h to silence warning

13 years agomesa: do a debug check of _mesa_format_to_type_and_comps()
Brian Paul [Tue, 11 Jan 2011 16:26:03 +0000 (09:26 -0700)]
mesa: do a debug check of _mesa_format_to_type_and_comps()

Make sure that all formats are handled in this function.  It's
easy to miss this function when adding new pixel formats.

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

13 years agomesa: fix a few format table mistakes, assertions
Brian Paul [Tue, 11 Jan 2011 16:23:45 +0000 (09:23 -0700)]
mesa: fix a few format table mistakes, assertions

The BaseFormat field was incorrect for a few R and RG formats.
Fix a couple assertions too.

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

13 years agoglsl: Autogenerate builtin_functions.cpp as part of the build process.
Kenneth Graunke [Fri, 7 Jan 2011 22:30:14 +0000 (14:30 -0800)]
glsl: Autogenerate builtin_functions.cpp as part of the build process.

Python is already necessary for other parts of Mesa, so there's no
reason we can't just generate it.  This patch updates both make and
SCons to do so.

13 years agoglsl: Disallow 'in' and 'out' on globals in GLSL 1.20
Ian Romanick [Sat, 8 Jan 2011 00:05:59 +0000 (16:05 -0800)]
glsl: Disallow 'in' and 'out' on globals in GLSL 1.20

Fixes piglit tests glsl-1.20/compiler/qualifiers/in-01.vert and
glsl-1.20/compiler/qualifiers/out-01.vert and bugzilla #32910.

NOTE: This is a candidate for the 7.9 and 7.10 branches.  This patch
also depends on the previous two commits.

13 years agoglsl: Refresh autogenerated parser file.
Ian Romanick [Sat, 8 Jan 2011 00:04:30 +0000 (16:04 -0800)]
glsl: Refresh autogenerated parser file.

For the previous commit.

13 years agoglsl: Add version_string containing properly formatted GLSL version
Ian Romanick [Sat, 8 Jan 2011 00:03:48 +0000 (16:03 -0800)]
glsl: Add version_string containing properly formatted GLSL version

13 years agoglcpp: Refresh autogenerated lexer and parser files.
Ian Romanick [Tue, 11 Jan 2011 01:38:56 +0000 (17:38 -0800)]
glcpp: Refresh autogenerated lexer and parser files.

For the previous commit.

13 years agoglcpp: Generate an error for division by zero
Ian Romanick [Mon, 10 Jan 2011 21:33:07 +0000 (13:33 -0800)]
glcpp: Generate an error for division by zero

When GCC encounters a division by zero in a preprocessor directive, it
generates an error.  Since the GLSL spec says that the GLSL
preprocessor behaves like the C preprocessor, we should generate that
same error.

It's worth noting that I cannot find any text in the C99 spec that
says this should be an error.  The only text that I can find is line 5
on page 82 (section 6.5.5 Multiplicative Opertors), which says,

    "The result of the / operator is the quotient from the division of
    the first operand by the second; the result of the % operator is
    the remainder. In both operations, if the value of the second
    operand is zero, the behavior is undefined."

Fixes 093-divide-by-zero.c test and bugzilla #32831.

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

13 years agoglcpp: Regenerate glcpp-parse.c
Chad Versace [Tue, 11 Jan 2011 01:09:24 +0000 (17:09 -0800)]
glcpp: Regenerate glcpp-parse.c

13 years agoglcpp: Fix segfault when validating macro redefinitions
Chad Versace [Tue, 11 Jan 2011 00:55:17 +0000 (16:55 -0800)]
glcpp: Fix segfault when validating macro redefinitions

In _token_list_equal_ignoring_space(token_list_t*, token_list_t*), add
a guard that prevents dereferncing a null token list.

This fixes test src/glsl/glcpp/tests/092-redefine-macro-error-2.c and
Bugzilla #32695.

13 years agoi965: Use a new miptree to avoid software fallbacks due to drawing offset.
Eric Anholt [Mon, 10 Jan 2011 23:45:28 +0000 (15:45 -0800)]
i965: Use a new miptree to avoid software fallbacks due to drawing offset.

When attaching a small mipmap level to an FBO, the original gen4
didn't have the bits to support rendering to it.  Instead of falling
back, just blit it to a new little miptree just for it, and let it get
revalidated into the stack later just like any other new teximage.

Bug #30365.

13 years agointel: Drop the speculatively-use-firstImage-mt in validation.
Eric Anholt [Mon, 10 Jan 2011 22:05:20 +0000 (14:05 -0800)]
intel: Drop the speculatively-use-firstImage-mt in validation.

It's been replaced by just setting texObj->mt to image->mt at TexImage
time.

13 years agointel: Don't relayout the texture on maxlevel change.
Eric Anholt [Mon, 10 Jan 2011 22:03:39 +0000 (14:03 -0800)]
intel: Don't relayout the texture on maxlevel change.

This avoids relayouts in the common case of glGenerateMipmap() or
people doing similar things.

Bug #30366.

13 years agointel: When making a new teximage miptree, make a full one.
Eric Anholt [Mon, 10 Jan 2011 20:05:14 +0000 (12:05 -0800)]
intel: When making a new teximage miptree, make a full one.

If we hit this path, we're level 1+ and the base level got allocated
as a single level instead of a full tree (so we don't match
intelObj->mt).  This tries to recover from that so that we end up with
2 allocations and 1 validation blit (old -> new) instead of
allocations equal to number of levels and levels - 1 blits.

13 years agometa: Don't tweak BaseLevel when doing glGenerateMipmap().
Eric Anholt [Mon, 10 Jan 2011 18:50:36 +0000 (10:50 -0800)]
meta: Don't tweak BaseLevel when doing glGenerateMipmap().

We don't need to worry about levels other than MaxLevel because we're
minifying -- the lower levels (higher detail) won't contribute to the
result.  By changing BaseLevel, we forced hardware that doesn't
support BaseLevel != 0 to relayout the texture object.

13 years agoRevert "intel: Always allocate miptrees from level 0, not tObj->BaseLevel."
Eric Anholt [Mon, 10 Jan 2011 18:01:12 +0000 (10:01 -0800)]
Revert "intel: Always allocate miptrees from level 0, not tObj->BaseLevel."

This reverts commit 7ce6517f3ac41bf770ab39aba4509d4f535ef663.
This reverts commit d60145d06d999c5c76000499e6fa9351e11d17fa.

I was wrong about which generations supported baselevel adjustment --
it's just gen4, nothing earlier.  This meant that i915 would have
never used the mag filter when baselevel != 0.  Not a severe bug, but
not an intentional regression.  I think we can fix the performance
issue another way.

13 years agoi965: Add #defines for HiZ and separate stencil buffer commands.
Kenneth Graunke [Mon, 10 Jan 2011 22:31:28 +0000 (14:31 -0800)]
i965: Add #defines for HiZ and separate stencil buffer commands.

13 years agoi965: Add new HiZ related bits to WM_STATE.
Kenneth Graunke [Thu, 21 Oct 2010 23:43:39 +0000 (16:43 -0700)]
i965: Add new HiZ related bits to WM_STATE.

13 years agoi965: Rename more #defines to 3DSTATE rather than CMD or CMD_3D.
Kenneth Graunke [Mon, 10 Jan 2011 22:04:02 +0000 (14:04 -0800)]
i965: Rename more #defines to 3DSTATE rather than CMD or CMD_3D.

Again, this makes it match the documentation.

13 years agoi965: Remove unused #defines which only contain the sub-opcode.
Kenneth Graunke [Mon, 10 Jan 2011 21:36:23 +0000 (13:36 -0800)]
i965: Remove unused #defines which only contain the sub-opcode.

Most _3DSTATE defines contain the command type, sub-type, opcode, and
sub-opcode (i.e. 0x7905).  These, however, contain only the sub-opcode
(i.e. 0x05).  Since they are inconsistent with the rest of the code and
nothing uses them, simply delete them.

The _3DOP and _3DCONTROL defines seemed similar, and were also unused.

13 years agoglsl: At link-time, check that globals have matching centroid qualifiers
Chad Versace [Mon, 10 Jan 2011 23:29:30 +0000 (15:29 -0800)]
glsl: At link-time, check that globals have matching centroid qualifiers

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

13 years agoAdd GLX_TLS setting to configs/default.
Tom Fogal [Mon, 10 Jan 2011 22:37:26 +0000 (15:37 -0700)]
Add GLX_TLS setting to configs/default.

Should have gone in with 31351dc029ff0e12a250e3ffc509f4f01e025a24,
thanks to Dan Nicholson for noticing.

13 years agomesa/swrast: handle sRGB FBOs correctly (v2)
Dave Airlie [Mon, 10 Jan 2011 03:37:38 +0000 (13:37 +1000)]
mesa/swrast: handle sRGB FBOs correctly (v2)

From reading EXT_texture_sRGB and EXT_framebuffer_sRGB and interactions
with FBO I've found that swrast is converting the sRGB values to linear for
blending when an sRGB texture is bound as an FBO. According to the spec
and further explained in the framebuffer_sRGB spec this behaviour is not
required unless the GL_FRAMEBUFFER_SRGB is enabled and the Visual/config
exposes GL_FRAMEBUFFER_SRGB_CAPABLE_EXT.

This patch fixes swrast to use a separate Fetch call for FBOs bound to
SRGB and avoid the conversions.

v2: export _mesa_get_texture_dimensions as per Brian's comments.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoExport TLS support in gl.pc.
Tom Fogal [Mon, 6 Dec 2010 00:58:32 +0000 (17:58 -0700)]
Export TLS support in gl.pc.

13 years agor300g: add debug option for buffer upload logging
Marek Olšák [Sun, 9 Jan 2011 21:40:50 +0000 (22:40 +0100)]
r300g: add debug option for buffer upload logging

13 years agost/egl: Fix a void pointer arithmetic warning.
Chia-I Wu [Sun, 9 Jan 2011 10:18:03 +0000 (18:18 +0800)]
st/egl: Fix a void pointer arithmetic warning.

13 years agomesa: Remove GLES overlay.
Chia-I Wu [Fri, 7 Jan 2011 09:24:16 +0000 (17:24 +0800)]
mesa: Remove GLES overlay.

With core mesa doing runtime API checks, GLES overlay is no longer
needed.  Make --enable-gles-overlay equivalent to --enable-gles[12].
There may still be places where compile-time checks are done.  They
could be fixed case by case.

13 years agoegl: Make egl_dri2 and egl_glx built-in drivers.
Chia-I Wu [Fri, 7 Jan 2011 08:30:08 +0000 (16:30 +0800)]
egl: Make egl_dri2 and egl_glx built-in drivers.

These two drivers are small in size.  Making them built-in should
simplify packaging.

13 years agoegl_glx: Load libGL dynamically.
Chia-I Wu [Fri, 7 Jan 2011 05:42:15 +0000 (13:42 +0800)]
egl_glx: Load libGL dynamically.

This is a step forward for compatibility with really old GLX.  But the
real reason for making this change now is so that we can make egl_glx a
built-in driver without having to link to libGL.

13 years agoegl_dri2: Look up _glapi_get_proc_address dynamically.
Chia-I Wu [Fri, 7 Jan 2011 07:02:41 +0000 (15:02 +0800)]
egl_dri2: Look up _glapi_get_proc_address dynamically.

In preparation for making egl_dri2 built-in.  It also handles

  symbol lookup error: /usr/local/lib/egl/egl_dri2.so: undefined symbol:
  _glapi_get_proc_address

more gracefully.

13 years agor600: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Mon, 10 Jan 2011 02:29:02 +0000 (18:29 -0800)]
r600: Include mfeatures.h in files that perform feature tests.

13 years agor300: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Mon, 10 Jan 2011 02:25:36 +0000 (18:25 -0800)]
r300: Include mfeatures.h in files that perform feature tests.

13 years agor200: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Mon, 10 Jan 2011 02:22:07 +0000 (18:22 -0800)]
r200: Include mfeatures.h in files that perform feature tests.

13 years agonoop: make noop useable like trace or rbug
Jerome Glisse [Mon, 10 Jan 2011 02:04:41 +0000 (21:04 -0500)]
noop: make noop useable like trace or rbug

If you want to enable noop set GALLIUM_NOOP=1 as an env variable.
You need first to enable noop wrapping for your driver see change
to src/gallium/targets/dri-r600/ in this commit as an example.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
13 years agor300g: do not upload the same user buffer several times
Marek Olšák [Sun, 9 Jan 2011 11:15:15 +0000 (12:15 +0100)]
r300g: do not upload the same user buffer several times

Performance++.

13 years agonvc0: implement queries
Christoph Bumiller [Sun, 9 Jan 2011 20:50:06 +0000 (21:50 +0100)]
nvc0: implement queries

13 years agodri2: release texture image.
Juan Zhao [Sun, 9 Jan 2011 17:03:02 +0000 (12:03 -0500)]
dri2: release texture image.

Add release function for texture_from_pixmap extension.
Some platform need to release texture image for texture_from_pixmap
extension, add this interface for those platforms.

13 years agoradeon: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:45:04 +0000 (01:45 -0800)]
radeon: Include mfeatures.h in files that perform feature tests.

13 years agodri/nouveau: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:33:14 +0000 (01:33 -0800)]
dri/nouveau: Include mfeatures.h in files that perform feature tests.

13 years agointel: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:25:54 +0000 (01:25 -0800)]
intel: Include mfeatures.h in files that perform feature tests.

13 years agovbo: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:18:23 +0000 (01:18 -0800)]
vbo: Include mfeatures.h in files that perform feature tests.

13 years agost/mesa: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:04:19 +0000 (01:04 -0800)]
st/mesa: Include mfeatures.h in files that perform feature tests.

13 years agomesa: Include mfeatures.h in program.c.
Vinson Lee [Sun, 9 Jan 2011 08:47:33 +0000 (00:47 -0800)]
mesa: Include mfeatures.h in program.c.

Include mfeatures.h for feature tests.