st/mesa: add a few comments in st_create_context_priv()
mesa: remove PFNGLBLENDCOLORPROC, PFNGLBLENDEQUATIONPROC typedefs in gl.h

Fixes error about duplicated typedefs (also in glext.h) reported on
NetBSD 6.1

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70546
Tested-by:  Vinson Lee <vlee@freedesktop.org>
glsl: Treat layout-qualifier-id's as case-insensitive in desktop GLSL.

In desktop GLSL, location qualifiers are case-insensitive.  In GLSL
ES, they are case-sensitive.  This patch handles the difference by
using a new function to match layout qualifiers,
match_layout_qualifier(), which calls either strcmp() or strcasecmp()
as appropriate.

Fixes piglit tests:
- layout-not-case-sensitive-in.geom
- layout-not-case-sensitive-max-vert.geom
- layout-not-case-sensitive-out.geom
- layout-not-case-sensitive.frag

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl: In update_max_array_access, fix interface instance check.

In commit f878d20 (glsl: Update ir_variable::max_ifc_array_access
properly), I accidentally used the wrong kind of check to determine
whether the variable being accessed was an interface instance (I used
var->get_interface_type() != NULL when I should have used
var->is_interface_instance()).  As a result, if an unnamed interface
block contained a struct which contained an array,
update_max_array_access() would mistakenly interpret the struct as a
named interface block and try to dereference a null
var->max_ifc_array_access.

This patch corrects the check, fixing the null dereference.

Fixes piglit test interface-block-struct-nesting.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70368

Reviewed-by: Matt Turner <mattst88@gmail.com>
i965: Un-virtualize brw_finish_batch().

Since the i915/i965 split, there's only one implementation of this
virtual function.  We may as well just call it directly.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Un-virtualize brw_new_batch().

Since the i915/i965 split, there's only one implementation of this
virtual function.  We may as well just call it directly.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Unindent the body of intelDestroyContext.

Having almost the entire body of the function indented one level for a
check that should never happen seems silly.  Just early return.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Replace dri_bo_release with drm_intel_bo_unreference.

dri_bo_release is a helper function that calls drm_intel_bo_unreference
but then also sets the pointer to NULL.  This is unnecessary, since
brw_destroy_context is called from intelDestroyContext, which also frees
brw completely.

If you're still trying to access them, you've got bigger problems.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Merge brw_destroy_context() into intelDestroyContext().

Now that i915 and i965 have been split, the separation between
intelDestroyContext and brw_destroy_context is kind of arbitrary.

This patch replaces the only brw->vtbl.destroy() call with the body
of brw_destroy_context (the only implementation of that virtual
function).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Fold brwInitVtbl() into brwCreateContext().

With most of the virtual functions gone, brwInitVtbl() is now tiny.

Merging it into the caller allows us to delete the entire file.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
glsl: Fix MSVC build (missing strcasecmp())

MSVC doesn't have a strcasecmp() function; it uses _stricmp() instead.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
scons: Simplified fix of llvm cxxflags for rtti

* Based on ideas of Jose Fonseca
* A rework of ce8eadb6e8

Tested-by: Vinson Lee <vlee@freedesktop.org>
rtasm: The heap is NX on 64-bit Cygwin, so use the rtasm_exec_malloc() implementation which uses mmap()

The heap is NX on 64-bit Cygwin, so use the rtasm_exec_malloc() implementation
which uses mmap() to allocate an anonymous page with execute permission, rather
than the one which just uses malloc().

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Brian Paul <brianp@vmware.com>
rtasm: Cygwin uses the msabi calling convention on x86_64

Cygwin also uses the msabi calling convention on x86_64, not the sysvabi calling
convention

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Brian Paul <brianp@vmware.com>

ignored, and an empty message aborts the commit.
translate_sse: Fix generated code argument handling for msabi on x86_64

translate_sse.c contains code for msabi on x86_64, but it appears to be
untested.

Currently arguments 1 and 2 passed to the generated code are moved as 32-bit
quantities into the registers used by sysvabi, irrespective of the architecture.
Since these may be pointers, they must be moved as 64-bit quantities to avoid
truncation.

Commit f4dd0991719ef3e2606920c5100b372181c60899 disabled tranlate_sse.c on MinGW
x86_64, I don't know if was due to this issue, or a different one...

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Brian Paul <brianp@vmware.com>
i965: Enable OpenGL 3.3 and GLSL 3.30.

Everything necessary for these appears to be implemented.  We'll want to
add more tests to guard against bugs, but it should be functionally
complete.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
docs: Note that we support OpenGL 3.3 in the release notes.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
docs: Import 9.2.2 release notes, add news item.
mesa: Remove GLXContextID typedef from glx.h.

Fixes this build error.

  CC     clientattrib.lo
In file included from ../../include/GL/glx.h:333,
                 from glxclient.h:45,
                 from clientattrib.c:32:
../../include/GL/glxext.h:275: error: redefinition of typedef ‘GLXContextID’
../../include/GL/glx.h:171: note: previous declaration of ‘GLXContextID’ was here

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70591
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
glsl: Initialize per_vertex_accumulator::fields.

Fixes "Uninitialized pointer field" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>