Commit Graph

53003 Commits

Author SHA1 Message Date
Vinson Lee 9549e55f11 scons: Disable build of assembly sources on Cygwin.
The assembly sources currently do not build on Cygwin.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-28 23:29:10 -07:00
Jordan Justen 00905dbf19 mesa: allow MESA_GL_VERSION_OVERRIDE to override the API type
Change the format to MAJOR.MINOR[FC]
For example: 2.1, 3.0FC, 3.1

The FC suffix indicates a forward compatible context, and
is only valid for versions >= 3.0.

Examples:
2.1:   GL Legacy/Compatibility context
3.0:   GL Legacy/Compatibility context
3.0FC: GL Core Profile context + Forward Compatible
3.1:   GL Core Profile context
3.1FC: GL Core Profile context + Forward Compatible

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 16:15:51 -07:00
Ian Romanick e87c63f288 i965: brwInitVtbl needs to know the chipset generation
Fixes major regressions since de958de.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-09-28 15:39:17 -07:00
Ian Romanick de958de71b i915: Don't free the intel_context structure when intelCreateContext fails.
intelDestroyContext will eventually be called, and it will clean things up.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
2012-09-28 15:05:24 -07:00
Ian Romanick 87f26214d6 i965: Don't free the intel_context structure when intelCreateContext fails.
intelDestroyContext will eventually be called, and it will clean things
up.  The call to brwInitVtbl is moved earlier so that
intelDestroyContext can call the device-specific destructor.  This also
makes the code look more like the i915 code.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
2012-09-28 15:05:24 -07:00
Ian Romanick 22897c7497 intel: Don't call intelDestroyContext if there is no context to destroy
Some error paths in the device-specific context creation functions can exit
before the deintel_context structure is allocated.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
2012-09-28 15:05:24 -07:00
Ian Romanick f93cb0bebb dri_util: Use calloc to allocate __DRIcontext
The __DRIcontext contains some pointers, and some drivers check for them to be
NULL in some failure paths.  Instead of sprinkling NULL assignments across the
various drivers, just zero out the whole thing.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Lu Hua <huax.lu@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301
2012-09-28 15:05:24 -07:00
Jordan Justen 4c704e5949 main/version: add "(Core Profile) to version string for core profiles
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-28 14:17:12 -07:00
Eric Anholt 7ae332dc6d glx: Fix compile warnings since 99fee476a1
_glapi_table is a struct full of named function pointers, while the generated
code just wants to treat it as an array of function pointers.  Cast to avoid
the compiler warning.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-09-28 14:00:24 -07:00
Ian Romanick 66159f94a5 mesa/tests: Sanity check the ES2 dispatch table
This test is only built when shared-glapi is used.  Because of changes
elsewhere in the tree that were necessary to make shared-glapi work
correct with GLX, it's not feasible to make the test function both ways.

The list of expected functions originally came from the functions set by
api_exec_es2.c.  This file no longer exists in Mesa (but api_exec_es1.c
is still generated).  It was the generated file that configured the
dispatch table for ES2 contexts.  This test verifies that all of the
functions set by the old api_exec_es2.c (with the recent addition of VAO
functions) are set in the dispatch table and everything else is a NOP.

When adding ES2 (or ES3) extensions that add new functions, this test
will need to be modified to expect dispatch functions for the new
extension functions.

v2: Expect VAO functions be non-NOP.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-09-28 08:19:54 -07:00
Ian Romanick d0e1428349 mesa/main: Make no-op dispatch function public
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-09-28 08:19:54 -07:00
Ian Romanick 9c59d11cd2 mesa/tests: Move stub function to a separate file
When building with shared-glapi, we can just use Mesa's _mesa_warning without
problems.  stubs.cpp is only used when shared-glapi is not used.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-09-28 08:19:54 -07:00
Ian Romanick 6c01a0e770 mesa: Don't set uniform dispatch pointers for many things in ES2 or core
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:54 -07:00
Ian Romanick be66cf950e mesa: Don't set shaderapi dispatch pointers for many things in ES2 or core
v2: Allow GL_ARB_shader_objects functions in core profile because we
still expose the extension string there.  Don't allow
glBindFragDataLocation in GLES3 because it's not part of that API.
Based (mostly) on review comments from Eric Anholt.

NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:54 -07:00
Ian Romanick aa0f588e2d mesa: Don't set vtxfmt dispatch pointers for many things in ES2 or core
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:54 -07:00
Ian Romanick a13c07f752 mesa: Don't set loopback dispatch pointers for most things in ES2 or core
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:54 -07:00
Ian Romanick 3ef9e43865 mesa: Pass GL context to _mesa_create_save_table
This isn't used by this patch, but it will be necessary for several
follow-on patches.  Separating this out will make it easier to reorder
patches later.

NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick ee77061277 mesa: Don't set dispatch pointer for glTexStorage in ES2
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick 7f7268d385 mesa: Don't set dispatch pointer for glGetProgramivARB in ES2
This function is not the same as glGetProgramiv.

NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick a83b01371e mesa: Don't set dispatch pointer for glResizeBuffersMESA in ES2
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick 1c0a44aaf5 mesa: Don't set dispatch pointers for glPointParameter[if][v] in ES2
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick 2a3a68e4c7 mesa: Don't set dispatch pointers for glClearDepth or glDepthRange in ES2
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick 11927bfc4a mesa: Don't set dispatch pointer for glGetBufferSubData in ES2
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick 850412b8ab mesa: Don't set dispatch pointer for glGetDoublev in ES2
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick aa129b0833 mesa: Don't set dispatch pointer for glPointSize in ES2
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick 66b956618e mesa: Set dispatch pointer for glShaderBinary
NOTE: This is a candiate for stable branches

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-28 08:19:53 -07:00
Ian Romanick 23ff634c9c gles2: Alias glReadBufferNV with desktop glReadBuffer
NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kristian Høgsberg <krh@bitplanet.net>
2012-09-28 08:19:53 -07:00
Chad Versace b589128620 intel: Fix yet-another-bug in intel_texsubimage_tiled_memcpy
The most recent commit that touched this function,

    commit b1d0fe022d
    Author: Chad Versace <chad.versace@linux.intel.com>
    Date:   Wed Sep 26 11:05:12 2012 -0700

        intel: Fix segfault in intel_texsubimage_tiled_memcpy

did fix the segfault, but introduced yet another bug. From Anholt: """You
need to still test format/type, because that's the incoming format (e.g.
GL_RGBA/GL_FLOAT) that you're trying to memcpy."""

This patch re-introduces the checks on the incoming format and type.

Note: This is a candidate for the 9.0 branch.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-28 05:04:33 -07:00
Vinson Lee d239cb1ccf mesa: Fix typo in error message.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2012-09-27 22:32:10 -07:00
Vincent Lejeune 92b3a99ce5 r600g: add some members to radeon_llvm_context
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2012-09-28 01:46:38 +02:00
Vincent Lejeune a1a3792b18 r600g: tgsi-to-llvm path is taken after declarations have been parsed
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2012-09-28 01:46:23 +02:00
Kenneth Graunke 3767b25bd3 meta: Use float for temporary images, not (un)signed normalized.
In commit 091eb15b69, Jordan changed get_temp_image_type() to use
_mesa_get_format_datatype() instead of returning GL_FLOAT.  That has
several possible return values: GL_FLOAT, GL_INT, GL_UNSIGNED_INT,
GL_SIGNED_NORMALIZED, and GL_UNSIGNED_NORMALIZED.

We do want to use GL_INT/GL_UNSIGNED_INT for integer formats.  However,
we want to continue using GL_FLOAT for the normalized fixed-point types.
There isn't any code in pack.c to handle GL_(UN)SIGNED_NORMALIZED.

Fixes oglconform's fboarb advanced.blit.copypix, which was regressed by
commit 091eb15b69.

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53573
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 15:37:04 -07:00
Chad Versace 7dc0be8a8b intel: Don't advertise GLX_SWAP_COPY_OML
This patch removes all gl_config's with swapMethod=GLX_SWAP_COPY_OML. When
page flipping, we are unable to comply with swap-copy semantics.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-27 14:32:40 -07:00
Eric Anholt e917ed6eee i965: Remove stale comment about rebuilding tnl_program.
It gets built in Mesa core before we're called these days.

Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 13:22:52 -07:00
Eric Anholt 7f9e1a7720 i965: Add a comment explaining one of the brw_draw_upload.c loops.
Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 13:22:49 -07:00
Eric Anholt 0334e8dc25 i965: Remove broken non-interleaved-to-interleaved upload code.
This failed when all the uploads to occur were uniform-type vertex data (like
glColor4f being active across a DrawArrays), because it would upload 1 element
instead of 1 element per vertex.  There was no citation for how this code
helped any particular application, and it breaks ETQW, so just remove it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47170
NOTE: This is a candidate for the 9.0 and 8.0 branches.
Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 13:22:43 -07:00
Eric Anholt f3984fbe33 intel: Remove dead intel_format_to_rb_datatype.
This was for some of the old spans-related code that is now gone.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 12:52:53 -07:00
Eric Anholt 9ba6f4733c intel: Mark some file-local code as static.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 12:52:53 -07:00
Eric Anholt e0cd633f17 i965: Mark brw_disasm.c tables as static const.
v2: Make the strings in the tables const, too.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 12:52:53 -07:00
Eric Anholt 837f06b42f i965: Use visibility cflags on the driver code.
The only symbols that need to be public (those in intel_screen.c that the
loader looks for) are already marked public.  Saves 100k of compiled driver
size.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-09-27 12:52:53 -07:00
Eric Anholt 0f331bd385 i965/vp: Remove support for non-ARB_vp, non-NV_vp opcodes.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 12:52:53 -07:00
Eric Anholt 57bd069849 i965/vp: Remove support for relative addressing of destination registers.
This was added for GLSL support back in the day.  It's prohibited by both
ARB_vp and NV_vp.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 12:52:53 -07:00
Eric Anholt 410197974b i965/vp: Remove support for reading destination registers.
It's prohibited by ARB_vp and NV_vp, and not used by fixed function t&l.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 12:52:53 -07:00
Eric Anholt 7a7081c45a i965/vp: Remove support for GLSL flow control from the old VS backend.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-27 12:52:53 -07:00
Matt Turner 9ed00075d8 build: Link libglapi with pthreads
NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=839060
          https://bugs.gentoo.org/show_bug.cgi?id=435152
Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-09-27 10:25:26 -07:00
Matt Turner 7da12426f7 build: Use AX_PTHREAD to detect pthreads
NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-09-27 10:25:20 -07:00
Marek Olšák 96f50d0cf7 r600g: fix EXP on Cayman
NOTE: This is a candidate for the stable branches.
2012-09-27 19:14:44 +02:00
Marek Olšák fd5c538464 r600g: fix RSQ of negative value on Cayman
NOTE: This is a candidate for the stable branches.
2012-09-27 19:14:44 +02:00
Marek Olšák 836325bf7e r600g: fix instance divisor on Cayman
Not sure if this is the best way to fix it.

NOTE: This is a candidate for the stable branches.
2012-09-27 19:14:44 +02:00
Marek Olšák 933faae2b8 r600g: flush FMASK and CMASK when changing colorbuffers on Evergreen
This fixes rare graphical corruption.

NOTE: This is a candidate for the stable branches.
2012-09-27 19:14:44 +02:00