Compare commits

..

54 Commits

Author SHA1 Message Date
Chih-Wei Huang
2af6b7090a android: enlarge cache_resources 2014-06-05 10:51:43 +08:00
Chih-Wei Huang
06a2d36edc android: get rid of HAL pixelformats 5551 and 4444 2014-01-23 09:24:32 +08:00
Chih-Wei Huang
a48404d26d android: set driver name to debug.mesa.driver 2014-01-23 09:21:39 +08:00
Chih-Wei Huang
9cc0a0d2b0 android: remove log2, log2f
The functions are already defined in the latest bionic.
2013-07-24 01:16:55 +08:00
Chih-Wei Huang
b68e24c438 android: add CleanSpec.mk
To ensure all mesa libs are properly rebuilt.
2013-07-24 01:16:54 +08:00
Chih-Wei Huang
2ed885535b android: fix for jb-x86
Fix the building errors of gallium drivers

* Ensure libmesa_glsl is built with stlport
* Implement program_invocation_short_name for android
* Add libmesa_pipe_radeon for r600g
2013-07-24 01:16:52 +08:00
Chih-Wei Huang
c9f20a7c91 r600g/sb: Fix Android build v2
Add the sb CXX files to the Android Makefile and also stop using some
c++11 features.

v2 (Vadim Girlin): use &bc[0] instead of bc.begin()
2013-07-24 01:16:51 +08:00
Chih-Wei Huang
f5158a9510 android: fix i915_dri build
The error was introduced by the commit 34d4216e64
"Merge per-type *_FILES variables in intel drivers".
2013-07-24 01:16:50 +08:00
Chih-Wei Huang
8a786becea Revert "Only build when BOARD_USE_MESA is true"
This reverts commit 2e6d9f9b5f.
2013-07-24 01:16:03 +08:00
Sean V Kelley
604d73de88 i915: Support Android RGBX8888 format for EGL generated images
Enabled MESA_FORMAT_RGBX8888_REV for RGBX with i915.  Android software
requires RGBX8888 format to be supported for software rendering.
Previously had done so for i965 but have requests for i915 support.

Change-Id: I87c3a8e3f206d75d58b63182ed94851749740762
Signed-off-by: Sean V Kelley <sean.v.kelley@linux.intel.com>
2013-07-23 23:30:49 +08:00
Chia-I Wu
c505b6b604 intel: add support for GL_OES_EGL_image_external
The changes to i965 are untested.
2013-07-23 23:30:28 +08:00
Chia-I Wu
2145cc57d4 i915: enable GL_APPLE_texture_2D_limited_npot
Enable GL_ARB_texture_non_power_of_two for GLESv1 to advertise
GL_APPLE_texture_2D_limited_npo.  The former is actually a superset of
the latter, but we really want to enable NPOT support in some way.
2013-07-23 23:30:06 +08:00
Chia-I Wu
e5fcf46723 android: disable SSE translate
It does not support FIXED and will fail anyway.
2013-07-23 23:30:04 +08:00
Chia-I Wu
03cd5b7ef8 android: advertise GL_ARB_texture_non_power_of_two
It maps to DisplayHardware::NPOT_EXTENSION in SurfaceFlinger.  Does not
seem to matter when EGL_ANDROID_image_native_buffer is available.
2013-07-23 23:30:03 +08:00
Ian Romanick
1aa54e3ac2 glsl: Move all of the var decls to the front of the IR list in reverse order.
This has the (intended!) side effect that vertex shader inputs and
fragment shader outputs will appear in the IR in the same order that
they appeared in the shader code.  This results in the locations being
assigned in the declared order.  Many (arguably buggy) applications
depend on this behavior, and it matches what nearly all other drivers
do.

Fixes the (new) piglit test attrib-assignments.

NOTE: This is a candidate for stable release branches.

Change-Id: I9ee61278dd975eb02f04d5227ea60c0dda0c76e9
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Chad Versace <chad.versace@linux.intel.com>
Issue: AXIA-2742
2013-06-13 08:18:48 -07:00
Ian Romanick
ea2e80e1d0 glsl: Generate smaller values for uniform locations
Previously we would generate uniform locations as (slot << 16) +
array_index.  We do this to handle applications that assume the location
of a[2] will be +1 from the location of a[1].  This resulted in every
uniform location being at least 0x10000.  The OpenGL 4.3 spec was
amended to require this behavior, but previous versions did not require
locations of array (or structure) members be sequential.

We've now encountered two applications that assume uniform values will
be "small."  As far as we can tell, these applications store the GLint
returned by glGetUniformLocation in a int16_t or possibly an int8_t.

THIS BEHAVIOR IS NOT GUARANTEED OR IMPLIED BY ANY VERSION OF OpenGL.

Other implementations happen to have both these behaviors (sequential
array elements and small values) since OpenGL 2.0, so let's just match
their behavior.

Fixes "3D Bowling" on Android.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-and-tested-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit cfa3c5ad82)
2013-06-13 08:18:19 -07:00
Ian Romanick
c8cc27c980 glsl: Add gl_shader_program::UniformLocationBaseScale
This is used by _mesa_uniform_merge_location_offset and
_mesa_uniform_split_location_offset to determine how the base and offset
are packed.  Previously, this value was hard coded as (1U<<16) in those
functions via the shift and mask contained therein.  The value is still
(1U<<16), but it can be changed in the future.

The next patch dynamically generates this value.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-and-tested-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 26d86d26f9)
2013-06-13 08:18:04 -07:00
Ian Romanick
fb494ce303 glsl: Add a gl_shader_program parameter to _mesa_uniform_{merge,split}_location_offset
This will be used in the next commit.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-and-tested-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 5097f35841)
2013-06-13 08:17:56 -07:00
Chad Versace
e81df76f28 Merge freedesktop/master into otc-private/master 2013-06-11 16:54:51 -07:00
Chad Versace
83c1d4c961 i965: Fix glColorPointer(GL_FIXED)
When a gl_client_array is created with glColorPointer,
gl_client_array::Normalized is true. This caused the translation from the
gl_client_array's type to a BRW_SURFACEFORMAT to assertion fail.

Fixes the spinning cube's color in Android 4.2's ApiDemos.apk,
"Graphics > OpenGL ES".

Fixes assertion failure in mesa-demos/src/egl/opengles1/tri_x11 on Haswell
and Ivybridge:
  brw_draw_upload.c:287: get_surface_type: Assertion `0' failed.

No Piglit regressions on Haswell.

Note: This is a candidate for the 9.1 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42182
Issue: AXIA-2954
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 7a9f4d3e71)
2013-06-03 13:08:59 -07:00
Chad Versace
04ba428a6e Merge branch freedesktop/master into otc-private/master
Topi's GL_OES_EGL_image_external patches and Anholt's miptree cleanups
conflicted nontrivially in {brw,gen7}_wm_surface_state.c

Conflicts:
    src/mesa/drivers/dri/i965/brw_clear.c
	Anholt removed the 8x4 alignemtn restriction, and Tapani added
        a workaround below it.

    src/mesa/drivers/dri/i965/brw_wm_surface_state.c
    src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
        Topi's GL_OES_EGL_image_external patches conflicted with Anholt's
        miptree cleanups.

    src/mesa/drivers/dri/intel/intel_mipmap_tree.c
    src/mesa/drivers/dri/intel/intel_mipmap_tree.h
        Trivial conflicts.
2013-05-31 14:52:36 -07:00
Chad Versace
0b3146348b i965: Fix segfault by checking for null pointer
Commit 055f3e8 introduced a segfault in gles2_conform/depth_texture for
some EGLConfigs. That commit should have checked for a null pointer.

Issue: AXIA-2689
Change-Id: Ie059fb0647e5880b1ddc60341b102d0283eee9ca
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-05-24 13:21:21 -07:00
Chad Versace
7dc74b79bb mesa: Expose GL_OES_texture_npot on GLES1
Mesa's extension table incorrectly lists this GL_OES_texture_npot as
ES2-only. It's also an ES1 extension. This patch adds ES1 to the
extensions API mask.

From the GL_OES_texture_npot spec:
    OpenGL ES 1.0 or OpenGL ES 2.0 is required. This extension is
    written against OpenGL ES 1.1.12 and OpenGL ES 2.0.25.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Change-Id: Ia8a8f6a239156dd95b4085b9290316900f764e6a
2013-05-22 10:18:05 -07:00
Chad Versace
072a4fba46 egl/android: Fix error condition for EGL_ANDROID_image_native_buffer
Emit EGL_BAD_CONTEXT if the user passes a context to
eglCreateImageKHR(type=EGL_ANDROID_image_native_buffer).

From the EGL_ANDROID_image_native_buffer spec:
  * If <target> is EGL_NATIVE_BUFFER_ANDROID and <ctx> is not
    EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated.

Note: This is a candidate for the stable branches.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Change-Id: I01c4f09aaa13fc01a75b5a721b85df6a99e2072a
2013-05-22 10:17:44 -07:00
Rodrigo Vivi
aec0139c83 i965: Add missing Haswell GT3 Desktop to IS_HSW_GT3 check.
NOTE: This is a candidate for stable branches.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-05-16 14:20:53 -07:00
Paulo Zanoni
c5b49e93d1 i965: make GT3 machines work as GT3 instead of GT2
We were not allowed to say the "GT3" name, but we really needed to
have the PCI IDs because too many people had such machines, so we had
to make the GT3 machines work as GT2.

Let's just say that GT2_PLUS was a short for GT2_PLUS_1 :)

NOTE: This is a candidate for stable branches.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-05-01 09:46:48 -07:00
Kenneth Graunke
04b776caae i965: Add chipset limits for the Haswell GT3 variant.
NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2013-05-01 09:46:43 -07:00
Kenneth Graunke
f878d95d27 i965: Update URB partitioning code for Haswell's GT3 variant.
Haswell's GT3 variant offers 32kB of URB space for push constants, while
GT1 and GT2 match Ivybridge, providing 16kB.  Update the code to reserve
the full 32kB on GT3.

v2: Specify push constant size correctly.  I thought GT3 reinterpreted
    the value as multiples of 2kB, but it doesn't.  You simply have to
    program an even number.

NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-05-01 09:46:37 -07:00
Chad Versace
669fdaffe1 Merge otc-private/master into freedesktop/master
* otc-private/master
  i965: Fix Linux build
  intel: Fall back to X-tiling when larger than estimated aperture size.
  intel: Refactor code in intel_miptree_choose_tiling().
  intel: Move the max_gtt_map_object_size estimation to intel_context.
  mesa: Insert custom text into version string at buildtime
  android: NV12 support in buffer creation
  YV12 support for Android
  i965: enable image external textures
  i965: support for YUV formatted external textures
  gbm: dri: support for creating YUV formatted buffers
  dri: introduce YVU420 (YV12)
  intel: refactor planar format lookup
  i965: support for setting surfaces for planar external
  i965: refactor sampling engine surface state setup
  intel: treat mip-tree as constant when resolving offsets
  i965: re-compile shader if external texture unit changes
  i965: support for reserving surfaces for planar textures
  intel: support for creating planar external image textures
  i965: extend VS sampler to surface relation to 1:N
  i965: extend FS sampler to surface relation to 1:N
  dri2: x11: remove compiler warnings when converting native/opaque
  enable S3TC always
  i965: fast clear depth only if depth equals to color buffer depth
  Only build when BOARD_USE_MESA is true
  i915: Create mock implementation of GL_OES_image_external

Conflicts:
	src/mesa/drivers/dri/i965/brw_context.h
	src/mesa/drivers/dri/i965/brw_vs.c
	src/mesa/drivers/dri/intel/intel_mipmap_tree.c
	src/mesa/drivers/dri/intel/intel_screen.c
2013-05-01 09:18:01 -07:00
Chad Versace
f498624254 i965: Fix Linux build
Fix the following errors:

  brw_state_cache.c:352:1: error: no previous prototype for 'brw_clear_cache' [-Werror=missing-prototypes]

  brw_program.c: In function 'brwProgramStringNotify':
  brw_program.c:138:7: error: implicit declaration of function 'brw_clear_cache' [-Werror=implicit-function-declaration]

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-05-01 08:43:08 -07:00
Kenneth Graunke
d7a06ebcaa intel: Fall back to X-tiling when larger than estimated aperture size.
If a region is larger than the estimated aperture size, we map/unmap it
by copying with the BLT engine.  Which means we can't use Y-tiling.

Fixes Piglit max-texture-size and tex3d-maxsize, which regressed in my
recent change to use Y-tiling by default on Gen6+.  This was due to a
botched merge conflict resolution.

v2: Return a mask of valid tilings from intel_miptree_select_tiling.
    This allows us to avoid the X-tiling fallback if Y-tiling is actually
    mandatory.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-26 10:03:15 +02:00
Kenneth Graunke
2b4b6e00e3 intel: Refactor code in intel_miptree_choose_tiling().
This reduces the nesting level slightly, and in my opinion, makes it a
bit easier to follow.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-26 10:03:15 +02:00
Kenneth Graunke
4cfad2dc94 intel: Move the max_gtt_map_object_size estimation to intel_context.
We need know this in order to decide what tiling mode to use.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-26 10:03:15 +02:00
Chad Versace
e6a5c78510 mesa: Insert custom text into version string at buildtime
This allows maintainers/packagers/testers to tag the build with custom
information that will be reported by GL_VERSION.

If during build time (not configure time), the environemt variable or make
variable MESA_VERSION_STRING_EXTRA is set, then its value will appear in
the GL_VERSION string immediately after "Mesa X.Y" and before
"(git-xxxxxxx)".

This patch implements support for MESA_VERSION_STRING_EXTRA only for
Android.  Other build systems are left as an excercise.

Change-Id: I06432f6bd66546a3a62abf22347a2a0fb381ab74
CC: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10 12:08:29 -07:00
Juha-Pekka Heikkila
96ba7df413 android: NV12 support in buffer creation
Change-Id: I5e0afe862aa0b73fc315c9b9f39f9c0b6dd39613
Signed-off-by: Juha-Pekka Heikkila <juha-pekka.heikkila@linux.intel.com>
2013-04-10 12:08:29 -07:00
Juha-Pekka Heikkila
5522a3eec0 YV12 support for Android
Enable YV12 buffers on Android.

Issue: AIA-416
Change-Id: Icce005884bebf6ee934ad879c52c145bf7125103
Signed-off-by: Juha-Pekka Heikkila <juha-pekka.heikkila@linux.intel.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
abb80d88e6 i965: enable image external textures
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
e9a56dba2c i965: support for YUV formatted external textures
Namely YUV420, YVU420 (YV12) and NV12. Here one extends the shader
program with instructions that sample the separate Y- and U/V-planes
and convert the YUV to RGB as specified by ITU-R BT.601. Packed
formats are handled through the normal paths.
Here is only support for fragment shaders for now. I'm yet to study
the vec4-backend in order to add the support for vertex shaders.
(There aren't any tests or examples for them available anyway).

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
ec048ea12b gbm: dri: support for creating YUV formatted buffers
Specifically YUV420, YVU420 (YV12) and NV12 formatted. The logic is
pretty much taken from Kristian Hogsberg [1]. All the planes are
back-to-back but each starts at page boundary. Horizontal and
vertical alignment are set according to sampling engine constraints.
This is to serve piglit testing of the image external extension as
one needs a way of creating and writing YUV formatted buffers that
can be further passed to EGL as images.

[1] http://cgit.freedesktop.org/~krh/simple-yuv

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
e3f7da8985 dri: introduce YVU420 (YV12)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
25ae4f440d intel: refactor planar format lookup
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
240f2ea392 i965: support for setting surfaces for planar external
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
20f26275dc i965: refactor sampling engine surface state setup
This prepares for image external textures having multiple planes
and hence calling for one to set up more than one surface per
texture.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
b397ce7dd6 intel: treat mip-tree as constant when resolving offsets
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
d3174a03c3 i965: re-compile shader if external texture unit changes
Both sampling and possible conversion to RGB are dependent on the
format of the DRI image representing the pixel source. In order to
accomodate this one re-compiles the program upon any changes.

Altering the program key effectively kicks off the re-compilation
as part of brw state uploading.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
53aa7234b2 i965: support for reserving surfaces for planar textures
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
6dd7173146 intel: support for creating planar external image textures
One needs to check here if the shader compiler backend is capable of
producing the extra instructions for the given format. One is not
allowed to fail in the code generation phase anymore and it is
probably better from the shader author point of view also to know as
soon as possible.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
db848452a5 i965: extend VS sampler to surface relation to 1:N
In preparation for supporting external image textures consisting of
multiple planes (YUV).

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
d2f1855025 i965: extend FS sampler to surface relation to 1:N
In preparation for supporting external image textures consisting of
multiple planes (YUV). One now reserves entries in the sampling engine
surface state table only for those samplers that are really used in the
current program using a binding table associating a sampler with a slot
in the state table. Previously the slot in the state table was
determined using the sampler id as the state table index directly. This
arrangement allows one to reserve continuous ranges in the state table
instead of fixed single entries.
Note that one does not have zero pointers in the state table anymore
as one only uses as many slots from the beginning that are really
needed by the program.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Topi Pohjolainen
adba4d4405 dri2: x11: remove compiler warnings when converting native/opaque
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2013-04-10 12:08:29 -07:00
Tapani Pälli
8de19279bd enable S3TC always
This makes DXT using applications work on Android, such as Epic
Citadel demo and GLBenchmark2.5 DXT1 tests.

Change-Id: I8b6d49f54e816ab9c5da137962bb7c294b40a6de
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
2013-04-10 12:08:29 -07:00
Tapani Pälli
055f3e8934 i965: fast clear depth only if depth equals to color buffer depth
Patch makes GLBenchmark 2.1.x, An3DBenchXL and BasemarkES2 work with
Android on Ivybridge. In all failing cases color buffer is 16bit and
depth buffer 24bit. I did not find limitations on fast depth clear with
this combination though.

Change-Id: I76603141908855f0d1581427b48c67f29411bab7
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
2013-04-10 12:08:29 -07:00
Daniel Leung
2e6d9f9b5f Only build when BOARD_USE_MESA is true
This causes emulator builds to fail. So only build this
when board config specifies the need for this module.

Change-Id: Iad623b13a8ea568830c6729efdfb41890c9ede13
Depends-Change-Id: I574e53bbefad16e7b866c550df46f4f52c831ddd
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2013-04-10 12:08:29 -07:00
Chad Versace
e8c790caa5 i915: Create mock implementation of GL_OES_image_external
(See also similar commit 7420c9dab4aaf87e6b840410226c296c4668a48f.)

In Android IceCreamSandwich, SurfaceFlinger requires
GL_OES_image_external for basic compositing tasks. Without the extension,
SurfaceFlinger fails to start.

Despite the incompleteness of the extension's implementation introduced by
this patch, it is good enough to enable SurfaceFlinger and to unblock the
people who need to begin testing Mesa on IceCreamSandwich on i915.

To enable the extension, set the environment variable
MESA_EXTENSION_OVERRIDE="+GL_OES_EGL_image_external". Ideally, Android
should set this in init.rc.

WARNING: This implementation of GL_OES_EGL_image_external is not complete.
Some of it is even incorrect. The Intel Mesa team has no intention of
really implementing GL_OES_image_external for the i915 driver. This is
just a workaround for people who want to experiment with Android on i915.

Change-Id: Id2fce598a749a20d0fe78a0ac574937ec35d3545
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10 12:08:29 -07:00
1834 changed files with 89427 additions and 132313 deletions

View File

@@ -33,10 +33,9 @@ endif
LOCAL_C_INCLUDES += \
$(MESA_TOP)/include
MESA_VERSION=$(shell cat $(MESA_TOP)/VERSION)
# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
LOCAL_CFLAGS += \
-DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
-DPACKAGE_VERSION=\"9.2.0-devel\" \
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)

49
CleanSpec.mk Normal file
View File

@@ -0,0 +1,49 @@
# Copyright (C) 2013 The Android-x86 Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# If you don't need to do a full clean build but would like to touch
# a file or delete some intermediate files, add a clean step to the end
# of the list. These steps will only be run once, if they haven't been
# run before.
#
# E.g.:
# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
#
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
# files that are missing or have been moved.
#
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
# Use $(OUT_DIR) to refer to the "out" directory.
#
# If you need to re-do something that's already mentioned, just copy
# the command and add it to the bottom of the list. E.g., if a change
# that you made last week required touching a file and a change you
# made today requires touching the same file, just copy the old
# touch step and add it to the end of the list.
#
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libmesa_*_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libdrm_*intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/i9?5_dri_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libglapi_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/gralloc.drm_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libgralloc_drm_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/EXECUTABLES/mesa_*_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/EXECUTABLES/glsl_compiler_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/STATIC_LIBRARIES/libmesa_glsl_utils_intermediates)

View File

@@ -26,6 +26,12 @@ ACLOCAL_AMFLAGS = -I m4
doxygen:
cd doxygen && $(MAKE)
check-local:
$(MAKE) -C src/mapi/glapi/tests check
$(MAKE) -C src/mapi/shared-glapi/tests check
$(MAKE) -C src/mesa/main/tests check
$(MAKE) -C src/glx/tests check
.PHONY: doxygen
# Rules for making release tarballs
@@ -45,13 +51,18 @@ EXTRA_FILES = \
bin/ltmain.sh \
bin/missing \
bin/ylwrap \
bin/test-driver \
src/glsl/glsl_parser.cpp \
src/glsl/glsl_parser.h \
src/glsl/glsl_lexer.cpp \
src/glsl/glcpp/glcpp-lex.c \
src/glsl/glcpp/glcpp-parse.c \
src/glsl/glcpp/glcpp-parse.h \
src/mesa/main/api_exec_es1.c \
src/mesa/main/api_exec_es1_dispatch.h \
src/mesa/main/api_exec_es1_remap_helper.h \
src/mesa/main/api_exec_es2.c \
src/mesa/main/api_exec_es2_dispatch.h \
src/mesa/main/api_exec_es2_remap_helper.h \
src/mesa/program/lex.yy.c \
src/mesa/program/program_parse.tab.c \
src/mesa/program/program_parse.tab.h \
@@ -64,7 +75,7 @@ IGNORE_FILES = \
parsers: configure
$(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp glcpp/glcpp-lex.c glcpp/glcpp-parse.c glcpp/glcpp-parse.h
$(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
$(MAKE) -C src/mesa/program lex.yy.c program_parse.tab.c program_parse.tab.h
# Everything for new a Mesa release:
ARCHIVES = $(PACKAGE_NAME).tar.gz \

View File

@@ -69,10 +69,8 @@ if env['gles']:
#######################################################################
# Environment setup
with open("VERSION") as f:
mesa_version = f.read().strip()
env.Append(CPPDEFINES = [
('PACKAGE_VERSION', '\\"%s\\"' % mesa_version),
('PACKAGE_VERSION', '\\"9.2.0-devel\\"'),
('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
])

View File

@@ -1 +0,0 @@
10.0.1

View File

@@ -1,13 +0,0 @@
# Since we've disabled DRI3 completely in 10.0, this commit is no longer
# necessary.
f0f202e6b764be803470e27cba9102f14361ae22 glx: conditionaly build dri3 and present loader (v3)
# This patch makes bug #71870 worse, so it won't be cherry picked until that
# issue can be resolved. See
# http://lists.freedesktop.org/archives/mesa-dev/2013-November/048899.html
068a073c1d4853b5c8f33efdeb481026f42e23a5 meta: fix meta clear of layered framebuffers
# This patch isn't actually necessary because that bug that it fixes isn't in
# the 10.0 branch. See
# http://lists.freedesktop.org/archives/mesa-stable/2013-December/000500.html
a057b837ddd1c725a7504eedc53c6df05a012773 egl: add HAVE_LIBDRM define, fix EGL X11 platform

View File

@@ -14,7 +14,7 @@ git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
# Grep for commits that were marked as a candidate for the stable tree.
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*mesa-stable\)' HEAD..origin/master |\
git log --reverse --pretty=%H -i --grep='^[[:space:]]*NOTE: .*[Cc]andidate' HEAD..origin/master |\
while read sha
do
# Check to see whether the patch is on the ignore list.

View File

@@ -6,14 +6,17 @@ dnl Tell the user about autoconf.html in the --help output
m4_divert_once([HELP_END], [
See docs/autoconf.html for more details on the options for Mesa.])
m4_define(MESA_VERSION, m4_normalize(m4_include(VERSION)))
AC_INIT([Mesa], [MESA_VERSION],
AC_INIT([Mesa], [9.2.0-devel],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
AC_CONFIG_AUX_DIR([bin])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([foreign])
dnl http://people.gnome.org/~walters/docs/build-api.txt
dnl We don't support srcdir != builddir.
echo \#buildapi-variable-no-builddir >/dev/null
# Support silent build rules, requires at least automake-1.11. Disable
# by either passing --disable-silent-rules to configure or passing V=1
# to make
@@ -28,18 +31,22 @@ AC_SUBST([OSMESA_VERSION])
dnl Versions for external dependencies
LIBDRM_REQUIRED=2.4.24
LIBDRM_RADEON_REQUIRED=2.4.46
LIBDRM_INTEL_REQUIRED=2.4.49
LIBDRM_RADEON_REQUIRED=2.4.45
LIBDRM_INTEL_REQUIRED=2.4.38
LIBDRM_NVVIEUX_REQUIRED=2.4.33
LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41"
LIBDRM_FREEDRENO_REQUIRED=2.4.39
DRI2PROTO_REQUIRED=2.6
GLPROTO_REQUIRED=1.4.14
LIBDRM_XORG_REQUIRED=2.4.24
LIBKMS_XORG_REQUIRED=1.0.0
dnl Check for progs
AC_PROG_CPP
AC_PROG_CC
AX_PROG_CC_FOR_BUILD
AC_PROG_CXX
AX_PROG_CXX_FOR_BUILD
AM_PROG_CC_C_O
AM_PROG_AS
AC_CHECK_PROGS([MAKE], [gmake make])
@@ -93,7 +100,6 @@ AC_MSG_RESULT([$acv_mesa_CLANG])
dnl If we're using GCC, make sure that it is at least version 3.3.0. Older
dnl versions are explictly not supported.
GEN_ASM_OFFSETS=no
if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
AC_MSG_CHECKING([whether gcc version is sufficient])
major=0
@@ -111,12 +117,7 @@ if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
else
AC_MSG_RESULT([yes])
fi
if test "x$cross_compiling" = xyes; then
GEN_ASM_OFFSETS=yes
fi
fi
AM_CONDITIONAL([GEN_ASM_OFFSETS], test "x$GEN_ASM_OFFSETS" = xyes)
dnl Make sure the pkg-config macros are defined
m4_ifndef([PKG_PROG_PKG_CONFIG],
@@ -134,6 +135,21 @@ dnl Cache LDFLAGS and CPPFLAGS so we can add to them and restore later
_SAVE_LDFLAGS="$LDFLAGS"
_SAVE_CPPFLAGS="$CPPFLAGS"
dnl build host compiler macros
DEFINES_FOR_BUILD=""
AC_SUBST([DEFINES_FOR_BUILD])
case "$build_os" in
linux*|*-gnu*|gnu*)
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -D_GNU_SOURCE"
;;
solaris*)
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DSVR4"
;;
cygwin*)
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD"
;;
esac
dnl Compiler macros
DEFINES=""
AC_SUBST([DEFINES])
@@ -156,6 +172,7 @@ if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall -std=gnu99"
;;
*)
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -Wall -std=c99"
CFLAGS="$CFLAGS -Wall -std=c99"
;;
esac
@@ -185,13 +202,16 @@ if test "x$GCC" = xyes; then
CFLAGS=$save_CFLAGS
# Work around aliasing bugs - developers should comment this out
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-strict-aliasing"
CFLAGS="$CFLAGS -fno-strict-aliasing"
# gcc's builtin memcmp is slower than glibc's
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-builtin-memcmp"
CFLAGS="$CFLAGS -fno-builtin-memcmp"
fi
if test "x$GXX" = xyes; then
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -Wall"
CXXFLAGS="$CXXFLAGS -Wall"
# Enable -fvisibility=hidden if using a gcc that supports it
@@ -208,10 +228,12 @@ if test "x$GXX" = xyes; then
CXXFLAGS=$save_CXXFLAGS
# Work around aliasing bugs - developers should comment this out
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-strict-aliasing"
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
# gcc's builtin memcmp is slower than glibc's
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-builtin-memcmp"
CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
fi
@@ -286,6 +308,14 @@ AC_ARG_ENABLE([debug],
[enable_debug=no]
)
if test "x$enable_debug" = xyes; then
DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DDEBUG"
if test "x$GCC_FOR_BUILD" = xyes; then
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g -O0"
fi
if test "x$GXX_FOR_BUILD" = xyes; then
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g -O0"
fi
DEFINES="$DEFINES -DDEBUG"
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -g -O0"
@@ -408,7 +438,7 @@ test "x$enable_asm" = xno && AC_MSG_RESULT([no])
# disable if cross compiling on x86/x86_64 since we must run gen_matypes
if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
case "$host_cpu" in
i?86 | x86_64 | amd64)
i?86 | x86_64)
enable_asm=no
AC_MSG_RESULT([no, cross compiling])
;;
@@ -419,7 +449,7 @@ if test "x$enable_asm" = xyes; then
case "$host_cpu" in
i?86)
case "$host_os" in
linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*)
linux* | *freebsd* | dragonfly* | *netbsd*)
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
;;
gnu*)
@@ -427,9 +457,9 @@ if test "x$enable_asm" = xyes; then
;;
esac
;;
x86_64|amd64)
x86_64)
case "$host_os" in
linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*)
linux* | *freebsd* | dragonfly* | *netbsd*)
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
;;
esac
@@ -448,7 +478,7 @@ if test "x$enable_asm" = xyes; then
DEFINES="$DEFINES -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
AC_MSG_RESULT([yes, x86])
;;
x86_64|amd64)
x86_64)
DEFINES="$DEFINES -DUSE_X86_64_ASM"
AC_MSG_RESULT([yes, x86_64])
;;
@@ -543,17 +573,17 @@ AC_ARG_ENABLE([osmesa],
[enable OSMesa library @<:@default=disabled@:>@])],
[enable_osmesa="$enableval"],
[enable_osmesa=no])
AC_ARG_ENABLE([gallium-osmesa],
[AS_HELP_STRING([--enable-gallium-osmesa],
[enable Gallium implementation of the OSMesa library @<:@default=disabled@:>@])],
[enable_gallium_osmesa="$enableval"],
[enable_gallium_osmesa=no])
AC_ARG_ENABLE([egl],
[AS_HELP_STRING([--disable-egl],
[disable EGL library @<:@default=enabled@:>@])],
[enable_egl="$enableval"],
[enable_egl=yes])
AC_ARG_ENABLE([xorg],
[AS_HELP_STRING([--enable-xorg],
[enable support for X.Org DDX API @<:@default=no@:>@])],
[enable_xorg="$enableval"],
[enable_xorg=no])
AC_ARG_ENABLE([xa],
[AS_HELP_STRING([--enable-xa],
[enable build of the XA X Acceleration API @<:@default=no@:>@])],
@@ -582,25 +612,19 @@ AC_ARG_ENABLE([opencl],
@<:@default=no@:>@])],
[],
[enable_opencl=no])
AC_ARG_ENABLE([opencl_icd],
[AS_HELP_STRING([--enable-opencl-icd],
[Build an OpenCL ICD library to be loaded by an ICD implementation
@<:@default=no@:>@])],
[enable_opencl_icd="$enableval"],
[enable_opencl_icd=no])
AC_ARG_ENABLE([xlib-glx],
AC_ARG_ENABLE([xlib_glx],
[AS_HELP_STRING([--enable-xlib-glx],
[make GLX library Xlib-based instead of DRI-based @<:@default=disabled@:>@])],
[enable_xlib_glx="$enableval"],
[enable_xlib_glx=no])
AC_ARG_ENABLE([gallium-egl],
AC_ARG_ENABLE([gallium_egl],
[AS_HELP_STRING([--enable-gallium-egl],
[enable optional EGL state tracker (not required
for EGL support in Gallium with OpenGL and OpenGL ES)
@<:@default=disable@:>@])],
[enable_gallium_egl="$enableval"],
[enable_gallium_egl=no])
AC_ARG_ENABLE([gallium-gbm],
AC_ARG_ENABLE([gallium_gbm],
[AS_HELP_STRING([--enable-gallium-gbm],
[enable optional gbm state tracker (not required for
gbm support in Gallium)
@@ -614,7 +638,7 @@ AC_ARG_ENABLE([r600-llvm-compiler],
[enable_r600_llvm="$enableval"],
[enable_r600_llvm=no])
AC_ARG_ENABLE([gallium-tests],
AC_ARG_ENABLE([gallium_tests],
[AS_HELP_STRING([--enable-gallium-tests],
[Enable optional Gallium tests) @<:@default=disable@:>@])],
[enable_gallium_tests="$enableval"],
@@ -644,6 +668,7 @@ if test "x$enable_opengl" = xno -a \
"x$enable_gles1" = xno -a \
"x$enable_gles2" = xno -a \
"x$enable_openvg" = xno -a \
"x$enable_xorg" = xno -a \
"x$enable_xa" = xno -a \
"x$enable_xvmc" = xno -a \
"x$enable_vdpau" = xno -a \
@@ -699,6 +724,8 @@ fi
AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xyes -a \
"x$enable_dri" = xyes)
AM_CONDITIONAL(HAVE_DRI, test "x$enable_dri" = xyes)
AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
"x$enable_osmesa" = xyes)
AC_ARG_ENABLE([shared-glapi],
[AS_HELP_STRING([--enable-shared-glapi],
@@ -736,13 +763,7 @@ if test "x$enable_dri" = xyes; then
GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS"
fi
if test "x$enable_gallium_osmesa" = xyes; then
if test -z "$with_gallium_drivers"; then
AC_MSG_ERROR([Cannot enable gallium_osmesa without Gallium])
fi
if test "x$enable_osmesa" = xyes; then
AC_MSG_ERROR([Cannot enable both classic and Gallium OSMesa implementations])
fi
if test "x$enable_osmesa" = xyes; then
GALLIUM_STATE_TRACKERS_DIRS="osmesa $GALLIUM_STATE_TRACKERS_DIRS"
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS osmesa"
fi
@@ -850,6 +871,8 @@ AC_SUBST([GLESv1_CM_PC_LIB_PRIV])
AC_SUBST([GLESv2_LIB_DEPS])
AC_SUBST([GLESv2_PC_LIB_PRIV])
DRI_LIB_DEPS="\$(top_builddir)/src/mesa/libdricore/libdricore${VERSION}.la"
AC_SUBST([HAVE_XF86VIDMODE])
dnl
@@ -943,7 +966,7 @@ if test "x$enable_dri" = xyes; then
DEFINES="$DEFINES -DHAVE_ALIAS"
case "$host_cpu" in
x86_64|amd64)
x86_64)
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
fi
@@ -962,7 +985,7 @@ if test "x$enable_dri" = xyes; then
;;
esac
;;
*freebsd* | dragonfly* | *netbsd* | openbsd*)
freebsd* | dragonfly* | *netbsd*)
DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DHAVE_ALIAS"
@@ -993,41 +1016,39 @@ if test "x$enable_dri" = xyes; then
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
# Check for expat
PKG_CHECK_EXISTS([EXPAT], [have_expat=yes], [have_expat=no])
if test "x$have_expat" = "xyes"; then
PKG_CHECK_MODULES([EXPAT], [expat], [],
AC_MSG_ERROR([Expat required for DRI.]))
else
# expat version 2.0 and earlier do not provide expat.pc
EXPAT_LIBS=-lexpat
fi
EXPAT_INCLUDES=""
EXPAT_LIB=-lexpat
AC_ARG_WITH([expat],
[AS_HELP_STRING([--with-expat=DIR],
[expat install directory])],[
EXPAT_INCLUDES="-I$withval/include"
CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
])
AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])])
save_LIBS="$LIBS"
AC_CHECK_LIB([expat],[XML_ParserCreate],[],
[AC_MSG_ERROR([Expat required for DRI.])])
LIBS="$save_LIBS"
# If we are building any DRI driver other than swrast.
if test -n "$DRI_DIRS"; then
if test x"$DRI_DIRS" != xswrast; then
# ... libdrm is required
if test "x$have_libdrm" != xyes; then
AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
fi
DRICOMMON_NEED_LIBDRM=yes
else
DRICOMMON_NEED_LIBDRM=no
if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast; then
# ... libdrm is required
if test "x$have_libdrm" != xyes; then
AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
fi
# ... and build dricommon
HAVE_COMMON_DRI=yes
fi
# put all the necessary libs together
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
DRI_DRIVER_LDFLAGS="-module -avoid-version -shared -Wl,-Bsymbolic"
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
fi
AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")
AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
"x$enable_osmesa" = xyes -o \
-n "$DRI_DIRS")
AM_CONDITIONAL(NEED_LIBDRICORE, test -n "$DRI_DIRS")
AC_SUBST([EXPAT_INCLUDES])
AC_SUBST([DRI_LIB_DEPS])
AC_SUBST([DRI_DRIVER_LDFLAGS])
AC_SUBST([GALLIUM_DRI_LIB_DEPS])
case $DRI_DIRS in
@@ -1108,7 +1129,7 @@ x16|x32)
;;
esac
if test "x$enable_osmesa" = xyes -o "x$enable_gallium_osmesa" = xyes; then
if test "x$enable_osmesa" = xyes; then
# only link libraries with osmesa if shared
if test "$enable_static" = no; then
OSMESA_LIB_DEPS="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS"
@@ -1227,11 +1248,37 @@ if test "x$enable_gallium_gbm" = xyes; then
fi
AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
dnl
dnl X.Org DDX configuration
dnl
if test "x$enable_xorg" = xyes; then
PKG_CHECK_MODULES([XORG], [xorg-server >= 1.6.0])
PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED])
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
HAVE_XEXTPROTO_71="no")
GALLIUM_STATE_TRACKERS_DIRS="xorg $GALLIUM_STATE_TRACKERS_DIRS"
fi
AM_CONDITIONAL(HAVE_ST_XORG, test "x$enable_xorg" = xyes)
dnl
dnl XA configuration
dnl
if test "x$enable_xa" = xyes; then
AC_PROG_AWK
AC_PROG_GREP
AC_CHECK_PROG(NM, nm, "nm")
if test "x$AWK" = x || test "x$GREP" = x || test "x$NM" = x; then
AC_MSG_WARN([Missing one of nm, grep or awk. Disabling xa.])
enable_xa=no
fi
fi
if test "x$enable_xa" = xyes; then
GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
AC_SUBST(AWK)
AC_SUBST(GREP)
AC_SUBST(NM)
fi
AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
@@ -1307,42 +1354,29 @@ AC_ARG_WITH([clang-libdir],
[CLANG_LIBDIR="$withval"],
[CLANG_LIBDIR=""])
PKG_CHECK_EXISTS([libclc], [have_libclc=yes], [have_libclc=no])
LIBCLC_INCLUDEDIR=`pkg-config --variable=includedir libclc`
LIBCLC_LIBEXECDIR=`pkg-config --variable=libexecdir libclc`
AC_SUBST([LIBCLC_INCLUDEDIR])
AC_SUBST([LIBCLC_LIBEXECDIR])
if test "x$enable_opencl" = xyes; then
if test "x$with_gallium_drivers" = x; then
AC_MSG_ERROR([cannot enable OpenCL without Gallium])
fi
if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 7; then
AC_MSG_ERROR([gcc >= 4.7 is required to build clover])
if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 6; then
AC_MSG_ERROR([gcc >= 4.6 is required to build clover])
fi
if test "x$have_libclc" = xno; then
AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
Make sure the directory containing libclc.pc is specified in your
PKG_CONFIG_PATH environment variable.
By default libclc.pc is installed to /usr/local/share/pkgconfig/])
else
LIBCLC_INCLUDEDIR=`$PKG_CONFIG --variable=includedir libclc`
LIBCLC_LIBEXECDIR=`$PKG_CONFIG --variable=libexecdir libclc`
AC_SUBST([LIBCLC_INCLUDEDIR])
AC_SUBST([LIBCLC_LIBEXECDIR])
if test "x$LIBCLC_INCLUDEDIR" == x || test "x$LIBCLC_LIBEXECDIR" == x; then
AC_MSG_ERROR([pkg-config cannot use libclc.pc which is required to build clover])
fi
GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS clover"
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS opencl"
enable_gallium_loader=yes
if test "x$enable_opencl_icd" = xyes; then
OPENCL_LIBNAME="MesaOpenCL"
else
OPENCL_LIBNAME="OpenCL"
fi
fi
AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
AC_SUBST([OPENCL_LIBNAME])
dnl
dnl Gallium configuration
@@ -1383,6 +1417,8 @@ AC_ARG_WITH([egl-platforms],
with_egl_platforms=""
fi])
EGL_PLATFORMS=""
if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
fi
@@ -1392,7 +1428,7 @@ egl_platforms=`IFS=', '; echo $with_egl_platforms`
for plat in $egl_platforms; do
case "$plat" in
wayland)
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.2.0 wayland-server >= 1.2.0])
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.0.2 wayland-server >= 1.0.2])
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
@@ -1436,6 +1472,8 @@ else
EGL_NATIVE_PLATFORM="_EGL_INVALID_PLATFORM"
fi
EGL_PLATFORMS="$egl_platforms"
if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then
NEED_WINSYS_XLIB=yes
fi
@@ -1449,15 +1487,9 @@ AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
AM_CONDITIONAL(HAVE_EGL_DRIVER_GLX, test "x$HAVE_EGL_DRIVER_GLX" != "x")
AC_SUBST([EGL_NATIVE_PLATFORM])
AC_SUBST([EGL_PLATFORMS])
AC_SUBST([EGL_CFLAGS])
# If we don't have the X11 platform, set this define so we don't try to include
# the X11 headers.
if ! echo "$egl_platforms" | grep -q 'x11'; then
DEFINES="$DEFINES -DMESA_EGL_NO_X11_HEADERS"
GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
fi
AC_ARG_WITH([egl-driver-dir],
[AS_HELP_STRING([--with-egl-driver-dir=DIR],
[directory for EGL drivers [[default=${libdir}/egl]]])],
@@ -1465,6 +1497,13 @@ AC_ARG_WITH([egl-driver-dir],
[EGL_DRIVER_INSTALL_DIR='${libdir}/egl'])
AC_SUBST([EGL_DRIVER_INSTALL_DIR])
AC_ARG_WITH([xorg-driver-dir],
[AS_HELP_STRING([--with-xorg-driver-dir=DIR],
[Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
[XORG_DRIVER_INSTALL_DIR="$withval"],
[XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
AC_SUBST([XORG_DRIVER_INSTALL_DIR])
AC_ARG_WITH([max-width],
[AS_HELP_STRING([--with-max-width=N],
[Maximum framebuffer width (4096)])],
@@ -1494,6 +1533,11 @@ AC_ARG_WITH([llvm-shared-libs],
[link with LLVM shared libraries @<:@default=disabled@:>@])],
[],
[with_llvm_shared_libs=no])
AS_IF([test x$enable_opencl = xyes],
[
AC_MSG_WARN([OpenCL required, forcing LLVM shared libraries])
with_llvm_shared_libs=yes
])
AC_ARG_WITH([llvm-prefix],
[AS_HELP_STRING([--with-llvm-prefix],
@@ -1522,7 +1566,7 @@ if test "x$with_gallium_drivers" = x; then
fi
if test "x$enable_gallium_llvm" = xauto; then
case "$host_cpu" in
i*86|x86_64|amd64) enable_gallium_llvm=yes;;
i*86|x86_64) enable_gallium_llvm=yes;;
esac
fi
if test "x$enable_gallium_llvm" = xyes; then
@@ -1533,57 +1577,42 @@ if test "x$enable_gallium_llvm" = xyes; then
fi
if test "x$LLVM_CONFIG" != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
AC_COMPUTE_INT([LLVM_VERSION_MAJOR], [LLVM_VERSION_MAJOR],
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
if test "x${LLVM_VERSION_MAJOR}" != x; then
LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
else
LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
fi
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
LLVM_COMPONENTS="engine bitwriter"
if $LLVM_CONFIG --components | grep -qw 'mcjit'; then
if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
fi
if test "x$enable_opencl" = xyes; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
# LLVM 3.3 >= 177971 requires IRReader
if $LLVM_CONFIG --components | grep -qw 'irreader'; then
if $LLVM_CONFIG --components | grep -q '\<irreader\>'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
fi
# LLVM 3.4 requires Option
if $LLVM_CONFIG --components | grep -qw 'option'; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
fi
fi
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
MESA_LLVM=1
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
MESA_LLVM=1
dnl Check for Clang internal headers
dnl Check for Clang interanl headers
if test "x$enable_opencl" = xyes; then
if test "x$CLANG_LIBDIR" = x; then
CLANG_LIBDIR=${LLVM_LIBDIR}
fi
CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
[AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
AC_CHECK_FILE("$CLANG_RESOURCE_DIR/include/stddef.h",,
AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.]))
fi
else
MESA_LLVM=0
LLVM_VERSION_INT=0
MESA_LLVM=0
LLVM_VERSION_INT=0
fi
else
MESA_LLVM=0
@@ -1639,22 +1668,26 @@ gallium_check_st() {
fi
if test "x$enable_dri" = xyes && test "x$2" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2"
HAVE_COMMON_DRI=yes
fi
if test "x$enable_xa" = xyes && test "x$3" != x; then
if test "x$enable_xorg" = xyes && test "x$3" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3"
fi
if test "x$enable_xvmc" = xyes && test "x$4" != x; then
if test "x$enable_xa" = xyes && test "x$4" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4"
fi
if test "x$enable_vdpau" = xyes && test "x$5" != x; then
if test "x$enable_xvmc" = xyes && test "x$5" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
fi
if test "x$enable_vdpau" = xyes && test "x$6" != x; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
fi
}
gallium_require_llvm() {
if test "x$MESA_LLVM" = x0; then
case "$host_cpu" in
i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
i*86|x86_64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
esac
fi
}
@@ -1676,7 +1709,7 @@ radeon_llvm_check() {
if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required for r600g and radeonsi.])
fi
if test true && $LLVM_CONFIG --targets-built | grep -qvw 'R600' ; then
if test true && $LLVM_CONFIG --targets-built | grep -qv '\<R600\>' ; then
AC_MSG_ERROR([LLVM R600 Target not enabled. You can enable it when building the LLVM
sources with the --enable-experimental-targets=R600
configure flag])
@@ -1688,8 +1721,9 @@ radeon_llvm_check() {
}
dnl Gallium drivers
if test "x$enable_dri" = xyes -o "x$enable_xa" = xyes -o \
"x$enable_xvmc" = xyes -o "x$enable_vdpau" = xyes; then
if test "x$enable_dri" = xyes -o "x$enable_xorg" = xyes -o \
"x$enable_xa" = xyes -o "x$enable_xvmc" = xyes -o \
"x$enable_vdpau" = xyes; then
NEED_NONNULL_WINSYS=yes
fi
AM_CONDITIONAL(NEED_NONNULL_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes)
@@ -1702,7 +1736,7 @@ if test "x$with_gallium_drivers" != x; then
xsvga)
HAVE_GALLIUM_SVGA=yes
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
gallium_check_st "svga/drm" "dri-vmwgfx" "xa-vmwgfx"
gallium_check_st "svga/drm" "dri-vmwgfx" "" "xa-vmwgfx"
;;
xi915)
HAVE_GALLIUM_I915=yes
@@ -1712,8 +1746,7 @@ if test "x$with_gallium_drivers" != x; then
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
fi
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw"
gallium_check_st "i915/drm" "dri-i915"
DRICOMMON_NEED_LIBDRM=yes
gallium_check_st "i915/drm" "dri-i915" "xorg-i915"
;;
xilo)
HAVE_GALLIUM_ILO=yes
@@ -1721,15 +1754,13 @@ if test "x$with_gallium_drivers" != x; then
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS ilo"
gallium_check_st "intel/drm" "dri-ilo"
DRICOMMON_NEED_LIBDRM=yes
;;
xr300)
HAVE_GALLIUM_R300=yes
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
gallium_require_llvm "Gallium R300"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
gallium_check_st "radeon/drm" "r300/dri" "" "" ""
DRICOMMON_NEED_LIBDRM=yes
gallium_check_st "radeon/drm" "dri-r300" "" "" "xvmc-r300" "vdpau-r300"
;;
xr600)
HAVE_GALLIUM_R600=yes
@@ -1738,6 +1769,7 @@ if test "x$with_gallium_drivers" != x; then
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then
radeon_llvm_check
R600_NEED_RADEON_GALLIUM=yes;
LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
fi
if test "x$enable_r600_llvm" = xyes; then
@@ -1746,8 +1778,7 @@ if test "x$with_gallium_drivers" != x; then
if test "x$enable_opencl" = xyes; then
LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
fi
gallium_check_st "radeon/drm" "r600/dri" "" "r600/xvmc" "r600/vdpau"
DRICOMMON_NEED_LIBDRM=yes
gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600"
;;
xradeonsi)
HAVE_GALLIUM_RADEONSI=yes
@@ -1755,24 +1786,21 @@ if test "x$with_gallium_drivers" != x; then
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
radeon_llvm_check
gallium_check_st "radeon/drm" "radeonsi/dri" "" "" "radeonsi/vdpau"
DRICOMMON_NEED_LIBDRM=yes
gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" "" "" "vdpau-radeonsi" ""
;;
xnouveau)
HAVE_GALLIUM_NOUVEAU=yes
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau"
gallium_check_st "nouveau/drm" "dri-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
DRICOMMON_NEED_LIBDRM=yes
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv50 nvc0"
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
;;
xfreedreno)
HAVE_GALLIUM_FREEDRENO=yes
PKG_CHECK_MODULES([FREEDRENO], [libdrm_freedreno >= $LIBDRM_FREEDRENO_REQUIRED])
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS freedreno"
gallium_check_st "freedreno/drm" "dri-freedreno" "" "" ""
DRICOMMON_NEED_LIBDRM=yes
gallium_check_st "freedreno/drm" "dri-freedreno" "" "" "" ""
;;
xswrast)
HAVE_GALLIUM_SOFTPIPE=yes
@@ -1784,6 +1812,17 @@ if test "x$with_gallium_drivers" != x; then
if test "x$enable_dri" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
HAVE_COMMON_DRI=yes
fi
if test "x$enable_vdpau" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe"
fi
if test "x$enable_xvmc" = xyes; then
GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe"
fi
if test "x$enable_vdpau" = xyes -o "x$enable_xvmc" = xyes; then
NEED_WINSYS_XLIB=yes
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
fi
;;
*)
@@ -1807,7 +1846,7 @@ if test "x$MESA_LLVM" != x0; then
if test "x$with_llvm_shared_libs" = xyes; then
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"], [llvm_have_one_so=yes])
AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
if test "x$llvm_have_one_so" = xyes; then
dnl LLVM was built using auto*, so there is only one shared object.
@@ -1815,8 +1854,8 @@ if test "x$MESA_LLVM" != x0; then
else
dnl If LLVM was built with CMake, there will be one shared object per
dnl component.
AS_IF([test ! -f "$LLVM_LIBDIR/libLLVMTarget.so"],
[AC_MSG_ERROR([Could not find llvm shared libraries:
AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
AC_MSG_ERROR([Could not find llvm shared libraries:
Please make sure you have built llvm with the --enable-shared option
and that your llvm libraries are installed in $LLVM_LIBDIR
If you have installed your llvm libraries to a different directory you
@@ -1827,7 +1866,7 @@ if test "x$MESA_LLVM" != x0; then
--enable-opencl
If you do not want to build with llvm shared libraries and instead want to
use llvm static libraries then remove these options from your configure
invocation and reconfigure.])])
invocation and reconfigure.]))
dnl We don't need to update LLVM_LIBS in this case because the LLVM
dnl install uses a shared object for each compoenent and we have
@@ -1851,8 +1890,8 @@ AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test "x$HAVE_GALLIUM_SVGA" = xyes -
"x$HAVE_GALLIUM_I915" = xyes -o \
"x$HAVE_GALLIUM_SOFTPIPE" = xyes)
AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_I915" = xyes -o \
"x$HAVE_GALLIUM_SOFTPIPE" = xyes \
&& test "x$MESA_LLVM" = x1)
"x$HAVE_GALLIUM_SOFTPIPE" = xyes -a \
"x$MESA_LLVM" = x1)
if test "x$enable_gallium_loader" = xyes; then
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
@@ -1877,6 +1916,7 @@ AM_CONDITIONAL(HAVE_NOUVEAU_DRI, test x$HAVE_NOUVEAU_DRI = xyes)
AM_CONDITIONAL(HAVE_R200_DRI, test x$HAVE_R200_DRI = xyes)
AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes)
AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes -a \
"x$HAVE_GALLIUM_R300" = xyes -o \
@@ -1886,22 +1926,27 @@ AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test "x$HAVE_GALLIUM_I915" = xyes -o \
"x$HAVE_GALLIUM_SVGA" = xyes)
AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$NEED_WINSYS_XLIB" = xyes)
AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_NEED_RADEON_GALLIUM = xyes)
AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
AC_SUBST([ELF_LIB])
AM_CONDITIONAL(DRICOMMON_NEED_LIBDRM, test "x$DRICOMMON_NEED_LIBDRM" = xyes)
AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \
"x$enable_xlib_glx" = xyes -o \
"x$enable_osmesa" = xyes)
AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes)
AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_OSMESA, test "x$enable_gallium_osmesa" = xyes)
AM_CONDITIONAL(HAVE_X86_ASM, test "x$asm_arch" = xx86 -o "x$asm_arch" = xx86_64)
AM_CONDITIONAL(HAVE_X86_64_ASM, test "x$asm_arch" = xx86_64)
AM_CONDITIONAL(HAVE_SPARC_ASM, test "x$asm_arch" = xsparc)
AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1)
AM_CONDITIONAL(HAVE_SPARC_ASM, echo "$DEFINES" | grep 'SPARC_ASM' >/dev/null 2>&1)
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
AC_SUBST([VDPAU_MAJOR], 1)
AC_SUBST([VDPAU_MINOR], 0)
@@ -1909,7 +1954,7 @@ AC_SUBST([VDPAU_MINOR], 0)
AC_SUBST([XVMC_MAJOR], 1)
AC_SUBST([XVMC_MINOR], 0)
AC_SUBST([XA_MAJOR], 2)
AC_SUBST([XA_MAJOR], 1)
AC_SUBST([XA_MINOR], 0)
AC_SUBST([XA_TINY], 0)
AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
@@ -1918,12 +1963,6 @@ dnl Restore LDFLAGS and CPPFLAGS
LDFLAGS="$_SAVE_LDFLAGS"
CPPFLAGS="$_SAVE_CPPFLAGS"
dnl Suppress clang's warnings about unused CFLAGS and CXXFLAGS
if test "x$acv_mesa_CLANG" = xyes; then
CFLAGS="$CFLAGS -Qunused-arguments"
CXXFLAGS="$CXXFLAGS -Qunused-arguments"
fi
dnl Add user CFLAGS and CXXFLAGS
CFLAGS="$CFLAGS $USER_CFLAGS"
CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
@@ -1947,13 +1986,13 @@ AC_CONFIG_FILES([Makefile
src/gallium/drivers/freedreno/Makefile
src/gallium/drivers/freedreno/a2xx/Makefile
src/gallium/drivers/freedreno/a3xx/Makefile
src/gallium/drivers/galahad/Makefile
src/gallium/drivers/i915/Makefile
src/gallium/drivers/identity/Makefile
src/gallium/drivers/ilo/Makefile
src/gallium/drivers/llvmpipe/Makefile
src/gallium/drivers/noop/Makefile
src/gallium/drivers/nouveau/Makefile
src/gallium/drivers/nv30/Makefile
src/gallium/drivers/nv50/Makefile
src/gallium/drivers/nvc0/Makefile
src/gallium/drivers/r300/Makefile
src/gallium/drivers/r600/Makefile
src/gallium/drivers/radeon/Makefile
@@ -1969,36 +2008,44 @@ AC_CONFIG_FILES([Makefile
src/gallium/state_trackers/dri/sw/Makefile
src/gallium/state_trackers/egl/Makefile
src/gallium/state_trackers/gbm/Makefile
src/gallium/state_trackers/glx/xlib/Makefile
src/gallium/state_trackers/glx/Makefile
src/gallium/state_trackers/osmesa/Makefile
src/gallium/state_trackers/vdpau/Makefile
src/gallium/state_trackers/vega/Makefile
src/gallium/state_trackers/xa/Makefile
src/gallium/state_trackers/xorg/Makefile
src/gallium/state_trackers/xvmc/Makefile
src/gallium/targets/Makefile
src/gallium/targets/dri-freedreno/Makefile
src/gallium/targets/dri-i915/Makefile
src/gallium/targets/dri-ilo/Makefile
src/gallium/targets/dri-nouveau/Makefile
src/gallium/targets/dri-r300/Makefile
src/gallium/targets/dri-r600/Makefile
src/gallium/targets/dri-radeonsi/Makefile
src/gallium/targets/dri-swrast/Makefile
src/gallium/targets/dri-vmwgfx/Makefile
src/gallium/targets/egl-static/Makefile
src/gallium/targets/gbm/Makefile
src/gallium/targets/opencl/Makefile
src/gallium/targets/osmesa/Makefile
src/gallium/targets/osmesa/osmesa.pc
src/gallium/targets/pipe-loader/Makefile
src/gallium/targets/radeonsi/dri/Makefile
src/gallium/targets/radeonsi/vdpau/Makefile
src/gallium/targets/r300/dri/Makefile
src/gallium/targets/r600/dri/Makefile
src/gallium/targets/r600/vdpau/Makefile
src/gallium/targets/r600/xvmc/Makefile
src/gallium/targets/libgl-xlib/Makefile
src/gallium/targets/vdpau-nouveau/Makefile
src/gallium/targets/vdpau-r300/Makefile
src/gallium/targets/vdpau-r600/Makefile
src/gallium/targets/vdpau-radeonsi/Makefile
src/gallium/targets/vdpau-softpipe/Makefile
src/gallium/targets/xa-vmwgfx/Makefile
src/gallium/targets/xa-vmwgfx/xatracker.pc
src/gallium/targets/xorg-i915/Makefile
src/gallium/targets/xorg-nouveau/Makefile
src/gallium/targets/xorg-r600/Makefile
src/gallium/targets/xorg-radeonsi/Makefile
src/gallium/targets/xvmc-nouveau/Makefile
src/gallium/targets/xvmc-r300/Makefile
src/gallium/targets/xvmc-r600/Makefile
src/gallium/targets/xvmc-softpipe/Makefile
src/gallium/tests/trivial/Makefile
src/gallium/tests/unit/Makefile
src/gallium/winsys/Makefile
@@ -2018,6 +2065,7 @@ AC_CONFIG_FILES([Makefile
src/gbm/Makefile
src/gbm/main/gbm.pc
src/glsl/Makefile
src/glsl/builtin_compiler/Makefile
src/glx/Makefile
src/glx/tests/Makefile
src/gtest/Makefile
@@ -2048,8 +2096,12 @@ AC_CONFIG_FILES([Makefile
src/mesa/drivers/osmesa/Makefile
src/mesa/drivers/osmesa/osmesa.pc
src/mesa/drivers/x11/Makefile
src/mesa/libdricore/Makefile
src/mesa/main/tests/Makefile
src/mesa/main/tests/hash_table/Makefile])
src/mesa/main/tests/hash_table/Makefile
src/mesa/program/Makefile
src/mesa/x86-64/Makefile
src/mesa/x86/Makefile])
dnl Sort the dirs alphabetically
GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
@@ -2075,17 +2127,11 @@ echo " OpenVG: $enable_openvg"
dnl Driver info
echo ""
case "x$enable_osmesa$enable_gallium_osmesa" in
xnoyes)
echo " OSMesa: lib$OSMESA_LIB (Gallium)"
;;
xyesno)
if test "x$enable_osmesa" != xno; then
echo " OSMesa: lib$OSMESA_LIB"
;;
xnono)
else
echo " OSMesa: no"
;;
esac
fi
if test "x$enable_dri" != xno; then
# cleanup the drivers var
@@ -2114,7 +2160,7 @@ dnl EGL
echo ""
echo " EGL: $enable_egl"
if test "$enable_egl" = yes; then
echo " EGL platforms: $egl_platforms"
echo " EGL platforms: $EGL_PLATFORMS"
egl_drivers=""
if test "x$HAVE_EGL_DRIVER_GLX" != "x"; then

View File

@@ -7,113 +7,105 @@ infrastructure is complete but it may be the case that few (if any) drivers
implement the features.
OpenGL Core and Compatibility context support
OpenGL 3.1 and later versions are only supported with the Core profile.
There are no plans to support GL_ARB_compatibility. The last supported OpenGL
version with all deprecated features is 3.0. Some of the later GL features
are exposed in the 3.0 context as extensions.
Feature Status
----------------------------------------------------- ------------------------
GL 3.0:
GLSL 1.30 DONE (i965, r600, radeonsi)
GLSL 1.30 DONE
glBindFragDataLocation, glGetFragDataLocation DONE
Conditional rendering (GL_NV_conditional_render) DONE (i965, r300, r600, radeonsi, swrast)
Map buffer subranges (GL_ARB_map_buffer_range) DONE (i965, r300, r600, radeonsi, swrast)
Clamping controls (GL_ARB_color_buffer_float) DONE (i965, r300, r600, radeonsi)
Float textures, renderbuffers (GL_ARB_texture_float) DONE (i965, r300, r600, radeonsi)
GL_EXT_packed_float DONE (i965, r600, radeonsi)
GL_EXT_texture_shared_exponent DONE (i965, r600, radeonsi, swrast)
Float depth buffers (GL_ARB_depth_buffer_float) DONE (i965, r600, radeonsi)
Framebuffer objects (GL_ARB_framebuffer_object) DONE (i965, r300, r600, radeonsi, swrast)
Half-float DONE (i965, r300, r600, radeonsi, swrast)
Non-normalized Integer texture/framebuffer formats DONE (i965, r600, radeonsi)
1D/2D Texture arrays DONE (i965, r600, radeonsi)
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (i965, r600, radeonsi, swrast)
GL_EXT_texture_compression_rgtc DONE (i965, r300, r600, radeonsi, swrast)
Red and red/green texture formats DONE (i965, r300, r600, radeonsi, swrast)
Transform feedback (GL_EXT_transform_feedback) DONE (i965, r600, radeonsi)
Vertex array objects (GL_APPLE_vertex_array_object) DONE (all drivers)
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600, radeonsi)
Conditional rendering (GL_NV_conditional_render) DONE (i965, r300, r600, swrast)
Map buffer subranges (GL_ARB_map_buffer_range) DONE (i965, r300, r600, swrast)
Clamping controls (GL_ARB_color_buffer_float) DONE (i965, r300, r600)
Float textures, renderbuffers (GL_ARB_texture_float) DONE (i965, r300, r600)
GL_EXT_packed_float DONE (i965, r600)
GL_EXT_texture_shared_exponent DONE (i965, r600, swrast)
Float depth buffers (GL_ARB_depth_buffer_float) DONE (i965, r600)
Framebuffer objects (GL_ARB_framebuffer_object) DONE (i965, r300, r600, swrast)
Half-float DONE
Non-normalized Integer texture/framebuffer formats DONE (i965, r600)
1D/2D Texture arrays DONE
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (i965, r600, swrast)
GL_EXT_texture_compression_rgtc DONE (i965, r300, r600, swrast)
Red and red/green texture formats DONE (i965, swrast, gallium)
Transform feedback (GL_EXT_transform_feedback) DONE (i965, r600)
Vertex array objects (GL_APPLE_vertex_array_object) DONE (i965, r300, r600, swrast)
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE (i965, r600)
glClearBuffer commands DONE
glGetStringi command DONE
glTexParameterI, glGetTexParameterI commands DONE
glVertexAttribI commands DONE
Depth format cube textures DONE (i965, r600, radeonsi)
Depth format cube textures DONE
GLX_ARB_create_context (GLX 1.4 is required) DONE
GL 3.1:
GLSL 1.40 DONE (i965, r600, radeonsi)
Forward compatible context support/deprecations DONE (i965, r600, radeonsi)
Instanced drawing (GL_ARB_draw_instanced) DONE (i965, r600, radeonsi, swrast)
Buffer copying (GL_ARB_copy_buffer) DONE (i965, r300, r600, radeonsi, swrast)
Primitive restart (GL_NV_primitive_restart) DONE (i965, r300, r600, radeonsi)
16 vertex texture image units DONE (i965, r600, radeonsi)
Texture buffer objs (GL_ARB_texture_buffer_object) DONE for OpenGL 3.1 contexts (i965, r600, radeonsi)
Rectangular textures (GL_ARB_texture_rectangle) DONE (i965, r300, r600, radeonsi, swrast)
Uniform buffer objs (GL_ARB_uniform_buffer_object) DONE (i965, r600, radeonsi, swrast)
Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r300, r600, radeonsi)
GLSL 1.40 DONE (i965, r600)
Forward compatibile context support/deprecations DONE (i965, r600)
Instanced drawing (GL_ARB_draw_instanced) DONE (i965, gallium, swrast)
Buffer copying (GL_ARB_copy_buffer) DONE (i965, r300, r600, swrast)
Primitive restart (GL_NV_primitive_restart) DONE (i965, r600)
16 vertex texture image units DONE
Texture buffer objs (GL_ARB_texture_buffer_object) DONE for OpenGL 3.1 contexts (i965, r600)
Rectangular textures (GL_ARB_texture_rectangle) DONE (i965, r300, r600, swrast)
Uniform buffer objs (GL_ARB_uniform_buffer_object) DONE (i965, r600, swrast)
Signed normalized textures (GL_EXT_texture_snorm) DONE (i965, r300, r600)
GL 3.2:
Core/compatibility profiles DONE
GLSL 1.50 DONE (i965)
Geometry shaders DONE (i965)
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE (i965, r300, r600, radeonsi, swrast)
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE (i965, r300, r600, radeonsi, swrast)
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r300, r600, radeonsi, swrast)
Provoking vertex (GL_ARB_provoking_vertex) DONE (i965, r300, r600, radeonsi, swrast)
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE (i965, r600, radeonsi)
Multisample textures (GL_ARB_texture_multisample) DONE (i965, r600, radeonsi)
Frag depth clamp (GL_ARB_depth_clamp) DONE (i965, r600, swrast, radeonsi)
Fence objects (GL_ARB_sync) DONE (i965, r300, r600, radeonsi, swrast)
GLSL 1.50 in progress
Geometry shaders (GL_ARB_geometry_shader4) partially done
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE (i965, r300, r600, swrast)
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE (i965, r300, r600, swrast)
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r300, r600, swrast)
Provoking vertex (GL_ARB_provoking_vertex) DONE (i965, r300, r600, swrast)
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE (i965, r600)
Multisample textures (GL_ARB_texture_multisample) DONE (i965)
Frag depth clamp (GL_ARB_depth_clamp) DONE (i965, r600, swrast)
Fence objects (GL_ARB_sync) DONE (i965, r300, r600, swrast)
GLX_ARB_create_context_profile DONE
GL 3.3:
GLSL 3.30 DONE (i965)
GL_ARB_blend_func_extended DONE (i965, r600, radeonsi, softpipe)
GL_ARB_explicit_attrib_location DONE (i915, i965, r300, r600, radeonsi, swrast)
GL_ARB_occlusion_query2 DONE (i965, r300, r600, radeonsi, swrast)
GL_ARB_sampler_objects DONE (i965, r300, r600, radeonsi)
GL_ARB_shader_bit_encoding DONE (i965, r600, radeonsi)
GL_ARB_texture_rgb10_a2ui DONE (i965, r600, radeonsi)
GL_ARB_texture_swizzle DONE (i965, r300, r600, radeonsi, swrast)
GL_ARB_timer_query DONE (i965, r600, radeonsi)
GL_ARB_instanced_arrays DONE (i965, r300, r600, radeonsi)
GL_ARB_vertex_type_2_10_10_10_rev DONE (i965, r600, radeonsi)
GLSL 3.30 new features in this version pretty much done
GL_ARB_blend_func_extended DONE (i965, r600, softpipe)
GL_ARB_explicit_attrib_location DONE (i915, i965, r300, r600, swrast)
GL_ARB_occlusion_query2 DONE (i965, r300, r600, swrast)
GL_ARB_sampler_objects DONE (i965, r300, r600)
GL_ARB_shader_bit_encoding DONE
GL_ARB_texture_rgb10_a2ui DONE (i965, r600)
GL_ARB_texture_swizzle DONE (same as EXT version) (i965, r300, r600, swrast)
GL_ARB_timer_query DONE (i965, r600)
GL_ARB_instanced_arrays DONE (i965, r300, r600)
GL_ARB_vertex_type_2_10_10_10_rev DONE (i965, r600)
GL 4.0:
GLSL 4.0 not started
GL_ARB_texture_query_lod DONE (i965)
GL_ARB_draw_buffers_blend DONE (i965, r600, radeonsi, softpipe)
GL_ARB_draw_buffers_blend DONE (i965, r600, softpipe)
GL_ARB_draw_indirect started (Christoph)
GL_ARB_gpu_shader5 started
GL_ARB_gpu_shader_fp64 not started
GL_ARB_sample_shading DONE (i965)
GL_ARB_sample_shading not started
GL_ARB_shader_subroutine not started
GL_ARB_tessellation_shader not started
GL_ARB_texture_buffer_object_rgb32 DONE (i965, r600, radeonsi, softpipe)
GL_ARB_texture_cube_map_array DONE (i965, r600, softpipe)
GL_ARB_texture_gather DONE (i965)
GL_ARB_transform_feedback2 DONE (i965, r600, radeonsi)
GL_ARB_transform_feedback3 DONE (i965, r600, radeonsi)
GL_ARB_texture_buffer_object_rgb32 DONE (i965, softpipe)
GL_ARB_texture_cube_map_array DONE (i965, softpipe)
GL_ARB_texture_gather started (Maxence, Chris)
GL_ARB_transform_feedback2 DONE
GL_ARB_transform_feedback3 DONE
GL 4.1:
GLSL 4.1 not started
GL_ARB_ES2_compatibility DONE (i965, r300, r600, radeonsi)
GL_ARB_ES2_compatibility DONE (i965, r300, r600)
GL_ARB_get_program_binary DONE (0 binary formats)
GL_ARB_separate_shader_objects some infrastructure done
GL_ARB_shader_precision not started
@@ -126,56 +118,42 @@ GL 4.2:
GLSL 4.2 not started
GL_ARB_texture_compression_bptc not started
GL_ARB_compressed_texture_pixel_storage not started
GL_ARB_shader_atomic_counters DONE (i965)
GL_ARB_texture_storage DONE (all drivers)
GL_ARB_transform_feedback_instanced DONE (i965, r600, radeonsi)
GL_ARB_shader_atomic_counters not started
GL_ARB_texture_storage DONE (i965, r300, r600, swrast, gallium)
GL_ARB_transform_feedback_instanced DONE
GL_ARB_base_instance DONE (i965, nv50, nvc0, r600, radeonsi)
GL_ARB_shader_image_load_store not started
GL_ARB_conservative_depth DONE (all drivers that support GLSL 1.30)
GL_ARB_shading_language_420pack DONE (all drivers that support GLSL 1.30)
GL_ARB_internalformat_query DONE (i965, r300, r600, radeonsi)
GL_ARB_conservative_depth DONE (softpipe)
GL_ARB_shading_language_420pack started (Todd)
GL_ARB_internalformat_query DONE (i965, gallium)
GL_ARB_map_buffer_alignment DONE (r300, r600, radeonsi)
GL 4.3:
GLSL 4.3 not started
GL_ARB_arrays_of_arrays not started
GL_ARB_ES3_compatibility DONE (i965)
GL_ARB_clear_buffer_object not started
GL_ARB_compute_shader not started
GL_ARB_copy_image not started
GL_KHR_debug DONE (all drivers)
GL_ARB_explicit_uniform_location not started
GL_ARB_fragment_layer_viewport not started
GL_ARB_framebuffer_no_attachments not started
GL_ARB_internalformat_query2 not started
GL_ARB_invalidate_subdata DONE (all drivers)
GL_ARB_multi_draw_indirect not started
GL_ARB_program_interface_query not started
GL_ARB_robust_buffer_access_behavior not started
GL_ARB_shader_image_size not started
GL_ARB_shader_storage_buffer_object not started
GL_ARB_stencil_texturing not started
GL_ARB_texture_buffer_range DONE (nv50, nvc0, i965, r600, radeonsi)
GL_ARB_texture_query_levels DONE (i965)
GL_ARB_texture_storage_multisample DONE (all drivers that support GL_ARB_texture_multisample)
GL_ARB_texture_view not started
GL_ARB_vertex_attrib_binding DONE (all drivers)
GL 4.4:
GLSL 4.4 not started
GL_MAX_VERTEX_ATTRIB_STRIDE not started
GL_ARB_buffer_storage not started
GL_ARB_clear_texture not started
GL_ARB_enhanced_layouts not started
GL_ARB_multi_bind not started
GL_ARB_query_buffer_object not started
GL_ARB_texture_mirror_clamp_to_edge DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast)
GL_ARB_texture_stencil8 not started
GL_ARB_vertex_type_10f_11f_11f_rev DONE (i965, r600)
ARB_arrays_of_arrays not started
ARB_ES3_compatibility DONE (i965)
ARB_clear_buffer_object not started
ARB_compute_shader started (gallium)
ARB_copy_image not started
KHR_debug some work done (ARB_debug_output)
ARB_explicit_uniform_location not started
ARB_fragment_layer_viewport not started
ARB_framebuffer_no_attachments not started
ARB_internalformat_query2 not started
ARB_invalidate_subdata not started
ARB_multi_draw_indirect not started
ARB_program_interface_query not started
ARB_robust_buffer_access_behavior not started
ARB_shader_image_size not started
ARB_shader_storage_buffer_object not started
ARB_stencil_texturing not started
ARB_texture_buffer_range DONE (nv50, nvc0)
ARB_texture_query_levels not started
ARB_texture_storage_multisample DONE (i965)
ARB_texture_view not started
ARB_vertex_attrib_binding not started
More info about these features and the work involved can be found at

View File

@@ -1,6 +1,6 @@
File: docs/README.WIN32
Last updated: 21 June 2013
Last updated: 23 April 2011
Quick Start
@@ -30,23 +30,6 @@ At this time, only the gallium GDI driver is known to work.
Source code also exists in the tree for other drivers in
src/mesa/drivers/windows, but the status of this code is unknown.
Recipe
------
Building on windows requires several open-source packages. These are
steps that work as of this writing.
1) install python 2.7
2) install scons (latest)
3) install mingw, flex, and bison
4) install libxml2 from here: http://www.lfd.uci.edu/~gohlke/pythonlibs
get libxml2-python-2.9.1.win-amd64-py2.7.exe
5) install pywin32 from here: http://www.lfd.uci.edu/~gohlke/pythonlibs
get pywin32-218.4.win-amd64-py2.7.exe
6) install git
7) download mesa from git
see http://www.mesa3d.org/repository.html
8) run scons
General
-------

View File

@@ -123,6 +123,24 @@ directories.</p>
There are also a few general options for altering the Mesa build:
</p>
<dl>
<dt><code>--with-x</code></dt>
<dd><p>When the X11 development libraries are
needed, the <code>pkg-config</code> utility <a href="#pkg-config">will
be used</a> for locating them. If they cannot be found through
<code>pkg-config</code> a fallback routing using <code>imake</code> will
be used. In this case, the <code>--with-x</code>,
<code>--x-includes</code> and <code>--x-libraries</code> options can
control the use of X for Mesa.</p>
</dd>
<dt><code>--enable-gl-osmesa</code></dt>
<dd><p>The <a href="osmesa.html">OSMesa
library</a> can be built on top of libGL for drivers that provide it.
This option controls whether to build libOSMesa. By default, this is
enabled for the Xlib driver and disabled otherwise. Note that this
option is different than using OSMesa as the driver.</p>
</dd>
<dt><code>--enable-debug</code></dt>
<dd><p>This option will enable compiler
options and macros to aid in debugging the Mesa libraries.</p>
@@ -137,12 +155,12 @@ assembly will not be used.</p>
<dt><code>--enable-32-bit</code></dt>
<dt><code>--enable-64-bit</code></dt>
<dd><p>By default, the build will compile code as directed by the environment
variables
<dd><p>By default, the
build will compile code as directed by the environment variables
<code>CC</code>, <code>CFLAGS</code>, etc. If the compiler is
<code>gcc</code>, these options offer a helper to add the compiler flags
to force 32- or 64-bit code generation as used on the x86 and x86_64
architectures. Note that these options are mutually exclusive.</p>
architectures.</p>
</dd>
</dl>
@@ -153,19 +171,19 @@ architectures. Note that these options are mutually exclusive.</p>
There are several different driver modes that Mesa can use. These are
described in more detail in the <a href="install.html">basic
installation instructions</a>. The Mesa driver is controlled through the
configure options <code>--enable-xlib-glx</code>, <code>--enable-osmesa</code>,
and <code>--enable-dri</code>.
configure option --with-driver. There are currently three supported
options in the configure script.
</p>
<h3 id="xlib">Xlib</h3><p>
<h3 id="xlib">Xlib</h3><p>This is the default mode for building Mesa.
It uses Xlib as a software renderer to do all rendering. It corresponds
to the option <code>--enable-xlib-glx</code>. The libX11 and libXext
to the option <code>--with-driver=xlib</code>. The libX11 and libXext
libraries, as well as the X11 development headers, will be need to
support the Xlib driver.
<h3 id="dri">DRI</h3><p>This mode uses the DRI hardware drivers for
accelerated OpenGL rendering. Enable the DRI drivers with the option
<code>--enable-dri</code>. See the <a href="install.html">basic
<code>--with-driver=dri</code>. See the <a href="install.html">basic
installation instructions</a> for details on prerequisites for the DRI
drivers.
@@ -205,8 +223,7 @@ and <code>/usr/local/lib</code>, respectively.
<h3 id="osmesa">OSMesa </h3><p> No libGL is built in this
mode. Instead, the driver code is built into the Off-Screen Mesa
(OSMesa) library. See the <a href="osmesa.html">Off-Screen Rendering</a>
page for more details. It corresponds to the option
<code>--enable-osmesa</code>.
page for more details.
<!-- OSMesa specific options -->
<dl>

View File

@@ -36,7 +36,7 @@ To add a new GL extension to Mesa you have to do at least the following.
</pre>
</li>
<li>
In the src/mapi/glapi/gen/ directory, add the new extension functions and
In the src/mesa/glapi/ directory, add the new extension functions and
enums to the gl_API.xml file.
Then, a bunch of source files must be regenerated by executing the
corresponding Python scripts.
@@ -155,29 +155,6 @@ of <tt>bool</tt>, <tt>true</tt>, and
src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as examples.
</p>
<h2>Submitting patches</h2>
<p>
You should always run the Mesa Testsuite before submitting patches.
The Testsuite can be run using the 'make check' command. All tests
must pass before patches will be accepted, this may mean you have
to update the tests themselves.
</p>
<p>
Patches should be sent to the Mesa mailing list for review.
When submitting a patch make sure to use git send-email rather than attaching
patches to emails. Sending patches as attachments prevents people from being
able to provide in-line review comments.
</p>
<p>
When submitting follow-up patches you can use --in-reply-to to make v2, v3,
etc patches show up as replies to the originals. This usually works well
when you're sending out updates to individual patches (as opposed to
re-sending the whole series). Using --in-reply-to makes
it harder for reviewers to accidentally review old patches.
</p>
<h2>Marking a commit as a candidate for a stable branch</h2>
@@ -216,7 +193,15 @@ branch is relevant.
</p>
<h3>Verify and update version info in VERSION</h3>
<h3>Verify and update version info</h3>
<dl>
<dt>SConstruct</dt>
<dt>Android.common.mk</dt>
<dd>PACKAGE_VERSION</dd>
<dt>configure.ac</dt>
<dd>AC_INIT</dd>
</dl>
<p>
Create a docs/relnotes/x.y.z.html file.
@@ -284,10 +269,10 @@ sftp USERNAME,mesa3d@web.sourceforge.net
<p>
Make an announcement on the mailing lists:
<em>mesa-dev@lists.freedesktop.org</em>,
<em>mesa-users@lists.freedesktop.org</em>
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>d</em><em>e</em><em>v</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>,
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>u</em><em>s</em><em>e</em><em>r</em><em>s</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>
and
<em>mesa-announce@lists.freedesktop.org</em>
<em>m</em><em>e</em><em>s</em><em>a</em><em>-</em><em>a</em><em>n</em><em>n</em><em>o</em><em>u</em><em>n</em><em>c</em><em>e</em><em>@</em><em>l</em><em>i</em><em>s</em><em>t</em><em>s</em><em>.</em><em>f</em><em>r</em><em>e</em><em>e</em><em>d</em><em>e</em><em>s</em><em>k</em><em>t</em><em>o</em><em>p</em><em>.</em><em>o</em><em>r</em><em>g</em>
</p>
</div>

View File

@@ -32,7 +32,7 @@ The specifications follow.
<li><a href="specs/MESA_pixmap_colormap.spec">MESA_pixmap_colormap.spec</a>
<li><a href="specs/OLD/MESA_program_debug.spec">MESA_program_debug.spec</a> (obsolete)
<li><a href="specs/MESA_release_buffers.spec">MESA_release_buffers.spec</a>
<li><a href="specs/OLD/MESA_resize_buffers.spec">MESA_resize_buffers.spec</a> (obsolete)
<li><a href="specs/MESA_resize_buffers.spec">MESA_resize_buffers.spec</a>
<li><a href="specs/MESA_set_3dfx_mode.spec">MESA_set_3dfx_mode.spec</a>
<li><a href="specs/MESA_shader_debug.spec">MESA_shader_debug.spec</a>
<li><a href="specs/OLD/MESA_sprite_point.spec">MESA_sprite_point.spec</a> (obsolete)

View File

@@ -16,44 +16,6 @@
<h1>News</h1>
<h2>October 18, 2013</h2>
<p>
<a href="relnotes/9.2.2.html">Mesa 9.2.2</a> is released.
This is a bug fix release.
</p>
<h2>October 4, 2013</h2>
<p>
<a href="relnotes/9.2.1.html">Mesa 9.2.1</a> and
<a href="relnotes/9.1.7.html">Mesa 9.1.7</a> are released,
both bug-fix releases.
</p>
<h2>August 27, 2013</h2>
<p>
<a href="relnotes/9.2.html">Mesa 9.2</a> is released.
This is a new development release.
See the release notes for more information about the release.
</p>
<h2>August 1, 2013</h2>
<p>
<a href="relnotes/9.1.6.html">Mesa 9.1.6</a> is released.
This is a bug fix release.
</p>
<h2>July 17, 2013</h2>
<p>
<a href="relnotes/9.1.5.html">Mesa 9.1.5</a> is released.
This is a bug fix release.
</p>
<h2>July 1, 2013</h2>
<p>
<a href="relnotes/9.1.4.html">Mesa 9.1.4</a> is released.
This is a bug fix release.
</p>
<h2>May 21, 2013</h2>
<p>
<a href="relnotes/9.1.3.html">Mesa 9.1.3</a> is released.

View File

@@ -21,14 +21,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<ul>
<li><a href="relnotes/10.0.html">10.0 release notes</a>
<li><a href="relnotes/9.2.2.html">9.2.2 release notes</a>
<li><a href="relnotes/9.2.1.html">9.2.1 release notes</a>
<li><a href="relnotes/9.2.html">9.2 release notes</a>
<li><a href="relnotes/9.1.7.html">9.1.7 release notes</a>
<li><a href="relnotes/9.1.6.html">9.1.6 release notes</a>
<li><a href="relnotes/9.1.5.html">9.1.5 release notes</a>
<li><a href="relnotes/9.1.4.html">9.1.4 release notes</a>
<li><a href="relnotes/9.1.3.html">9.1.3 release notes</a>
<li><a href="relnotes/9.1.2.html">9.1.2 release notes</a>
<li><a href="relnotes/9.1.1.html">9.1.1 release notes</a>

View File

@@ -1,147 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 10.0.1 Release Notes / (December 12, 2013)</h1>
<p>
Mesa 10.0.1 is a bug fix release which fixes bugs found since the 10.0 release.
</p>
<p>
Mesa 10.0.1 implements the OpenGL 3.3 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
3.3 is <strong>only</strong> available if requested at context creation
because compatibility contexts not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
</pre>
<h2>New features</h2>
<p>None</p>
<h2>Bug fixes</h2>
<p>This list is likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64323">Bug 64323</a> - Severe misrendering in Left 4 Dead 2</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68838">Bug 68838</a> - GLSL: struct declarations produce a &quot;empty declaration warning&quot; in 9.2</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">Bug 69155</a> - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70250">Bug 70250</a> - weston-terminal rendering corrupted with output transform 90 and 270</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70601">Bug 70601</a> - [SNB Bisected]Piglit spec/ARB_texture_float/multisample-formats 2 GL_ARB_texture_float fails</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72230">Bug 72230</a> - Unable to extract MesaLib-10.0.0.tar.{gz,bz2} with bsdtar</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72325">Bug 72325</a> - [swrast] piglit glean fbo regression</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72327">Bug 72327</a> - [swrast] piglit glean pointSprite regression</li>
</ul>
<h2>Changes</h2>
<p>The full set of changes can be viewed by using the following git command:</p>
<pre>
git log mesa-10.0..mesa-10.0.1
</pre>
<p>Axel Davy (2):</p>
<ul>
<li>egl/wayland: Flush the wl_display at the end of SwapBuffers</li>
<li>Enable throttling in SwapBuffers</li>
</ul>
<p>Chad Versace (2):</p>
<ul>
<li>i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs</li>
<li>i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)</li>
</ul>
<p>Dave Airlie (1):</p>
<ul>
<li>swrast: fix readback regression since inversion fix</li>
</ul>
<p>Emil Velikov (1):</p>
<ul>
<li>automake: include only one copy VERSION in tarball</li>
</ul>
<p>Ian Romanick (3):</p>
<ul>
<li>docs: Add 10.0 release md5sums</li>
<li>Remove a057b83 from the pick list</li>
<li>glsl: Don't emit empty declaration warning for a struct specifier</li>
</ul>
<p>Ilia Mirkin (8):</p>
<ul>
<li>mesa: don't leak performance monitors on context destroy</li>
<li>nv50: Fix GPU_READING/WRITING bit removal</li>
<li>nouveau: avoid leaking fences while waiting</li>
<li>nv50: wait on the buf's fence before sticking it into pushbuf</li>
<li>nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)</li>
<li>nouveau/video: update h264 picparm field names based on usage</li>
<li>nouveau/video: update a few more h264 picparm field names</li>
<li>nv50: report 15 max inputs for fragment programs</li>
</ul>
<p>Jordan Justen (1):</p>
<ul>
<li>dri megadriver_stub: add compatibility for older DRI loaders</li>
</ul>
<p>Kristian Høgsberg (2):</p>
<ul>
<li>egl/wayland: Damage INT32_MAX x INT32_MAX region for eglSwapBuffers</li>
<li>egl/wayland: Send commit after flushing the driver context</li>
</ul>
<p>Maarten Lankhorst (1):</p>
<ul>
<li>nouveau: Fix compiler warning regression</li>
</ul>
<p>Paul Berry (1):</p>
<ul>
<li>i965/gen6: Fix multisample resolve blits for luminance/intensity 32F formats.</li>
</ul>
<p>Thomas Hellstrom (1):</p>
<ul>
<li>st/xa: Bump major version number to 2</li>
</ul>
<p>Tom Stellard (2):</p>
<ul>
<li>r300/compiler/tests: Fix segfault</li>
<li>r300/compiler/tests: Fix line length check in test parser</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,146 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 10.0 Release Notes / (November 30th, 2013)</h1>
<p>
Mesa 10.0 is a new development release.
People who are concerned with stability and reliability should stick
with a previous release or wait for Mesa 10.0.1.
</p>
<p>
Mesa 10.0 implements the OpenGL 3.3 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
3.3 is <strong>only</strong> available if requested at context creation
because compatibility contexts are not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
b38626b96c664db67a534d7859682436 MesaLib-10.0.0.tar.gz
f3fe55d9735bea158bbe97ed9a0da819 MesaLib-10.0.0.tar.bz2
c6ee1ce51e3bf35947d2978b872daf51 MesaLib-10.0.0.zip
</pre>
<h2>New features</h2>
<p>
Note: some of the new features are only available with certain drivers.
</p>
<ul>
<li>GL_AMD_seamless_cubemap_per_texture on i965.</li>
<li>GL_ARB_conservative_depth on i965.</li>
<li>GL_ARB_texture_gather on i965.</li>
<li>GL_ARB_texture_query_levels on i965.</li>
<li>GL_ARB_texture_mirror_clamp_to_edge.</li>
<li>GL_ARB_transform_feedback2, GL_ARB_transform_feedback3, and GL_ARB_transform_feedback_instanced on i965/Gen7 (with appropriate kernel support).</li>
<li>GL_ARB_sample_shading on i965.</li>
<li>GL_ARB_shader_atomic_counters on i965.</li>
<li>GL_ARB_vertex_attrib_binding</li>
<li>GL_ARB_vertex_type_10f_11f_11f_rev on i965 and r600g</li>
<li>GL_KHR_debug</li>
<li>GLX_MESA_query_renderer</li>
</ul>
<h2>Bug fixes</h2>
<p>Attempts have been made to <b>not</b> include bugs fixed in previous 9.2
releases or bugs that were regressions during 10.0 development. This list is
likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47755">Bug 47755</a> - [glsl-compiler] no error checking when Interpolation qualifier for built-in variable is different in vertex and fragment shader</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=52171">Bug 52171</a> - [gallium/r600/clover] Simple benchmarks failed to run</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=53077">Bug 53077</a> - [IVB] Output error with msaa when both of framebuffer and source color's alpha are not 1</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54867">Bug 54867</a> - bug in r300 compiler</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60929">Bug 60929</a> - [r600-llvm] mono games with opengl are blocking on start</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62142">Bug 62142</a> - Mesa/demo mipmap_limits upside down with running by SOFTWARE</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62698">Bug 62698</a> - [bisected] WebGL demo &quot;Consumed&quot;: texstate.c:628: update_texture_state: Assertion „__builtin_popcount(enabledTargets) == 1“ failed.</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64225">Bug 64225</a> - bfgminer --scyte generates Segmentation Fault on Northern Island</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64226">Bug 64226</a> - python-opencl package generate segmentation fault at pipe_r600.so</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64261">Bug 64261</a> - [SNB Bisected]Ogles3conform GL3Tests_color_buffer_float_color_buffer_float_clamp_fixed.test fail</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66213">Bug 66213</a> - Certain Mesa Demos Rendering Inverted (vertically)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66806">Bug 66806</a> - [softpipe] glxgears floating point exception</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67921">Bug 67921</a> - [bisected commit 883987] crosscompiling fails with util/u_cpu_detect.c:247:4: error: 'asm' undeclared (first use in this function)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68162">Bug 68162</a> - [radeonsi] texture rendering is broken in Source-Engine games</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68451">Bug 68451</a> - Texture flicker in native Dota2 in mesa 9.2.0rc1</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68503">Bug 68503</a> - Graphical glitches in Serious Sam 3 when SB is enabled</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68792">Bug 68792</a> - Problems during playback of h264 files using UVD and VLC on AMD E-350 CPU</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68845">Bug 68845</a> - VDPAU/UVD regression</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69078">Bug 69078</a> - Modern Warfare (1, 2 and 3) broken in Wine on SNB</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69321">Bug 69321</a> - starting openCL crashes/boots system</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70042">Bug 70042</a> - Major texture flickering in Dota 2 (r600g on HD 6950)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70088">Bug 70088</a> - Glamor on r600g crashes Xserver</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70123">Bug 70123</a> - Freeze caused by 'winsys/radeon: remove cs_queue_empty' commit</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70327">Bug 70327</a> - Casting floating point variable to integer not working properly while constant gets converted properly</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70891">Bug 70891</a> - CL_INVALID_BUILD_OPTIONS results in CL_INVALID_DEVICE when asking for build log</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70913">Bug 70913</a> - [PIGLIT,radeonsi] crash in &quot;spec/EXT_framebuffer_multisample/sample-alpha-to-coverage 4 depth&quot; (buffer overflow)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71022">Bug 71022</a> - configure: error: Expat required for DRI.</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71110">Bug 71110</a> - xorg_driver.c:1030:2: error: too many arguments to function DamageUnregister</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71172">Bug 71172</a> - Segfault when running glxinfo. NV25GL [Quadro4 900 XGL]</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71512">Bug 71512</a> - dlopen.h:54: undefined reference to `dlopen'</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71870">Bug 71870</a> - Metro: Last Light rendering issues</li>
</ul>
<h2>Changes</h2>
<ul>
<li>Removed X.Org state tracker (unmaintained and broken)</li>
<li>Removed the video-accel r300 targets</li>
<li>Removed the video-accel softpipe targets</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,321 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.1.4 Release Notes / July 1st, 2013</h1>
<p>
Mesa 9.1.4 is a bug fix release which fixes bugs found since the 9.1.3 release.
</p>
<p>
Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
3.1 is <strong>only</strong> available if requested at context creation
because GL_ARB_compatibility is not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
a2c4e25d0e27918bc67f61bae04d0cb8 MesaLib-9.1.4.tar.bz2
8c7e9ce5b05cb2223f0587396dd9dc08 MesaLib-9.1.4.tar.gz
020459c5793d4279bdcb2daa1f7dd9f6 MesaLib-9.1.4.zip
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<p>This list is likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=37871">Bug 37871</a> - [bisected i965] Bus error (core dumped) on oglc texdecaltile</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=42182">Bug 42182</a> - egl/opengles1/tri_x11 renders wrong</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=44958">Bug 44958</a> - [SNB IVB HSW] mesa demo test texleak bus error</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=53494">Bug 53494</a> - [snb] crash in texsubimage to a large atlas in clutter</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60518">Bug 60518</a> - glDrawElements segfault when compiled into display list</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61821">Bug 61821</a> - src/mesa/drivers/dri/common/xmlpool.h:96:29: fatal error: xmlpool/options.h</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63520">Bug 63520</a> - r300g regression (RV380): Strange rendering of light sources in Penumbra (bisected)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63701">Bug 63701</a> - [HSW] support new haswell graphics [8086:0a2e]</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64727">Bug 64727</a> - [gm45, bisected] some piglit glsl 1.10 built-in-functions tests crash</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64745">Bug 64745</a> - [llvmpipe] SIGSEGV src/gallium/state_trackers/glx/xlib/glx_api.c:1374</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64934">Bug 64934</a> - [llvmpipe] SIGSEGV src/gallium/state_trackers/glx/xlib/glx_api.c:1363</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65173">Bug 65173</a> - segfault in _mesa_get_format_datatype and _mesa_get_color_read_type when state dumping with glretrace</li>
</ul>
<h2>Changes</h2>
<p>The full set of changes can be viewed by using the following GIT command:</p>
<pre>
git log mesa-9.1.3..mesa-9.1.4
</pre>
<p>Alan Coopersmith (2):</p>
<ul>
<li>integer overflow in XF86DRIOpenConnection() [CVE-2013-1993 1/2]</li>
<li>integer overflow in XF86DRIGetClientDriverName() [CVE-2013-1993 2/2]</li>
</ul>
<p>Alex Deucher (3):</p>
<ul>
<li>radeonsi: add support for hainan chips</li>
<li>radeonsi: add Hainan pci ids</li>
<li>winsys/radeon: add env var to disable VM on Cayman/Trinity</li>
</ul>
pp
<p>Andreas Boll (1):</p>
<ul>
<li>glapi: Add some missing static_dispatch="false" annotations to es_EXT.xml</li>
</ul>
<p>Anuj Phogat (1):</p>
<ul>
<li>intel: Add a null pointer check before dereferencing the pointer</li>
</ul>
<p>Armin K (1):</p>
<ul>
<li>gallivm: Fix build with LLVM 3.3</li>
</ul>
<p>Brian Paul (9):</p>
<ul>
<li>mesa: fix the compressed TexSubImage size checking code</li>
<li>st/mesa: generate GL_OUT_OF_MEMORY if we can't create the index buffer</li>
<li>mesa: fix error checking of DXT sRGB formats in _mesa_base_tex_format()</li>
<li>st/glx/xlib: check for null ctx pointer in glXIsDirect()</li>
<li>xlib: check for null ctx pointer in glXIsDirect()</li>
<li>st/glx: add null ctx check in glXDestroyContext()</li>
<li>xlib: add null ctx check in glXDestroyContext()</li>
<li>meta: move vertex array enables for mipmap generation</li>
<li>mesa: handle missing read buffer in _mesa_get_color_read_format/type()</li>
</ul>
<p>Bryan Cain (1):</p>
<ul>
<li>nv50: initialize kick_notify callback in nv50_create</li>
</ul>
<p>Chad Versace (3):</p>
<ul>
<li>egl/android: Fix error condition for EGL_ANDROID_image_native_buffer</li>
<li>i965: Fix glColorPointer(GL_FIXED)</li>
<li>intel: Return early if miptree allocation fails</li>
</ul>
<p>Chia-I Wu (1):</p>
<ul>
<li>u_vbuf: fix index buffer leak</li>
</ul>
<p>Chris Forbes (8):</p>
<ul>
<li>mesa: add accessor for effective stencil ref</li>
<li>intel: Use accessor for stencil reference values</li>
<li>nouveau: Use accessor for stencil reference values</li>
<li>radeon: Use accessor for stencil reference values</li>
<li>st: Use accessor for stencil reference values</li>
<li>swrast: Use accessor for stencil reference values</li>
<li>mesa: Stop clamping stencil reference value at specification time</li>
<li>mesa: Use accessor for stencil reference values in glGet</li>
</ul>
<p>Chí-Thanh Christopher Nguyễn (1):</p>
<ul>
<li>targets/dri-i915: Force c++ linker in all cases</li>
</ul>
<p>Daniel Martin (1):</p>
<ul>
<li>Fix build of swrast only without libdrm</li>
</ul>
<p>Dave Airlie (1):</p>
<ul>
<li>i965: fix problem with constant out of bounds access (v3)</li>
</ul>
<p>Eric Anholt (10):</p>
<ul>
<li>mesa: Make core Mesa allocate the texture renderbuffer wrapper.</li>
<li>mesa: Make gl_renderbuffers backed by EGL images use FinishRenderTexture.</li>
<li>i965/fs: Bake regs_written into the IR instead of recomputing it later.</li>
<li>i965/vs: Fix implied_mrf_writes() for integer division pre-gen6.</li>
<li>intel: Add support for writing to our linear-temporary-CPU-map case.</li>
<li>intel: Do temporary CPU maps of textures that are too big to GTT map.</li>
<li>intel: Avoid making tiled miptrees we won't be able to blit.</li>
<li>intel: Fix MRT handling of glBitmap().</li>
<li>intel: Fix format handling of blit glBitmap()</li>
<li>i965: Shut up the last release build warning.</li>
</ul>
<p>Fabian Bieler (2):</p>
<ul>
<li>mesa/st: Don't copy propagate from swizzles.</li>
<li>mesa/program: Don't copy propagate from swizzles.</li>
</ul>
<p>Frank Henigman (1):</p>
<ul>
<li>intel: initialize fs_visitor::params_remap in constructor</li>
</ul>
<p>Ian Romanick (2):</p>
<ul>
<li>docs: Add 9.1.3 release md5sums</li>
<li>mesa: Bump version to 9.1.4</li>
</ul>
<p>José Fonseca (1):</p>
<ul>
<li>scons: Fix implicit python dependency discovery on Windows.</li>
</ul>
<p>Kenneth Graunke (17):</p>
<ul>
<li>mesa: Add i965 varying index patches to .cherry-ignore.</li>
<li>i965: Turn brw-&gt;urb.vs_size and gs_size into local variables.</li>
<li>i965: Use a variable for the push constant size in kB.</li>
<li>i965: Update URB partitioning code for Haswell's GT3 variant.</li>
<li>i965: Add chipset limits for the Haswell GT3 variant.</li>
<li>i965: Enable the Bay Trail platform.</li>
<li>mesa: Add a reverted commit to cherry-ignore.</li>
<li>vbo: Ignore PRIMITIVE_RESTART_FIXED_INDEX for glDrawArrays().</li>
<li>mesa: Add a helper function for determining the restart index.</li>
<li>vbo: Use the new primitive restart index helper function.</li>
<li>i965: Use the correct restart index for fixed index mode on Haswell.</li>
<li>mesa: Cherry-ignore a patch that got picked but squashed.</li>
<li>i965: Fix can_cut_index_handle_restart_index() for byte/short types.</li>
<li>st/mesa: Go back to using ctx-&gt;Array.RestartIndex, not _RestartIndex.</li>
<li>mesa: Ignore fixed-index primitive restart in ArrayElement().</li>
<li>mesa: Delete the ctx-&gt;Array._RestartIndex derived state.</li>
<li>glsl: Bail on parsing if the #version directive is bogus.</li>
</ul>
<p>Lauri Kasanen (1):</p>
<ul>
<li>r600g: Correctly initialize the shader key, v2</li>
</ul>
<p>Maarten Lankhorst (4):</p>
<ul>
<li>nvc0: fix up video buffer alignment requirements</li>
<li>nvc0: kill assert in ppp code</li>
<li>nvc0: set rsvd_kick correctly</li>
<li>nvc0: allow frame dropping in h264</li>
</ul>
<p>Marek Olšák (7):</p>
<ul>
<li>radeonsi: increase array size for shader inputs and outputs</li>
<li>vbo: fix possible use-after-free segfault after a VAO is deleted</li>
<li>glsl: fix the value of gl_MaxFragmentUniformVectors</li>
<li>st/mesa: initialize all program constants and UBO limits</li>
<li>st/mesa: initialize Const.MaxColorAttachments</li>
<li>st/mesa: fix a couple of issues in st_bind_ubos</li>
<li>mesa: declare UniformBufferBindings as an array with a static size</li>
</ul>
<p>Matt Turner (3):</p>
<ul>
<li>configure.ac: Remove redundant checks of enable_dri.</li>
<li>configure.ac: Build dricommon for DRI gallium drivers</li>
<li>i965: NULL check depth_mt to quiet static analysis.</li>
</ul>
<p>Michel Dänzer (3):</p>
<ul>
<li>radeonsi: Fix handling of TGSI_SEMANTIC_PSIZE</li>
<li>radeonsi: Fix user clip planes</li>
<li>mesa: Note that two radeonsi fixes cannot be backported after all</li>
</ul>
<p>Mike Stroyan (1):</p>
<ul>
<li>configure.ac: Build dricommon for gallium swrast</li>
</ul>
<p>Naohiro Aota (1):</p>
<ul>
<li>xmlpool/build: Make sure to set mo properly</li>
</ul>
<p>Paul Berry (2):</p>
<ul>
<li>glsl: Fix error checking on "flat" keyword to match GLSL ES 3.00, GLSL 1.50.</li>
<li>i965/gen7.5: Allow HW primitive restart for all primitive types.</li>
</ul>
<p>Paulo Zanoni (1):</p>
<ul>
<li>i965: make GT3 machines work as GT3 instead of GT2</li>
</ul>
<p>Rodrigo Vivi (2):</p>
<ul>
<li>i965: Add missing Haswell GT3 Desktop to IS_HSW_GT3 check.</li>
<li>i965: Adding more reserved PCI IDs for Haswell.</li>
</ul>
<p>Roland Scheidegger (1):</p>
<ul>
<li>gallivm: fix out-of-bounds access with mirror_clamp_to_edge address mode</li>
</ul>
<p>Stéphane Marchesin (2):</p>
<ul>
<li>st/xlib: Fix upside down coordinates for CopySubBuffer</li>
<li>st/xlib: Flush the front buffer before doing CopySubBuffer</li>
</ul>
<p>Sven Joachim (1):</p>
<ul>
<li>mesa: Fix ieee fp on Alpha</li>
</ul>
<p>Tapani Pälli (1):</p>
<ul>
<li>mesa: fix type comparison errors in sub-texture error checking code</li>
</ul>
<p>Tom Stellard (2):</p>
<ul>
<li>gallivm: Fix build with LLVM &gt;= r180063</li>
<li>r300g/compiler: Prevent regalloc from swizzling texture operands v2</li>
</ul>
<p>Vinson Lee (1):</p>
<ul>
<li>radeon: Initialize variables in radeon_llvm_context_init.</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,140 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.1.5 Release Notes / July 17, 2013</h1>
<p>
Mesa 9.1.5 is a bug fix release which fixes bugs found since the 9.1.4 release.
</p>
<p>
Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
3.1 is <strong>only</strong> available if requested at context creation
because GL_ARB_compatibility is not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
4ed2af5943141a85a21869053a2fc2eb MesaLib-9.1.5.tar.bz2
47181066acf3231d74e027b2033f9455 MesaLib-9.1.5.tar.gz
4c9c6615bd99215325250f87ed34058f MesaLib-9.1.5.zip
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<p>This list is likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58384">Bug 58384</a> - [i965 Bisected]Oglc max_values(advanced.fragmentProgram.GL_MAX_PROGRAM_ENV_PARAMETERS_ARB) segfault</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62647">Bug 62647</a> - Wrong rendering of Dota 2 on Wine (apitrace attached) - Intel IVB HD4000</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63674">Bug 63674</a> - [IVB]frozen at the first frame when run Unigine-heaven 4.0</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65910">Bug 65910</a> - Killing weston-launch causes segv in desktop-shell</li>
</ul>
<h2>Changes</h2>
<p>The full set of changes can be viewed by using the following GIT command:</p>
<pre>
git log mesa-9.1.4..mesa-9.1.5
</pre>
<p>Anuj Phogat (1):</p>
<ul>
<li>mesa: Return ZeroVec/dummyReg instead of NULL pointer</li>
</ul>
<p>Brian Paul (1):</p>
<ul>
<li>svga: check for NaN shader immediates</li>
</ul>
<p>Carl Worth (3):</p>
<ul>
<li>cherry-ignore: Ignore previously backported patch</li>
<li>cherry-ignore: Drop two patches which we've decided not to include</li>
<li>mesa: Bump version to 9.1.5</li>
</ul>
<p>Chris Forbes (1):</p>
<ul>
<li>i965: fix alpha test for MRT</li>
</ul>
<p>Christoph Bumiller (1):</p>
<ul>
<li>r600g: x/y coordinates must be divided by block dim in dma blit</li>
</ul>
<p>Eric Anholt (1):</p>
<ul>
<li>ra: Fix register spilling.</li>
</ul>
<p>Ian Romanick (6):</p>
<ul>
<li>docs: Add 9.1.4 release md5sums</li>
<li>glsl: Add a gl_shader_program parameter to _mesa_uniform_{merge,split}_location_offset</li>
<li>glsl: Add gl_shader_program::UniformLocationBaseScale</li>
<li>glsl: Generate smaller values for uniform locations</li>
<li>i965: Be more careful with the interleaved user array upload optimization</li>
<li>glsl: Move all var decls to the front of the IR list in reverse order</li>
</ul>
<p>Kenneth Graunke (1):</p>
<ul>
<li>glsl/builtins: Fix ARB_texture_cube_map_array built-in availability.</li>
</ul>
<p>Kristian Høgsberg (1):</p>
<ul>
<li>wayland: Handle global_remove event as well</li>
</ul>
<p>Matt Turner (1):</p>
<ul>
<li>register_allocate: Fix the type of best_benefit.</li>
</ul>
<p>Paul Berry (1):</p>
<ul>
<li>glsl ES: Fix magnitude of gl_MaxVertexUniformVectors.</li>
</ul>
<p>Richard Sandiford (3):</p>
<ul>
<li>st/xlib Fix XIMage bytes-per-pixel calculation</li>
<li>st/xlib: Fix XImage stride calculation</li>
<li>st/dri/sw: Fix pitch calculation in drisw_update_tex_buffer</li>
</ul>
<p>Vinson Lee (1):</p>
<ul>
<li>swrast: Fix memory leak.</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,168 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.1.6 Release Notes / August 1, 2013</h1>
<p>
Mesa 9.1.6 is a bug fix release which fixes bugs found since the 9.1.5 release.
</p>
<p>
Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
3.1 is <strong>only</strong> available if requested at context creation
because GL_ARB_compatibility is not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
443a2a352667294b53d56cb1a74114e9 MesaLib-9.1.6.tar.bz2
08d3069cccd6821e5f33e0840bca0718 MesaLib-9.1.6.tar.gz
90aa7a6d9878cdbfcb055312f356d6b9 MesaLib-9.1.6.zip
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<p>This list is likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47824">Bug 47824</a> - osmesa using --enable-shared-glapi depends on libgl</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62362">Bug 62362</a> - Crash when using Wayland EGL platform</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63435">Bug 63435</a> - [Regression since 9.0] Flickering in EGL OpenGL full-screen window with swap interval 1</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64087">Bug 64087</a> - Webgl conformance shader-with-non-reserved-words crash when mesa is compiled without --enable-debug</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64330">Bug 64330</a> - WebGL snake demo crash in loop_analysis.cpp:506: bool is_loop_terminator(ir_if*): assertion „inst != __null“ failed.</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65236">Bug 65236</a> - [i965] Rendering artifacts in VDrift/GL2</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66558">Bug 66558</a> - RS690: 3D artifacts when playing SuperTuxKart</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66847">Bug 66847</a> - compilation broken with llvm 3.3</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66850">Bug 66850</a> - glGenerateMipmap crashes when using GL_TEXTURE_2D_ARRAY with compressed internal format</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66921">Bug 66921</a> - [r300g] Heroes of Newerth: HiZ related corruption</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67283">Bug 67283</a> - VDPAU doesn't work on hybrid laptop through DRI_PRIME</li>
</ul>
<h2>Changes</h2>
<p>The full set of changes can be viewed by using the following GIT command:</p>
<pre>
git log mesa-9.1.5..mesa-9.1.6
</pre>
<p>Andreas Boll (1):</p>
<ul>
<li>configure.ac: Require llvm-3.2 for r600g/radeonsi llvm backends</li>
</ul>
<p>Brian Paul (4):</p>
<ul>
<li>mesa: handle 2D texture arrays in get_tex_rgba_compressed()</li>
<li>meta: handle 2D texture arrays in decompress_texture_image()</li>
<li>mesa: implement mipmap generation for compressed 2D array textures</li>
<li>mesa: improve free() cleanup in generate_mipmap_compressed()</li>
</ul>
<p>Carl Worth (7):</p>
<ul>
<li>docs: Add 9.1.5 release md5sums</li>
<li>Merge 'origin/9.1' into stable</li>
<li>cherry-ignore: Drop 13 patches from the pick list</li>
<li>get-pick-list.sh: Include commits mentionining "CC: mesa-stable..." in pick list</li>
<li>get-pick-list: Allow for non-whitespace between "CC:" and "mesa-stable"</li>
<li>get-pick-list: Ignore commits which CC mesa-stable unless they say "9.1"</li>
<li>Bump version to 9.1.6</li>
</ul>
<p>Chris Forbes (5):</p>
<ul>
<li>i965/Gen4: Zero extra coordinates for ir_tex</li>
<li>i965/vs: Fix flaky texture swizzling</li>
<li>i965/vs: set up sampler state pointer for Gen4/5.</li>
<li>i965/vs: Put lod parameter in the correct place for Gen4</li>
<li>i965/vs: Gen4/5: enable front colors if back colors are written</li>
</ul>
<p>Christoph Bumiller (1):</p>
<ul>
<li>nv50,nvc0: s/uint16/uint32 for constant buffer offset</li>
</ul>
<p>Dave Airlie (1):</p>
<ul>
<li>gallium/vl: add prime support</li>
</ul>
<p>Eric Anholt (1):</p>
<ul>
<li>egl: Restore "bogus" DRI2 invalidate event code.</li>
</ul>
<p>Jeremy Huddleston Sequoia (1):</p>
<ul>
<li>Apple: glFlush() is not needed with CGLFlushDrawable()</li>
</ul>
<p>Kenneth Graunke (1):</p>
<ul>
<li>glsl: Classify "layout" like other identifiers.</li>
</ul>
<p>Kristian Høgsberg (1):</p>
<ul>
<li>egl-wayland: Fix left-over wl_display_roundtrip() usage</li>
</ul>
<p>Maarten Lankhorst (2):</p>
<ul>
<li>osmesa: link against static libglapi library too to get the gl exports</li>
<li>nvc0: force use of correct firmware file</li>
</ul>
<p>Marek Olšák (4):</p>
<ul>
<li>r300g/swtcl: fix geometry corruption by uploading indices to a buffer</li>
<li>r300g/swtcl: fix a lockup in MSAA resolve</li>
<li>Revert "r300g: allow HiZ with a 16-bit zbuffer"</li>
<li>r600g: increase array size for shader inputs and outputs</li>
</ul>
<p>Matt Turner (2):</p>
<ul>
<li>i965: NULL check prog on shader compilation failure.</li>
<li>i965/vs: Print error if vertex shader fails to compile.</li>
</ul>
<p>Paul Berry (1):</p>
<ul>
<li>glsl: Handle empty if statement encountered during loop analysis.</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,168 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.1.7 Release Notes / October 4, 2013</h1>
<p>
Mesa 9.1.7 is a bug fix release which fixes bugs found since the 9.1.6 release.
</p>
<p>
Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
3.1 is <strong>only</strong> available if requested at context creation
because GL_ARB_compatibility is not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
9e4abf7b7a6db762012c3c9917a8e8c7 MesaLib-9.1.7.tar.bz2
f1d4d479d6ce12b9566fdb379960a912 MesaLib-9.1.7.tar.gz
abd612bfc5dd478d04fcc630dd7672f2 MesaLib-9.1.7.zip
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<p>This list is likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55503">Bug 55503</a> - Constant vertex attributes broken</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61635">Bug 61635</a> - glVertexAttribPointer(id, GL_UNSIGNED_BYTE, GL_FALSE,...) does not work</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65958">Bug 65958</a> - GPU Lockup on Trinity 7500G</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66292">Bug 66292</a> - [SNB/IVB/HSW Bisected]Ogles3conform GL3Tests_depth24_depth24_basic.test fail</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67548">Bug 67548</a> - glGetAttribLocation seems to be broken</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68195">Bug 68195</a> - piglit tests vs-struct-pad and fs-struct-pad both fail</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68250">Bug 68250</a> - Automatic mipmap generation with texture compression produces borders that fade to black</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69525">Bug 69525</a> - [GM45, bisected] Piglit tex-shadow2drect fails</li>
</ul>
<h2>Changes</h2>
<p>Alex Deucher (2):</p>
<ul>
<li>r600g: disable GPUVM by default</li>
<li>radeon/winsys: pad IBs to a multiple of 8 DWs</li>
</ul>
<p>Andreas Boll (2):</p>
<ul>
<li>docs: Fix a typo in the 9.1.6 release notes</li>
<li>mesa: Fix MESA_PATCH version</li>
</ul>
<p>Anuj Phogat (1):</p>
<ul>
<li>meta: Fix blitting a framebuffer with renderbuffer attachment</li>
</ul>
<p>Carl Worth (5):</p>
<ul>
<li>docs: Add 9.1.6 release md5sums</li>
<li>Use -Bsymbolic when linking libEGL.so</li>
<li>Update get-pick-list to look specifically for "9.1" in NOTE</li>
<li>cherry-ignore: Ignore last two patches in current get-pick-list output</li>
<li>Bump version to 9.1.7</li>
</ul>
<p>Chris Forbes (1):</p>
<ul>
<li>i965/fs: Gen4: Zero out extra coordinates when using shadow compare</li>
</ul>
<p>Emil Velikov (2):</p>
<ul>
<li>nv50: handle pure integer vertex attributes</li>
<li>nouveau: initialise the nouveau_transfer maps</li>
</ul>
<p>Eric Anholt (1):</p>
<ul>
<li>i965/gen4: Fix fragment program rectangle texture shadow compares.</li>
</ul>
<p>Ian Romanick (11):</p>
<ul>
<li>mesa: Remove stray debug printfs in attachment completeness code</li>
<li>mesa: Validate the layer selection of an array texture too</li>
<li>mesa/vbo: Fix handling of attribute 0 in non-compatibilty contexts</li>
<li>glsl: Add new overload of program_resource_visitor::visit_field method</li>
<li>glsl: Use alignment of container record for its first field</li>
<li>mesa: Remove all traces of GL_OES_matrix_get</li>
<li>mesa: Don't call driver RenderTexture for really broken textures</li>
<li>mesa: Don't call driver RenderTexture for invalid zoffset</li>
<li>mesa: Generate a renderbuffer wrapper even if the texture has no image</li>
<li>glsl: Move and refine test for unsized arrays in GLSL ES</li>
<li>mesa: Don't return any data for GL_SHADER_BINARY_FORMATS</li>
</ul>
<p>Ilia Mirkin (2):</p>
<ul>
<li>nv30: U8_USCALED only works for size 4</li>
<li>nv30: remove no-longer-used formats from table</li>
</ul>
<p>Joakim Sindholt (1):</p>
<ul>
<li>nvc0: fix blitctx memory leak</li>
</ul>
<p>Johannes Obermayr (1):</p>
<ul>
<li>st/gbm: Add $(WAYLAND_CFLAGS) for HAVE_EGL_PLATFORM_WAYLAND.</li>
</ul>
<p>Kenneth Graunke (1):</p>
<ul>
<li>meta: Set correct viewport and projection in decompress_texture_image.</li>
</ul>
<p>Maarten Lankhorst (1):</p>
<ul>
<li>nvc0: restore viewport after blit</li>
</ul>
<p>Rico Schüller (1):</p>
<ul>
<li>glx: Initialize OpenGL version to 1.0</li>
</ul>
<p>Tiziano Bacocco (1):</p>
<ul>
<li>nvc0/ir: fix use after free in texture barrier insertion pass</li>
</ul>
<p>Torsten Duwe (1):</p>
<ul>
<li>wayland-egl.pc requires wayland-client.pc.</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,206 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.2.1 Release Notes / (October 4, 2013)</h1>
<p>
Mesa 9.2.1 is a bug fix release which fixes bugs found since the 9.2 release.
</p>
<p>
Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
3.1 is <strong>only</strong> available if requested at context creation
because GL_ARB_compatibility is not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
e6cdfa84dfddd86e3d36ec7ff4b6478a MesaLib-9.2.1.tar.gz
dd4c82667d9c19c28a553b12eba3f8a0 MesaLib-9.2.1.tar.bz2
d9af0f5607f7d275793d293057ca9ac6 MesaLib-9.2.1.zip
</pre>
<h2>New features</h2>
<p>None</p>
<h2>Bug fixes</h2>
<p>This list is likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66779">Bug 66779</a> - Use of uninitialized stack variable with brw_search_cache()</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68233">Bug 68233</a> - Valgrind errors in mesa</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68250">Bug 68250</a> - Automatic mipmap generation with texture compression produces borders that fade to black</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68637">Bug 68637</a> - [Bisected IVB/HSW]Unigine demo crash</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68753">Bug 68753</a> - [regression bisected] GLSL ES: structs members can't have precision qualifiers anymore in 9.2</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69525">Bug 69525</a> - [GM45, bisected] Piglit tex-shadow2drect fails</li>
</ul>
<h2>Changes</h2>
<p>The full set of changes can be viewed by using the following GIT command:</p>
<pre>
git log mesa-9.2..mesa-9.2.1
</pre>
<p>Alex Deucher (1):</p>
<ul>
<li>radeon/winsys: pad IBs to a multiple of 8 DWs</li>
</ul>
<p>Andreas Boll (1):</p>
<ul>
<li>os: First check for __GLIBC__ and then for PIPE_OS_BSD</li>
</ul>
<p>Anuj Phogat (1):</p>
<ul>
<li>glsl: Allow precision qualifiers for sampler types</li>
</ul>
<p>Brian Paul (2):</p>
<ul>
<li>docs: minor fixes for 9.2 release notes</li>
<li>mesa: check for bufSize &gt; 0 in _mesa_GetSynciv()</li>
</ul>
<p>Carl Worth (3):</p>
<ul>
<li>cherry-ignore: Ignore a commit which appeared twice on master</li>
<li>Use -Bsymbolic when linking libEGL.so</li>
<li>mesa: Bump version to 9.2.1</li>
</ul>
<p>Chris Forbes (3):</p>
<ul>
<li>i965/fs: Gen4: Zero out extra coordinates when using shadow compare</li>
<li>i965: Fix cube array coordinate normalization</li>
<li>i965: fix bogus swizzle in brw_cubemap_normalize</li>
</ul>
<p>Christoph Bumiller (2):</p>
<ul>
<li>nvc0/ir: add f32 long immediate cannot saturate</li>
<li>nvc0: delete compute object on screen destruction</li>
</ul>
<p>Dave Airlie (1):</p>
<ul>
<li>st/mesa: don't dereference stObj-&gt;pt if NULL</li>
</ul>
<p>Dominik Behr (1):</p>
<ul>
<li>glsl: propagate max_array_access through function calls</li>
</ul>
<p>Emil Velikov (1):</p>
<ul>
<li>nouveau: initialise the nouveau_transfer maps</li>
</ul>
<p>Eric Anholt (4):</p>
<ul>
<li>mesa: Rip out more extension checking from texformat.c.</li>
<li>mesa: Don't choose S3TC for generic compression if we can't compress.</li>
<li>i965/gen4: Fix fragment program rectangle texture shadow compares.</li>
<li>i965: Reenable glBitmap() after the sRGB winsys enabling.</li>
</ul>
<p>Ian Romanick (7):</p>
<ul>
<li>docs: Add 9.2 release md5sums</li>
<li>Add .cherry-ignore file</li>
<li>mesa: Note that 89a665e should not be picked</li>
<li>glsl: Reallow precision qualifiers on structure members</li>
<li>mesa: Support GL_MAX_VERTEX_OUTPUT_COMPONENTS query with ES3</li>
<li>mesa: Remove all traces of GL_OES_matrix_get</li>
<li>mesa: Don't return any data for GL_SHADER_BINARY_FORMATS</li>
</ul>
<p>Ilia Mirkin (2):</p>
<ul>
<li>nv30: find first unused texcoord rather than bailing if first is used</li>
<li>nv30: fix inconsistent setting of push-&gt;user_priv</li>
</ul>
<p>Joakim Sindholt (1):</p>
<ul>
<li>nvc0: fix blitctx memory leak</li>
</ul>
<p>Johannes Obermayr (1):</p>
<ul>
<li>st/gbm: Add $(WAYLAND_CFLAGS) for HAVE_EGL_PLATFORM_WAYLAND.</li>
</ul>
<p>Kenneth Graunke (5):</p>
<ul>
<li>i965/vs: Detect GRF sources in split_virtual_grfs send-from-GRF code.</li>
<li>i965/fs: Detect GRF sources in split_virtual_grfs send-from-GRF code.</li>
<li>i965/vec4: Only zero out unused message components when there are any.</li>
<li>i965: Fix brw_vs_prog_data_compare to actually check field members.</li>
<li>meta: Set correct viewport and projection in decompress_texture_image.</li>
</ul>
<p>Maarten Lankhorst (2):</p>
<ul>
<li>st/dri: do not create a new context for msaa copy</li>
<li>nvc0: restore viewport after blit</li>
</ul>
<p>Marek Olšák (2):</p>
<ul>
<li>r600g: fix constant buffer cache flushing</li>
<li>r600g: fix texture buffer object cache flushing</li>
</ul>
<p>Paul Berry (1):</p>
<ul>
<li>i965: Initialize inout_offset parameter to brw_search_cache().</li>
</ul>
<p>Rico Schüller (1):</p>
<ul>
<li>glx: Initialize OpenGL version to 1.0</li>
</ul>
<p>Tiziano Bacocco (1):</p>
<ul>
<li>nvc0/ir: fix use after free in texture barrier insertion pass</li>
</ul>
<p>Torsten Duwe (1):</p>
<ul>
<li>wayland-egl.pc requires wayland-client.pc.</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,97 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.2.2 Release Notes / (October 18, 2013)</h1>
<p>
Mesa 9.2.2 is a bug fix release which fixes bugs found since the 9.2.1 release.
</p>
<p>
Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 3.1. OpenGL
3.1 is <strong>only</strong> available if requested at context creation
because GL_ARB_compatibility is not supported.
</p>
<h2>MD5 checksums</h2>
<pre>
</pre>
<h2>New features</h2>
<p>None</p>
<h2>Bug fixes</h2>
<p>This list is likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69449">Bug 69449</a> - Valgrind error in program_resource_visitor::recursion</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70411">Bug 70411</a> - glInvalidateFramebuffer fails with GL_INVALID_ENUM</li>
</ul>
<h2>Changes</h2>
<p>The full set of changes can be viewed by using the following GIT command:</p>
<pre>
git log mesa-9.2.1..mesa-9.2.2
</pre>
<p>Brian Paul (3):</p>
<ul>
<li>docs: add missing &lt;pre&gt; tag</li>
<li>svga: fix incorrect memcpy src in svga_buffer_upload_piecewise()</li>
<li>mesa: consolidate cube width=height error checking</li>
</ul>
<p>Carl Worth (3):</p>
<ul>
<li>docs: Add md5sums for 9.2.1 release</li>
<li>Bump version to 9.2.2</li>
</ul>
<p>Constantin Baranov (1):</p>
<ul>
<li>mesa: Add missing switch break in invalidate_framebuffer_storage()</li>
</ul>
<p>Eric Anholt (3):</p>
<ul>
<li>i965: Don't forget the cube map padding on gen5+.</li>
<li>mesa: Fix compiler warnings when ALIGN's alignment is "1 &lt;&lt; value".</li>
<li>i965: Fix 3D texture layout by more literally copying from the spec.</li>
</ul>
<p>Francisco Jerez (1):</p>
<ul>
<li>glsl: Fix usage of the wrong union member in program_resource_visitor::recursion.</li>
</ul>
<p>Tom Stellard (1):</p>
<ul>
<li>radeonsi: Use 'SI' as the LLVM processor for CIK on LLVM &lt;= 3.3</li>
</ul>
</div>
</body>
</html>

View File

@@ -14,7 +14,7 @@
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 9.2 Release Notes / (August 27, 2013)</h1>
<h1>Mesa 9.2 Release Notes / (date TBD)</h1>
<p>
Mesa 9.2 is a new development release.
@@ -33,9 +33,7 @@ because GL_ARB_compatibility is not supported.
<h2>MD5 checksums</h2>
<pre>
4f93c6475ec656fc1f7b93aeffc9b6c4 MesaLib-9.2.0.tar.gz
4185b6aae890bc62a964f4b24cc1aca8 MesaLib-9.2.0.tar.bz2
3bc5339bc98b9c37777ffd14e3a8eca4 MesaLib-9.2.0.zip
tbd
</pre>
@@ -46,179 +44,25 @@ Note: some of the new features are only available with certain drivers.
</p>
<ul>
<li>GL_ARB_shading_language_420pack in all drivers that support GLSL 1.30.</li>
<li>GL_ARB_texture_buffer_range</li>
<li>GL_ARB_texture_multisample</li>
<li>GL_ARB_texture_storage_multisample</li>
<li>GL_ARB_texture_query_lod</li>
<li>GL_ARB_texture_storage on radeon, r200, and nouveau</li>
<li>GL_EXT_discard_framebuffer in all OpenGL ES (all versions) drivers</li>
<li>GL_EXT_framebuffer_multisample_blit_scaled on i965</li>
<li>Added new freedreno gallium driver</li>
<li>OSMesa interface for gallium llvmpipe/softpipe drivers</li>
<li>Gallium Heads-Up Display (HUD) feature for performance monitoring</li>
<li>Added support for UVD (2.2 and 3.0) video decoding on r600g and radeonsi through VDPAU (requires Kernel 3.10 or later)</li>
</ul>
<h2>Bug fixes</h2>
<p>Attempts have been made to <b>not</b> include bugs fixed in previous 9.1
releases or bugs that were regressions during 9.2 development. This list is
likely incomplete.</p>
<p>TBD -- This list is likely incomplete.</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=41787">Bug 41787</a> - [llvmpipe] stencil broken</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=44618">Bug 44618</a> - Cross-compilation broken by glsl builtin_compiler</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=46632">Bug 46632</a> - Make the alignment checks for the readpixel blit fastpath a bit more lenient</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47116">Bug 47116</a> - Enemy territory freezes with rs880 and commit fbebd431ec4e2e461a0cbcd5f3a04a000b8f6bbf</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47248">Bug 47248</a> - autogen missing dependency on flex and bison, causes infinite loop in glsl build</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=48694">Bug 48694</a> - radeonsi_pipe.c:322:7: error: PIPE_CAP_DUAL_SOURCE_BLEND undeclared</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=50655">Bug 50655</a> - [r600g][RV670 HD3870] Ioquake games causes GPU lockup (waiting for 0x00003039 last fence id 0x00003030)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=51471">Bug 51471</a> - [965gm] Corrupted graphics in corners of screen with pixel shaders enabled</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=51782">Bug 51782</a> - mesa-8.0.3: fails to compile against uclibc</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54240">Bug 54240</a> - [swrast] piglit fbo-generatemipmap-filtering regression</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55503">Bug 55503</a> - Constant vertex attributes broken</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55783">Bug 55783</a> - glEnable(GL_FRAMEBUFFER_SRGB) has no effect on the backbuffer</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55825">Bug 55825</a> - [Bisected i965]Oglc max_values(advanced.fragmentProgram.GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB) causes OOM-killer</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=56920">Bug 56920</a> - [sandybridge][uxa] graphics very glitchy and always flickering</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57753">Bug 57753</a> - leak in loop_analysis</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57875">Bug 57875</a> - Second Life viewer bad rendering with git-ec83535</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58666">Bug 58666</a> - rv670 + llvm = errors.</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58680">Bug 58680</a> - [IVB] Graphical glitches in 0 A.D</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58872">Bug 58872</a> - Mac OS X configure: error: Couldn't find clock_gettime</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59322">Bug 59322</a> - r300g MSAA breaks Half-Life 2 in Wine</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59364">Bug 59364</a> - [bisected] Mesa build fails: clientattrib.c:33:22: fatal error: indirect.h: No such file or directory</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59439">Bug 59439</a> - glCopyPixels generates no fragments (occlusion_query_meta_fragments test fails)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59440">Bug 59440</a> - glBitmap generates no fragments (occlusion_query_meta_fragments test fails)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59494">Bug 59494</a> - [Bisected]Piglit glean_depthStencil fails</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59592">Bug 59592</a> - Radeon HD 5670: reproducable GPU lockups with htile enabled</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59648">Bug 59648</a> - [SNB/IVB/HSW Bisected]Piglit spec/ARB_uniform_buffer/object_layout-std140-base-size-and-alignment fails</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59701">Bug 59701</a> - lp_test_arit fails on non-sse41 capable machines, breaking make check</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59737">Bug 59737</a> - [bisected] 0d108116bd80b757fb01a84a9f1946ef870b57b8 breaks osmesa when cross compiling</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59740">Bug 59740</a> - [i965 Bisected]Oglc api-error(negative.glEvalMesh) fails</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59851">Bug 59851</a> - AC_ARG_WITH misusage leading to mesa configure failure</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59873">Bug 59873</a> - [swrast] piglit ext_framebuffer_multisample-interpolation 0 centroid-edges regression</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59876">Bug 59876</a> - glGetTexLevelParameteriv broken for indirect rendering</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60038">Bug 60038</a> - [osmesa] [git] building 32-bit mesa on 64 bit fails</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60047">Bug 60047</a> - [softpipe] piglit masked-clear regression</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60052">Bug 60052</a> - [Bisected]Piglit glx_extension_string_sanity fail</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60082">Bug 60082</a> - [ FAILED ] DispatchSanity_test.GL31_CORE</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60086">Bug 60086</a> - Wayland platform backend crashes if there's no back buffer during dri2_swap_buffers</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60098">Bug 60098</a> - [softpipe] Unexpected PIPE_CAP 78 query</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60172">Bug 60172</a> - Planeshift: triangles where grass would be</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60200">Bug 60200</a> - radeon_bo with virtual address referencing mismatch</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60212">Bug 60212</a> - [Bisected] Weston black output</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60524">Bug 60524</a> - [softpipe] piglit depthstencil-render-miplevels 146 s=z24_s8 regression</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60527">Bug 60527</a> - [softpipe] fbo-stencil GL_DEPTH24_STENCIL8 clear regression</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60633">Bug 60633</a> - EXT_texture_sRGB does not work in game The Cave on IvyBridge</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60737">Bug 60737</a> - In GLSL ES, a missing FS precision qualifier does not generate an error</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60866">Bug 60866</a> - GLSL performance issues for uniform buffer objects</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61036">Bug 61036</a> - Shader fails to build in LLVMpipe, aborts program</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61200">Bug 61200</a> - insufficient linking of libxatracker.so</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=61635">Bug 61635</a> - glVertexAttribPointer(id, GL_UNSIGNED_BYTE, GL_FALSE,...) does not work</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62466">Bug 62466</a> - r600g hyperz lockups with KSP 0.19</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62669">Bug 62669</a> - HyperZ freeze when playing PrBoom-Plus demo with lots of monsters</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62721">Bug 62721</a> - GPU lockup in Minecraft 1.5.1 with HyperZ</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62830">Bug 62830</a> - [i965 bisected] Wrong Lightning on Freespace 2 SCP (patch attached)</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63124">Bug 63124</a> - [r600g] HyperZ lockup on REDWOOD in Half Life 2 Deathmatch</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63702">Bug 63702</a> - tiling2d in radeon trash vdpau UVD textures</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64935">Bug 64935</a> - [swrast] s_texfetch.c:1335: set_fetch_functions: Assertion `texImage-&gt;FetchTexel' failed.</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64959">Bug 64959</a> - Cannot build against EGL without X11</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65112">Bug 65112</a> - glcpp hangs parsing line continuations</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65958">Bug 65958</a> - GPU Lockup on Trinity 7500G</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66450">Bug 66450</a> - JUNIPER UVD accelerated playback of MPEG 1/2 streams does not work</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66606">Bug 66606</a> - [i965 bisected]GLBenchmark 2.5.1/2.7.0 sometimes render error with gnome-session enabling SNA</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66713">Bug 66713</a> - Team Fortress 2 crashes with r600-sb on HD4850</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67354">Bug 67354</a> - glsl_parser.cpp is broken with bison 3.0</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67548">Bug 67548</a> - glGetAttribLocation seems to be broken</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67927">Bug 67927</a> - R600_DEBUG=sb: Celestia show 2 earths, one wrongly rendered</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67934">Bug 67934</a> - [SNB/IVB/HSW 9.2 Bisected]Ogles2conform/GL2Tests/glUniform/glUniform.test fails with gnome-session enable compositing</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68162">Bug 68162</a> - [radeonsi] texture rendering is broken in Source-Engine games</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68195">Bug 68195</a> - piglit tests vs-struct-pad and fs-struct-pad both fail</li>
</ul>
<h2>Changes</h2>
<ul>
<li>Removed d3d1x state tracker (unused, unmaintained and broken)</li>
<li>Removed GL_EXT_clip_volume_hint because no driver had enabled it since
2007.</li>
<li>Removed GL_MESA_resize_buffers because it was only really implemented by
the (unsupported) GDI driver.</li>
<li>GL_EXT_separate_shader_objects has been removed from all Gallium drivers,
because it disallows a critical GLSL shader optimization.
GL_ARB_separate_shader_objects doesn't have this issue.</li>
<li>i965 Gen6+ requires Kernel 3.6 or later. (92d2f5a)</li>
</ul>
</div>

View File

@@ -59,6 +59,7 @@ each directory.
<li><b>osmesa</b> - off-screen software driver
<li>XXX more
</ul>
<li><b>es</b> - OpenGL ES overlay, parallelly buildable with the core Mesa
<li><b>math</b> - vertex array translation and transformation code
(not used with Gallium)
<li><b>program</b> - Vertex/fragment shader and GLSL compiler code
@@ -134,6 +135,7 @@ each directory.
<li><b>clover</b> - OpenCL state tracker
<li><b>dri</b> - Meta state tracker for DRI drivers
<li><b>egl</b> - Meta state tracker for EGL drivers
<li><b>es</b> - OpenGL ES 1.x and 2.x state trackers
<li><b>glx</b> - Meta state tracker for GLX
<li><b>vdpau</b> - VDPAU state tracker
<li><b>vega</b> - OpenVG 1.x state tracker

View File

@@ -1,138 +0,0 @@
Name
EXT_shader_integer_mix
Name Strings
GL_EXT_shader_integer_mix
Contact
Matt Turner (matt.turner 'at' intel.com)
Contributors
Matt Turner, Intel
Ian Romanick, Intel
Status
Shipping
Version
Last Modified Date: 09/12/2013
Author Revision: 6
Number
TBD
Dependencies
OpenGL 3.0 or OpenGL ES 3.0 is required. This extension interacts with
GL_ARB_ES3_compatibility.
This extension is written against the OpenGL 4.4 (core) specification
and the GLSL 4.40 specification.
Overview
GLSL 1.30 (and GLSL ES 3.00) expanded the mix() built-in function to
operate on a boolean third argument that does not interpolate but
selects. This extension extends mix() to select between int, uint,
and bool components.
New Procedures and Functions
None.
New Tokens
None.
Additions to Chapter 8 of the GLSL 4.40 Specification (Built-in Functions)
Modify Section 8.3, Common Functions
Additions to the table listing common built-in functions:
Syntax Description
--------------------------- --------------------------------------------------
genIType mix(genIType x, Selects which vector each returned component comes
genIType y, from. For a component of a that is false, the
genBType a) corresponding component of x is returned. For a
genUType mix(genUType x, component of a that is true, the corresponding
genUType y, component of y is returned.
genBType a)
genBType mix(genBType x,
genBType y,
genBType a)
Additions to the AGL/GLX/WGL Specifications
None.
Modifications to The OpenGL Shading Language Specification, Version 4.40
Including the following line in a shader can be used to control the
language features described in this extension:
#extension GL_EXT_shader_integer_mix : <behavior>
where <behavior> is as specified in section 3.3.
New preprocessor #defines are added to the OpenGL Shading Language:
#define GL_EXT_shader_integer_mix 1
Interactions with ARB_ES3_compatibility
On desktop implementations that support ARB_ES3_compatibility,
GL_EXT_shader_integer_mix can be enabled (and the new functions
used) in shaders declared with '#version 300 es'.
GLX Protocol
None.
Errors
None.
New State
None.
New Implementation Dependent State
None.
Issues
1) Should we allow linear interpolation of integers via a non-boolean
third component?
RESOLVED: No.
2) Should we allow mix() to select between boolean components?
RESOLVED: Yes. Implementing the same functionality using casts would be
possible but ugly.
Revision History
Rev. Date Author Changes
---- -------- -------- ---------------------------------------------
6 09/12/2013 idr After discussions in Khronos, change vendor
prefix to EXT.
5 09/09/2013 idr Add ARB_ES3_compatibility interaction.
4 09/06/2013 mattst88 Allow extension on OpenGL ES 3.0.
3 08/28/2013 mattst88 Add #extension/#define changes.
2 08/26/2013 mattst88 Change vendor prefix to MESA. Add mix() that
selects between boolean components.
1 08/26/2013 mattst88 Initial revision

View File

@@ -1,405 +0,0 @@
Name
MESA_query_renderer
Name Strings
GLX_MESA_query_renderer
Contact
Ian Romanick <ian.d.romanick@intel.com>
IP Status
No known IP claims.
Status
Incomplete. DO NOT SHIP.
Version
Version 6, 7-November-2013
Number
TBD.
Dependencies
GLX 1.4 is required.
GLX_ARB_create_context and GLX_ARB_create_context_profile are required.
This extension interacts with GLX_EXT_create_context_es2_profile and
GLX_EXT_create_context_es_profile.
Overview
In many situations, applications want to detect characteristics of a
rendering device before creating a context for that device. Information
gathered at this stage may guide choices the application makes about
color depth, number of samples per-pixel, texture quality, and so on.
In addition, versions of supported APIs and implementation API
preference may also guide start-up decisions made by the application.
For example, one implementation may prefer vertex data be supplied using
methods only available in a compatibility profile, but another
implementation may only support the desired version in a core profile.
There are also cases where more than one renderer may be available per
display. For example, there is typically a hardware implementation and
a software based implementation. There are cases where an application
may want to pick one over the other. One such situation is when the
software implementation supports more features than the hardware
implementation. Another situation is when a particular version of the
hardware implementation is blacklisted due to known bugs.
This extension provides a mechanism for the application to query all of
the available renderers for a particular display and screen. In
addition, this extension provides a mechanism for applications to create
contexts with respect to a specific renderer.
New Procedures and Functions
Bool glXQueryRendererIntegerMESA(Display *dpy, int screen,
int renderer, int attribute,
unsigned int *value);
Bool glXQueryCurrentRendererIntegerMESA(int attribute, unsigned int *value);
const char *glXQueryRendererStringMESA(Display *dpy, int screen,
int renderer, int attribute);
const char *glXQueryCurrentRendererStringMESA(int attribute);
New Tokens
Accepted as an <attribute> in glXQueryRendererIntegerMESA and
glXQueryCurrentRendererIntegerMESA:
GLX_RENDERER_VENDOR_ID_MESA 0x8183
GLX_RENDERER_DEVICE_ID_MESA 0x8184
GLX_RENDERER_VERSION_MESA 0x8185
GLX_RENDERER_ACCELERATED_MESA 0x8186
GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
Accepted as an <attribute> in glXQueryRendererStringMESA and
glXQueryCurrentRendererStringMESA:
GLX_RENDERER_VENDOR_ID_MESA
GLX_RENDERER_DEVICE_ID_MESA
Accepted as an attribute name in <*attrib_list> in
glXCreateContextAttribsARB:
GLX_RENDERER_ID_MESA 0x818E
Additions to the OpenGL / WGL Specifications
None. This specification is written for GLX.
Additions to the GLX 1.4 Specification
[Add the following to Section X.Y.Z of the GLX Specification]
To obtain information about the available renderers for a particular
display and screen,
Bool glXQueryRendererIntegerMESA(Display *dpy, int screen, int renderer,
int attribute, unsigned int *value);
can be used. The value for <attribute> will be returned in one or more
integers specified by <value>. The values, data sizes, and descriptions
of each renderer attribute are listed in the table below.
GLX renderer attribute number description
of values
---------------------- --------- -----------
GLX_RENDERER_VENDOR_ID_MESA 1 PCI ID of the device vendor
GLX_RENDERER_DEVICE_ID_MESA 1 PCI ID of the device
GLX_RENDERER_VERSION_MESA 3 Major, minor, and patch level of
the renderer implementation
GLX_RENDERER_ACCELERATED_MESA 1 Boolean indicating whether or
not the renderer is hardware
accelerated
GLX_RENDERER_VIDEO_MEMORY_MESA 1 Number of megabytes of video
memory available to the renderer
GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA
1 Boolean indicating whether or
not the renderer uses a unified
memory architecture or has
separate "on-card" and GART
memory.
GLX_RENDERER_PREFERRED_PROFILE_MESA
1 Bitmask of the preferred context
profile for this renderer. This
value is suitable to be supplied
with the
GLX_CONTEXT_PROFILE_MASK_ARB
attribute to
glXCreateContextAttribsARB
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA
2 Maximum core profile major and
minor version supported by the
renderer
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA
2 Maximum compatibility profile
major and minor version
supported by the renderer
GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA
2 Maximum OpenGL ES 1.x
major and minor version
supported by the renderer
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA
2 Maximum OpenGL ES 2.x or 3.x
major and minor version
supported by the renderer
In the table, boolean attributes will have either the value 0 or 1.
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA,
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA,
GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA, and
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA each return <0, 0> in
*value if no version of that profile is supported.
GLX_RENDERER_VENDOR_ID_MESA and GLX_RENDERER_DEVICE_ID_MESA may return
0xFFFFFFFF if the device does not have a PCI ID (because it is not a PCI
device) or if the PCI ID is not available. In this case the application
should rely on the string query instead.
If <attribute> is not a recognized value, False is returned, but no GLX
error is generated. Otherwise, True is returned.
String versions of some attributes may also be queried using
const char *glXQueryRendererStringMESA(Display *dpy, int screen,
int renderer, int attribute);
The value for <attribute> will be returned in one or more
integers specified by <value>. The values, data sizes, and descriptions
of each renderer attribute are listed in the table below.
GLX renderer attribute description
---------------------- -----------
GLX_RENDERER_VENDOR_ID_MESA Name of the renderer provider. This may
differ from the vendor name of the
underlying hardware.
GLX_RENDERER_DEVICE_ID_MESA Name of the renderer. This may differ from
the name of the underlying hardware (e.g.,
for a software renderer).
If <attribute> is not a recognized value, NULL is returned, but no GLX
error is generated.
The string returned for GLX_RENDERER_VENDOR_ID_MESA will have the same
format as the string that would be returned by glGetString of GL_VENDOR.
It may, however, have a different value.
The string returned for GLX_RENDERER_DEVICE_ID_MESA will have the same
format as the string that would be returned by glGetString of GL_RENDERER.
It may, however, have a different value.
[Add to section section 3.3.7 "Rendering Contexts"]
The attribute name GLX_RENDERER_ID_MESA specified the index of the render
against which the context should be created. The default value of
GLX_RENDER_ID_MESA is 0.
[Add to list of errors for glXCreateContextAttribsARB in section section
3.3.7 "Rendering Contexts"]
* If the value of GLX_RENDERER_ID_MESA specifies a non-existent
renderer, BadMatch is generated.
Dependencies on GLX_EXT_create_context_es_profile and
GLX_EXT_create_context_es2_profile
If neither extension is supported, remove all mention of
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA from the spec.
If GLX_EXT_create_context_es_profile is not supported, remove all mention of
GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA from the spec.
Issues
1) How should the difference between on-card and GART memory be exposed?
UNRESOLVED.
2) How should memory limitations of unified memory architecture (UMA)
systems be exposed?
UNRESOLVED. Some hardware has different per-process and global
limits for memory that can be accessed within a single draw call.
3) How should the renderer's API preference be advertised?
UNRESOLVED. The common case for desktop renderers is to prefer
either core or compatibility. However, some renderers may actually
prefer an ES context. This leaves the application in a tough spot
if it can only support core or compatibility and the renderer says it
wants ES.
4) Should OpenGL ES 2.0 and OpenGL ES 3.0 be treated separately?
RESOLVED. No. OpenGL ES 3.0 is backwards compatible with OpenGL ES
2.0. Applications can detect OpenGL ES 3.0 support by querying
GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA.
5) How can applications tell the difference between different hardware
renderers for the same device? For example, whether the renderer is the
open-source driver or the closed-source driver.
RESOLVED. Assuming this extension is ever implemented outside Mesa,
applications can query GLX_RENDERER_VENDOR_ID_MESA from
glXQueryRendererStringMESA. This will almost certainly return
different strings for open-source and closed-source drivers.
6) What is the value of GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA for
software renderers?
UNRESOLVED. Video (display) memory and texture memory is not unified
for software implementations, so it seems reasonable for this to be
False.
7) How does an application determine the number of available renderers?
UNRESOLVED.
8) What happens if a fbconfig is used to create context on a renderer
that cannot support it? For example, if a multisampled config is used
with a software renderer that does not support multisampling.
RESOLVED. The language for glXCreateContextAttribsARB already covers
this case. Context creation will fail, and BadMatch is generated.
9) In addition to being able to query the supported versions, should
applications also be able to query the supported extensions?
RESOLVED. No. Desktop OpenGL core profiles and OpenGL ES 3.0 have
moved away from the monolithic string returned by glGetString of
GL_EXTENSIONS. Providing the newer indexed query would require adding
a lot of extra infrastructure, and it would probably provide little
benefit to applications.
10) What combination of values for GLX_RENDERER_PREFERRED_PROFILE_MESA,
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA, and
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA should be returned
for a renderer that only supports OpenGL 3.1 without the
GL_ARB_compatibility extension?
RESOLVED. The renderer will return GLX_CONTEXT_CORE_PROFILE_BIT_ARB
for GLX_RENDERER_PREFERRED_PROFILE_MESA.
Further, the renderer will return <3,0> for
GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA because OpenGL
3.1 without GL_ARB_compatibility is not backwards compatible with
previous versions of OpenGL. The render will return <3,1> for
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA indicating that support
for OpenGL 3.1 is available.
Even though there is no OpenGL 3.1 core profile, the values
returned for GLX_RENDERER_PREFERRED_PROFILE_MESA and
GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA can be supplied
with the GLX_CONTEXT_PROFILE_MASK_ARB and
GLX_CONTEXT_{MAJOR,MINOR}_VERSION_ARB attributes of
glXCreateContextAttribsARB without error. If the requested
OpenGL version is less than 3.2, the
GLX_CONTEXT_PROFILE_MASK_ARB attribute is ignored by
glXCreateContextAttribsARB.
11) How can application learn about multi-GPU (e.g., SLI, CrossFireX,
etc.) configurations?
UNRESOLVED. Based on ISV feedback, this is important information to
provide to the application. Given the variety of possible hardware
configurations (e.g., Hybrid CrossFireX) and different rendering
modes (e.g., split-frame rendering vs. alternate-frame rendering),
it's not clear how this information can be communicated.
It is likely that this will be left to a layered extension.
12) Should capability queries similar to those in
GL_ARB_internalformat_query or GL_ARB_internalformat_query2 be added?
RESOLVED. No. With the possible exception of the texture size
queries, it seems unlikely that applications would ever use this
information before creating a context.
13) Existing GL extensions (e.g., GL_ATI_meminfo and
GL_NVX_gpu_memory_info) allow easy queries after context creation. With
this extension it is a bit of a pain for a portable application to query
the information after context creation.
RESOLVED. Add versions of the queries that implicitly take the
display, screen, and renderer from the currently bound context.
14) Why not make the queries from issue #13 GL functions (instead of GLX)?
RESOLVED. It is fairly compelling for the post-creation queries to
just use glGetInteger and glGetString. However, the GL enums and
the GLX enums would have different names and would almost certainly
have different values. It seems like this would cause more problems
than it would solve.
15) Should the string queries be required to return the same values as
glGetString(GL_VENDOR) and glGetString(GL_RENDERER)?
UNRESOLVED. This may be useful for applications that already do
device detection based on these strings.
16) What type should the value parameter of glXQueryRendererIntegerMESA
and glXQueryCurrentRendererIntegerMESA be?
UNRESOLVED. Other similar GLX query functions just use int or
unsigned int, so that's what this extension uses for now. However,
an expeclitly sized value, such as uint32_t or uint64_t, seems
preferable.
17) What about SoCs and other systems that don't have PCI?
RESOLVED. The GLX_RENDERER_VENDOR_ID_MESA and
GLX_RENDERER_DEVICE_ID_MESA integer queries may return 0xFFFFFFFF if a
PCI ID either does not exist or is not available. Implementations
should make every attempt to return as much information as is
possible. For example, if the implementation is running on a non-PCI
SoC with a Qualcomm GPU, GLX_RENDERER_VENDOR_ID_MESA should return
0x168C, but GLX_RENDERER_DEVICE_ID_MESA will return 0x0000.
Revision History
Version 1, 2012/08/27 - Initial version
Version 2, 2012/09/04 - Specify behavior of implementations that
do not support certain profiles.
Change wording of issue #8 to be more
clear.
Make some wording changes to issue #10 to
clarify the resolution a bit.
Version 3, 2012/09/23 - Add issue #11 regarding multi-GPU systems.
Version 4, 2013/02/01 - Add issue #12 regarding texture / renderbuffer
format queries.
Version 5, 2013/02/14 - Add issues #13 and #14 regarding simpler queires
after the context is created and made current.
Add issue #15 regarding the string query.
Add issue #16 regarding the value type returned
by the Integer functions.
Version 6, 2013/10/25 - Fix a typo. Update the list of functions to
which the new enums can be passed. The "Current"
versions were previously missing.
Version 7, 2013/11/07 - Fix a couple more typos. Add issue #17 regarding
the PCI queries on systems that don't have PCI.

View File

@@ -12,7 +12,7 @@ Contact
Status
Obsolete.
Shipping (since Mesa version 2.2)
Version

View File

@@ -17,7 +17,7 @@ Status
Version
Version 5, July 16, 2013
Version 1, March 1, 2011
Number
@@ -57,7 +57,7 @@ New Procedures and Functions
struct wl_display *display);
EGLBoolean eglQueryWaylandBufferWL(EGLDisplay dpy,
struct wl_resource *buffer,
struct wl_buffer *buffer,
EGLint attribute, EGLint *value);
New Tokens
@@ -76,11 +76,6 @@ New Tokens
EGL_TEXTURE_Y_UV_WL 0x31D8
EGL_TEXTURE_Y_XUXV_WL 0x31D9
Accepted in the <attribute> parameter of eglQueryWaylandBufferWL:
EGL_TEXTURE_FORMAT 0x3080
EGL_WAYLAND_Y_INVERTED_WL 0x31DB
Additions to the EGL 1.4 Specification:
@@ -162,16 +157,6 @@ Additions to the EGL 1.4 Specification:
Further, eglQueryWaylandBufferWL accepts attributes EGL_WIDTH and
EGL_HEIGHT to query the width and height of the wl_buffer.
Also, eglQueryWaylandBufferWL may accept
EGL_WAYLAND_Y_INVERTED_WL attribute to query orientation of
wl_buffer. If EGL_WAYLAND_Y_INVERTED_WL is supported
eglQueryWaylandBufferWL returns EGL_TRUE and value is a boolean
that tells if wl_buffer is y-inverted or not. If
EGL_WAYLAND_Y_INVERTED_WL is not supported
eglQueryWaylandBufferWL returns EGL_FALSE, in that case
wl_buffer should be treated as if value of
EGL_WAYLAND_Y_INVERTED_WL was EGL_TRUE.
Issues
Revision History
@@ -188,10 +173,3 @@ Revision History
Use EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB, and EGL_TEXTURE_RGBA,
and just define the new YUV texture formats. Add support for
EGL_WIDTH and EGL_HEIGHT in the query attributes (Kristian Høgsberg)
Version 5, July 16, 2013
Change eglQueryWaylandBufferWL to take a resource pointer to the
buffer instead of a pointer to a struct wl_buffer, as the latter has
been deprecated. (Ander Conselvan de Oliveira)
Version 6, September 16, 2013
Add EGL_WAYLAND_Y_INVERTED_WL attribute to allow specifying
wl_buffer's orientation.

1
doxygen/.gitignore vendored
View File

@@ -8,7 +8,6 @@ gallium
gbm
glapi
glsl
i965
main
math
math_subset

View File

@@ -17,8 +17,7 @@ FULL = \
swrast_setup.doxy \
tnl.doxy \
tnl_dd.doxy \
gbm.doxy \
i965.doxy
gbm.doxy
full: $(FULL:.doxy=.tag)
$(foreach FILE,$(FULL),doxygen $(FILE);)

View File

@@ -15,6 +15,5 @@
<a class="qindex" href="../swrast_setup/index.html">swrast_setup</a> |
<a class="qindex" href="../tnl/index.html">tnl</a> |
<a class="qindex" href="../tnl_dd/index.html">tnl_dd</a> |
<a class="qindex" href="../gbm/index.html">gbm</a> |
<a class="qindex" href="../i965/index.html">i965</a>
<a class="qindex" href="../gbm/index.html">gbm</a>
</div>

View File

@@ -1,50 +0,0 @@
# Doxyfile 0.1
@INCLUDE = common.doxy
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "Intel i965 Driver"
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../src/mesa/drivers/dri/i965
FILE_PATTERNS = *.c *.cpp *.h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
HTML_OUTPUT = i965
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH = ../include/
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES = glsl.tag=../glsl \
main.tag=../main \
math.tag=../math \
swrast.tag=../swrast \
swrast_setup.tag=../swrast_setup \
tnl.tag=../tnl \
tnl_dd.tag=../tnl_dd \
vbo.tag=vbo
GENERATE_TAGFILE = i965.tag

View File

@@ -115,22 +115,20 @@ typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd);
#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */
#define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */
#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB /* eglQueryWaylandBufferWL attribute */
#define EGL_TEXTURE_Y_U_V_WL 0x31D7
#define EGL_TEXTURE_Y_UV_WL 0x31D8
#define EGL_TEXTURE_Y_XUXV_WL 0x31D9
struct wl_display;
struct wl_resource;
struct wl_buffer;
#ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_buffer *buffer, EGLint attribute, EGLint *value);
#endif
typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_buffer *buffer, EGLint attribute, EGLint *value);
#endif

View File

@@ -109,8 +109,8 @@ typedef void *EGLNativeDisplayType;
#ifdef MESA_EGL_NO_X11_HEADERS
typedef void *EGLNativeDisplayType;
typedef khronos_uintptr_t EGLNativePixmapType;
typedef khronos_uintptr_t EGLNativeWindowType;
typedef khronos_uint32_t EGLNativePixmapType;
typedef khronos_uint32_t EGLNativeWindowType;
#else

View File

@@ -33,14 +33,25 @@
/**********************************************************************
* Begin system-specific stuff.
* Begin system-specific stuff. Do not do any of this when building
* for SciTech SNAP, as this is all done before this header file is
* included.
*/
#if !defined(__SCITECH_SNAP__)
#if defined(__BEOS__)
#include <stdlib.h> /* to get some BeOS-isms */
#endif
#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
#define OPENSTEP
#endif
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
#define __WIN32__
#endif
#if defined(__WIN32__) && !defined(__CYGWIN__)
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
@@ -61,6 +72,10 @@
# define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */
#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
# define PRAGMA_EXPORT_SUPPORTED 1
#endif
/*
* WINDOWS: Include windows.h here to define APIENTRY.
* It is also useful when applications include this file by
@@ -76,6 +91,10 @@
#include <windows.h>
#endif
#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#ifndef GLAPI
#define GLAPI extern
#endif
@@ -97,10 +116,15 @@
#define GLAPIENTRYP GLAPIENTRY *
#endif
#ifdef CENTERLINE_CLPP
#define signed
#endif
#if defined(PRAGMA_EXPORT_SUPPORTED)
#pragma export on
#endif
#endif /* !__SCITECH_SNAP__ */
/*
* End system-specific stuff.
**********************************************************************/
@@ -1712,6 +1736,8 @@ GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
@@ -2062,6 +2088,26 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
#if GL_ARB_shader_objects
#ifndef GL_MESA_shader_debug
#define GL_MESA_shader_debug 1
#define GL_DEBUG_OBJECT_MESA 0x8759
#define GL_DEBUG_PRINT_MESA 0x875A
#define GL_DEBUG_ASSERT_MESA 0x875B
GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
GLsizei *length, GLcharARB *debugLog);
GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
#endif /* GL_MESA_shader_debug */
#endif /* GL_ARB_shader_objects */
/*
* ???. GL_MESA_packed_depth_stencil
* XXX obsolete
@@ -2078,6 +2124,27 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
#endif /* GL_MESA_packed_depth_stencil */
#ifndef GL_MESA_program_debug
#define GL_MESA_program_debug 1
#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0
#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1
#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2
#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3
#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4
#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5
#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6
#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7
typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data);
GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data);
GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v);
#endif /* GL_MESA_program_debug */
#ifndef GL_MESA_texture_array
#define GL_MESA_texture_array 1
@@ -2153,6 +2220,9 @@ typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum t
#pragma export off
#endif
#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
/*
* End system-specific stuff
**********************************************************************/

File diff suppressed because it is too large Load Diff

View File

@@ -168,6 +168,7 @@ typedef XID GLXDrawable;
/* GLX 1.3 and later */
typedef struct __GLXFBConfigRec *GLXFBConfig;
typedef XID GLXFBConfigID;
typedef XID GLXContextID;
typedef XID GLXWindow;
typedef XID GLXPbuffer;
@@ -467,32 +468,7 @@ extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer
#endif /* GLX_EXT_texture_from_pixmap */
#ifndef GLX_MESA_query_renderer
#define GLX_MESA_query_renderer 1
#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
#define GLX_RENDERER_VERSION_MESA 0x8185
#define GLX_RENDERER_ACCELERATED_MESA 0x8186
#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
#define GLX_RENDERER_ID_MESA 0x818E
Bool glXQueryRendererIntegerMESA(Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
Bool glXQueryCurrentRendererIntegerMESA(int attribute, unsigned int *value);
const char *glXQueryRendererStringMESA(Display *dpy, int screen, int renderer, int attribute);
const char *glXQueryCurrentRendererStringMESA(int attribute);
typedef Bool (*PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
typedef Bool (*PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
typedef const char *(*PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
typedef const char *(*PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
#endif /* GLX_MESA_query_renderer */
/*** Should these go here, or in another header? */
/*

File diff suppressed because it is too large Load Diff

View File

@@ -86,10 +86,6 @@ typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension;
typedef struct __DRI2flushExtensionRec __DRI2flushExtension;
typedef struct __DRI2throttleExtensionRec __DRI2throttleExtension;
typedef struct __DRIimageLoaderExtensionRec __DRIimageLoaderExtension;
typedef struct __DRIimageDriverExtensionRec __DRIimageDriverExtension;
/*@}*/
@@ -334,6 +330,12 @@ struct __DRI2throttleExtensionRec {
enum __DRI2throttleReason reason);
};
/**
* XML document describing the configuration options supported by the
* driver.
*/
extern const char __driConfigOptions[];
/*@}*/
/**
@@ -491,19 +493,6 @@ struct __DRIuseInvalidateExtensionRec {
*/
#define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions"
/**
* This symbol replaces the __DRI_DRIVER_EXTENSIONS symbol, and will be
* suffixed by "_drivername", allowing multiple drivers to be built into one
* library, and also giving the driver the chance to return a variable driver
* extensions struct depending on the driver name being loaded or any other
* system state.
*
* The function prototype is:
*
* const __DRIextension **__driDriverGetExtensions_drivername(void);
*/
#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
/**
* Tokens for __DRIconfig attribs. A number of attributes defined by
* GLX or EGL standards are not in the table, as they must be provided
@@ -563,8 +552,6 @@ struct __DRIuseInvalidateExtensionRec {
#define __DRI_ATTRIB_RGBA_BIT 0x01
#define __DRI_ATTRIB_COLOR_INDEX_BIT 0x02
#define __DRI_ATTRIB_LUMINANCE_BIT 0x04
#define __DRI_ATTRIB_FLOAT_BIT 0x08
#define __DRI_ATTRIB_UNSIGNED_FLOAT_BIT 0x10
/* __DRI_ATTRIB_CONFIG_CAVEAT */
#define __DRI_ATTRIB_SLOW_BIT 0x01
@@ -717,7 +704,7 @@ struct __DRIlegacyExtensionRec {
* conjunction with the core extension.
*/
#define __DRI_SWRAST "DRI_SWRast"
#define __DRI_SWRAST_VERSION 4
#define __DRI_SWRAST_VERSION 3
struct __DRIswrastExtensionRec {
__DRIextension base;
@@ -753,48 +740,8 @@ struct __DRIswrastExtensionRec {
const uint32_t *attribs,
unsigned *error,
void *loaderPrivate);
/**
* createNewScreen() with the driver extensions passed in.
*
* \since version 4
*/
__DRIscreen *(*createNewScreen2)(int screen,
const __DRIextension **loader_extensions,
const __DRIextension **driver_extensions,
const __DRIconfig ***driver_configs,
void *loaderPrivate);
};
/** Common DRI function definitions, shared among DRI2 and Image extensions
*/
typedef __DRIscreen *
(*__DRIcreateNewScreen2Func)(int screen, int fd,
const __DRIextension **extensions,
const __DRIextension **driver_extensions,
const __DRIconfig ***driver_configs,
void *loaderPrivate);
typedef __DRIdrawable *
(*__DRIcreateNewDrawableFunc)(__DRIscreen *screen,
const __DRIconfig *config,
void *loaderPrivate);
typedef __DRIcontext *
(*__DRIcreateContextAttribsFunc)(__DRIscreen *screen,
int api,
const __DRIconfig *config,
__DRIcontext *shared,
unsigned num_attribs,
const uint32_t *attribs,
unsigned *error,
void *loaderPrivate);
typedef unsigned int
(*__DRIgetAPIMaskFunc)(__DRIscreen *screen);
/**
* DRI2 Loader extension.
*/
@@ -875,7 +822,7 @@ struct __DRIdri2LoaderExtensionRec {
* constructors for DRI2.
*/
#define __DRI_DRI2 "DRI_DRI2"
#define __DRI_DRI2_VERSION 4
#define __DRI_DRI2_VERSION 3
#define __DRI_API_OPENGL 0 /**< OpenGL compatibility profile */
#define __DRI_API_GLES 1 /**< OpenGL ES 1.x */
@@ -942,14 +889,17 @@ struct __DRIdri2ExtensionRec {
const __DRIconfig ***driver_configs,
void *loaderPrivate);
__DRIcreateNewDrawableFunc createNewDrawable;
__DRIcontext *(*createNewContext)(__DRIscreen *screen,
const __DRIconfig *config,
__DRIcontext *shared,
void *loaderPrivate);
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
const __DRIconfig *config,
void *loaderPrivate);
__DRIcontext *(*createNewContext)(__DRIscreen *screen,
const __DRIconfig *config,
__DRIcontext *shared,
void *loaderPrivate);
/* Since version 2 */
__DRIgetAPIMaskFunc getAPIMask;
unsigned int (*getAPIMask)(__DRIscreen *screen);
__DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen,
int api,
@@ -972,14 +922,14 @@ struct __DRIdri2ExtensionRec {
*
* \sa __DRIswrastExtensionRec::createContextAttribs
*/
__DRIcreateContextAttribsFunc createContextAttribs;
/**
* createNewScreen with the driver's extension list passed in.
*
* \since version 4
*/
__DRIcreateNewScreen2Func createNewScreen2;
__DRIcontext *(*createContextAttribs)(__DRIscreen *screen,
int api,
const __DRIconfig *config,
__DRIcontext *shared,
unsigned num_attribs,
const uint32_t *attribs,
unsigned *error,
void *loaderPrivate);
};
@@ -988,7 +938,7 @@ struct __DRIdri2ExtensionRec {
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
#define __DRI_IMAGE_VERSION 8
#define __DRI_IMAGE_VERSION 7
/**
* These formats correspond to the similarly named MESA_FORMAT_*
@@ -1012,14 +962,10 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_FORMAT_R8 0x1006 /* Since version 5 */
#define __DRI_IMAGE_FORMAT_GR88 0x1007
#define __DRI_IMAGE_FORMAT_NONE 0x1008
#define __DRI_IMAGE_FORMAT_XRGB2101010 0x1009
#define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a
#define __DRI_IMAGE_FORMAT_SARGB8 0x100b
#define __DRI_IMAGE_USE_SHARE 0x0001
#define __DRI_IMAGE_USE_SCANOUT 0x0002
#define __DRI_IMAGE_USE_CURSOR 0x0004 /* Depricated */
#define __DRI_IMAGE_USE_LINEAR 0x0008
/**
@@ -1037,6 +983,7 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_FOURCC_YUV410 0x39565559
#define __DRI_IMAGE_FOURCC_YUV411 0x31315559
#define __DRI_IMAGE_FOURCC_YUV420 0x32315559
#define __DRI_IMAGE_FOURCC_YVU420 0x32315659
#define __DRI_IMAGE_FOURCC_YUV422 0x36315559
#define __DRI_IMAGE_FOURCC_YUV444 0x34325559
#define __DRI_IMAGE_FOURCC_NV12 0x3231564e
@@ -1079,25 +1026,6 @@ struct __DRIdri2ExtensionRec {
* 7+. Each query will return a
* new fd. */
enum __DRIYUVColorSpace {
__DRI_YUV_COLOR_SPACE_UNDEFINED = 0,
__DRI_YUV_COLOR_SPACE_ITU_REC601 = 0x327F,
__DRI_YUV_COLOR_SPACE_ITU_REC709 = 0x3280,
__DRI_YUV_COLOR_SPACE_ITU_REC2020 = 0x3281
};
enum __DRISampleRange {
__DRI_YUV_RANGE_UNDEFINED = 0,
__DRI_YUV_FULL_RANGE = 0x3282,
__DRI_YUV_NARROW_RANGE = 0x3283
};
enum __DRIChromaSiting {
__DRI_YUV_CHROMA_SITING_UNDEFINED = 0,
__DRI_YUV_CHROMA_SITING_0 = 0x3284,
__DRI_YUV_CHROMA_SITING_0_5 = 0x3285
};
/**
* \name Reasons that __DRIimageExtensionRec::createImageFromTexture might fail
*/
@@ -1203,24 +1131,6 @@ struct __DRIimageExtensionRec {
int *fds, int num_fds,
int *strides, int *offsets,
void *loaderPrivate);
/**
* Like createImageFromFds, but takes additional attributes.
*
* For EGL_EXT_image_dma_buf_import.
*
* \since 8
*/
__DRIimage *(*createImageFromDmaBufs)(__DRIscreen *screen,
int width, int height, int fourcc,
int *fds, int num_fds,
int *strides, int *offsets,
enum __DRIYUVColorSpace color_space,
enum __DRISampleRange sample_range,
enum __DRIChromaSiting horiz_siting,
enum __DRIChromaSiting vert_siting,
unsigned *error,
void *loaderPrivate);
};
@@ -1275,135 +1185,4 @@ struct __DRIrobustnessExtensionRec {
__DRIextension base;
};
/**
* DRI config options extension.
*
* This extension provides the XML string containing driver options for use by
* the loader in supporting the driconf application.
*/
#define __DRI_CONFIG_OPTIONS "DRI_ConfigOptions"
#define __DRI_CONFIG_OPTIONS_VERSION 1
typedef struct __DRIconfigOptionsExtensionRec {
__DRIextension base;
const char *xml;
} __DRIconfigOptionsExtension;
/**
* This extension provides a driver vtable to a set of common driver helper
* functions (driCoreExtension, driDRI2Extension) within the driver
* implementation, as opposed to having to pass them through a global
* variable.
*
* It is not intended to be public API to the actual loader, and the vtable
* layout may change at any time.
*/
#define __DRI_DRIVER_VTABLE "DRI_DriverVtable"
#define __DRI_DRIVER_VTABLE_VERSION 1
typedef struct __DRIDriverVtableExtensionRec {
__DRIextension base;
const struct __DriverAPIRec *vtable;
} __DRIDriverVtableExtension;
/**
* Query renderer driver extension
*
* This allows the window system layer (either EGL or GLX) to query aspects of
* hardware and driver support without creating a context.
*/
#define __DRI2_RENDERER_QUERY "DRI_RENDERER_QUERY"
#define __DRI2_RENDERER_QUERY_VERSION 1
#define __DRI2_RENDERER_VENDOR_ID 0x0000
#define __DRI2_RENDERER_DEVICE_ID 0x0001
#define __DRI2_RENDERER_VERSION 0x0002
#define __DRI2_RENDERER_ACCELERATED 0x0003
#define __DRI2_RENDERER_VIDEO_MEMORY 0x0004
#define __DRI2_RENDERER_UNIFIED_MEMORY_ARCHITECTURE 0x0005
#define __DRI2_RENDERER_PREFERRED_PROFILE 0x0006
#define __DRI2_RENDERER_OPENGL_CORE_PROFILE_VERSION 0x0007
#define __DRI2_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION 0x0008
#define __DRI2_RENDERER_OPENGL_ES_PROFILE_VERSION 0x0009
#define __DRI2_RENDERER_OPENGL_ES2_PROFILE_VERSION 0x000a
typedef struct __DRI2rendererQueryExtensionRec __DRI2rendererQueryExtension;
struct __DRI2rendererQueryExtensionRec {
__DRIextension base;
int (*queryInteger)(__DRIscreen *screen, int attribute, unsigned int *val);
int (*queryString)(__DRIscreen *screen, int attribute, const char **val);
};
/**
* Image Loader extension. Drivers use this to allocate color buffers
*/
enum __DRIimageBufferMask {
__DRI_IMAGE_BUFFER_BACK = (1 << 0),
__DRI_IMAGE_BUFFER_FRONT = (1 << 1)
};
struct __DRIimageList {
uint32_t image_mask;
__DRIimage *back;
__DRIimage *front;
};
#define __DRI_IMAGE_LOADER "DRI_IMAGE_LOADER"
#define __DRI_IMAGE_LOADER_VERSION 1
struct __DRIimageLoaderExtensionRec {
__DRIextension base;
/**
* Allocate color buffers.
*
* \param driDrawable
* \param width Width of allocated buffers
* \param height Height of allocated buffers
* \param format one of __DRI_IMAGE_FORMAT_*
* \param stamp Address of variable to be updated when
* getBuffers must be called again
* \param loaderPrivate The loaderPrivate for driDrawable
* \param buffer_mask Set of buffers to allocate
* \param buffers Returned buffers
*/
int (*getBuffers)(__DRIdrawable *driDrawable,
unsigned int format,
uint32_t *stamp,
void *loaderPrivate,
uint32_t buffer_mask,
struct __DRIimageList *buffers);
/**
* Flush pending front-buffer rendering
*
* Any rendering that has been performed to the
* fake front will be flushed to the front
*
* \param driDrawable Drawable whose front-buffer is to be flushed
* \param loaderPrivate Loader's private data that was previously passed
* into __DRIdri2ExtensionRec::createNewDrawable
*/
void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate);
};
/**
* DRI extension.
*/
#define __DRI_IMAGE_DRIVER "DRI_IMAGE_DRIVER"
#define __DRI_IMAGE_DRIVER_VERSION 1
struct __DRIimageDriverExtensionRec {
__DRIextension base;
/* Common DRI functions, shared with DRI2 */
__DRIcreateNewScreen2Func createNewScreen2;
__DRIcreateNewDrawableFunc createNewDrawable;
__DRIcreateContextAttribsFunc createContextAttribs;
__DRIgetAPIMaskFunc getAPIMask;
};
#endif

View File

@@ -101,6 +101,11 @@ extern "C" {
typedef struct osmesa_context *OSMesaContext;
#if defined(__QUICKDRAW__)
#pragma export on
#endif
/*
* Create an Off-Screen Mesa rendering context. The only attribute needed is
* an RGBA vs Color-Index mode flag.

View File

@@ -1,7 +1,7 @@
#ifndef __glext_h_
#define __glext_h_
/* $Revision: 20798 $ on $Date:: 2013-03-07 01:19:34 -0800 #$ */
/* $Revision: 19260 $ on $Date:: 2012-09-20 11:30:36 -0700 #$ */
#ifdef __cplusplus
extern "C" {
@@ -1055,10 +1055,10 @@ typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum
#ifndef GL_EXT_multi_draw_arrays
#define GL_EXT_multi_draw_arrays 1
#ifdef GL_GLEXT_PROTOTYPES
GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei);
GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
#endif

View File

@@ -1,7 +1,7 @@
#ifndef __gl2_h_
#define __gl2_h_
/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */
/* $Revision: 16803 $ on $Date:: 2012-02-02 09:49:18 -0800 #$ */
#include <GLES2/gl2platform.h>
@@ -527,7 +527,7 @@ GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
GL_APICALL GLenum GL_APIENTRY glGetError (void);
@@ -546,7 +546,7 @@ GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum p
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);

View File

@@ -1,7 +1,7 @@
#ifndef __gl2ext_h_
#define __gl2ext_h_
/* $Revision: 22161 $ on $Date:: 2013-06-25 08:17:27 -0700 #$ */
/* $Revision: 19436 $ on $Date:: 2012-10-10 10:37:04 -0700 #$ */
#ifdef __cplusplus
extern "C" {
@@ -16,20 +16,6 @@ extern "C" {
# define GL_APIENTRYP GL_APIENTRY*
#endif
/* New types shared by several extensions */
#ifndef __gl3_h_
/* These are defined with respect to <inttypes.h> in the
* Apple extension spec, but they are also used by non-APPLE
* extensions, and in the Khronos header we use the Khronos
* portable types in khrplatform.h, which must be defined.
*/
typedef khronos_int64_t GLint64;
typedef khronos_uint64_t GLuint64;
typedef struct __GLsync *GLsync;
#endif
/*------------------------------------------------------------------------*
* OES extension tokens
*------------------------------------------------------------------------*/
@@ -108,23 +94,23 @@ typedef void* GLeglImageOES;
#endif
/* GL_OES_required_internalformat */
#ifndef GL_OES_required_internalformat
#ifndef GL_OES_required_internalformat
#define GL_ALPHA8_OES 0x803C
#define GL_DEPTH_COMPONENT16_OES 0x81A5
/* reuse GL_DEPTH_COMPONENT24_OES */
/* reuse GL_DEPTH24_STENCIL8_OES */
/* reuse GL_DEPTH_COMPONENT32_OES */
/* reuse GL_DEPTH_COMPONENT24_OES */
/* reuse GL_DEPTH24_STENCIL8_OES */
/* reuse GL_DEPTH_COMPONENT32_OES */
#define GL_LUMINANCE4_ALPHA4_OES 0x8043
#define GL_LUMINANCE8_ALPHA8_OES 0x8045
#define GL_LUMINANCE8_OES 0x8040
#define GL_RGBA4_OES 0x8056
#define GL_RGB5_A1_OES 0x8057
#define GL_RGB565_OES 0x8D62
/* reuse GL_RGB8_OES */
/* reuse GL_RGBA8_OES */
/* reuse GL_RGB8_OES */
/* reuse GL_RGBA8_OES */
/* reuse GL_RGB10_EXT */
/* reuse GL_RGB10_A2_EXT */
#endif
#endif
/* GL_OES_rgb8_rgba8 */
#ifndef GL_OES_rgb8_rgba8
@@ -197,47 +183,47 @@ typedef void* GLeglImageOES;
*------------------------------------------------------------------------*/
#ifndef GL_KHR_debug
typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam);
#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244
#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245
#define GL_DEBUG_SOURCE_API_KHR 0x8246
#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249
#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A
#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
#define GL_DEBUG_TYPE_ERROR_KHR 0x824C
#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F
#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250
#define GL_DEBUG_TYPE_OTHER_KHR 0x8251
#define GL_DEBUG_TYPE_MARKER_KHR 0x8268
#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269
#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A
#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D
#define GL_BUFFER_KHR 0x82E0
#define GL_SHADER_KHR 0x82E1
#define GL_PROGRAM_KHR 0x82E2
#define GL_QUERY_KHR 0x82E3
/* PROGRAM_PIPELINE only in GL */
#define GL_SAMPLER_KHR 0x82E6
/* DISPLAY_LIST only in GL */
#define GL_MAX_LABEL_LENGTH_KHR 0x82E8
#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143
#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144
#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145
#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146
#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147
#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148
#define GL_DEBUG_OUTPUT_KHR 0x92E0
#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002
#define GL_STACK_OVERFLOW_KHR 0x0503
#define GL_STACK_UNDERFLOW_KHR 0x0504
typedef void (GL_APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
#define GL_DEBUG_SOURCE_API 0x8246
#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
#define GL_DEBUG_SOURCE_APPLICATION 0x824A
#define GL_DEBUG_SOURCE_OTHER 0x824B
#define GL_DEBUG_TYPE_ERROR 0x824C
#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
#define GL_DEBUG_TYPE_PORTABILITY 0x824F
#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
#define GL_DEBUG_TYPE_OTHER 0x8251
#define GL_DEBUG_TYPE_MARKER 0x8268
#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
#define GL_DEBUG_TYPE_POP_GROUP 0x826A
#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
#define GL_BUFFER 0x82E0
#define GL_SHADER 0x82E1
#define GL_PROGRAM 0x82E2
#define GL_QUERY 0x82E3
/* PROGRAM_PIPELINE only in GL */
#define GL_SAMPLER 0x82E6
/* DISPLAY_LIST only in GL */
#define GL_MAX_LABEL_LENGTH 0x82E8
#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
#define GL_DEBUG_LOGGED_MESSAGES 0x9145
#define GL_DEBUG_SEVERITY_HIGH 0x9146
#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
#define GL_DEBUG_SEVERITY_LOW 0x9148
#define GL_DEBUG_OUTPUT 0x92E0
#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
#define GL_STACK_OVERFLOW 0x0503
#define GL_STACK_UNDERFLOW 0x0504
#endif
#ifndef GL_KHR_texture_compression_astc_ldr
@@ -308,18 +294,6 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
* ANGLE extension tokens
*------------------------------------------------------------------------*/
/* GL_ANGLE_depth_texture */
#ifndef GL_ANGLE_depth_texture
#define GL_DEPTH_COMPONENT 0x1902
#define GL_DEPTH_STENCIL_OES 0x84F9
#define GL_UNSIGNED_SHORT 0x1403
#define GL_UNSIGNED_INT 0x1405
#define GL_UNSIGNED_INT_24_8_OES 0x84FA
#define GL_DEPTH_COMPONENT16 0x81A5
#define GL_DEPTH_COMPONENT32_OES 0x81A7
#define GL_DEPTH24_STENCIL8_OES 0x88F0
#endif
/* GL_ANGLE_framebuffer_blit */
#ifndef GL_ANGLE_framebuffer_blit
#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
@@ -336,38 +310,33 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
#endif
/* GL_ANGLE_instanced_arrays */
#ifndef GL_ANGLE_instanced_arrays
#ifndef GL_ANGLE_instanced_arrays
#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
#endif
/* GL_ANGLE_pack_reverse_row_order */
#ifndef GL_ANGLE_pack_reverse_row_order
#ifndef GL_ANGLE_pack_reverse_row_order
#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
#endif
/* GL_ANGLE_program_binary */
#ifndef GL_ANGLE_program_binary
#define GL_PROGRAM_BINARY_ANGLE 0x93A6
#endif
/* GL_ANGLE_texture_compression_dxt3 */
#ifndef GL_ANGLE_texture_compression_dxt3
#ifndef GL_ANGLE_texture_compression_dxt3
#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
#endif
/* GL_ANGLE_texture_compression_dxt5 */
#ifndef GL_ANGLE_texture_compression_dxt5
#ifndef GL_ANGLE_texture_compression_dxt5
#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
#endif
/* GL_ANGLE_texture_usage */
#ifndef GL_ANGLE_texture_usage
#ifndef GL_ANGLE_texture_usage
#define GL_TEXTURE_USAGE_ANGLE 0x93A2
#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
#endif
/* GL_ANGLE_translated_shader_source */
#ifndef GL_ANGLE_translated_shader_source
#ifndef GL_ANGLE_translated_shader_source
#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
#endif
@@ -377,7 +346,7 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
/* GL_APPLE_copy_texture_levels */
/* No new tokens introduced by this extension. */
/* GL_APPLE_framebuffer_multisample */
#ifndef GL_APPLE_framebuffer_multisample
#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
@@ -399,6 +368,19 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
/* GL_APPLE_sync */
#ifndef GL_APPLE_sync
#ifndef __gl3_h_
/* These types are defined with reference to <inttypes.h>
* in the Apple extension spec, but here we use the Khronos
* portable types in khrplatform.h, and assume those types
* are always defined.
* If any other extensions using these types are defined,
* the typedefs must move out of this block and be shared.
*/
typedef khronos_int64_t GLint64;
typedef khronos_uint64_t GLuint64;
typedef struct __GLsync *GLsync;
#endif
#define GL_SYNC_OBJECT_APPLE 0x8A53
#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111
#define GL_OBJECT_TYPE_APPLE 0x9112
@@ -484,54 +466,6 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
#define GL_STENCIL_EXT 0x1802
#endif
#ifndef GL_EXT_disjoint_timer_query
#define GL_QUERY_COUNTER_BITS_EXT 0x8864
#define GL_CURRENT_QUERY_EXT 0x8865
#define GL_QUERY_RESULT_EXT 0x8866
#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
#define GL_TIME_ELAPSED_EXT 0x88BF
#define GL_TIMESTAMP_EXT 0x8E28
#define GL_GPU_DISJOINT_EXT 0x8FBB
#endif
#ifndef GL_EXT_draw_buffers
#define GL_EXT_draw_buffers 1
#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
#define GL_MAX_DRAW_BUFFERS_EXT 0x8824
#define GL_DRAW_BUFFER0_EXT 0x8825
#define GL_DRAW_BUFFER1_EXT 0x8826
#define GL_DRAW_BUFFER2_EXT 0x8827
#define GL_DRAW_BUFFER3_EXT 0x8828
#define GL_DRAW_BUFFER4_EXT 0x8829
#define GL_DRAW_BUFFER5_EXT 0x882A
#define GL_DRAW_BUFFER6_EXT 0x882B
#define GL_DRAW_BUFFER7_EXT 0x882C
#define GL_DRAW_BUFFER8_EXT 0x882D
#define GL_DRAW_BUFFER9_EXT 0x882E
#define GL_DRAW_BUFFER10_EXT 0x882F
#define GL_DRAW_BUFFER11_EXT 0x8830
#define GL_DRAW_BUFFER12_EXT 0x8831
#define GL_DRAW_BUFFER13_EXT 0x8832
#define GL_DRAW_BUFFER14_EXT 0x8833
#define GL_DRAW_BUFFER15_EXT 0x8834
#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
#endif
/* GL_EXT_map_buffer_range */
#ifndef GL_EXT_map_buffer_range
#define GL_MAP_READ_BIT_EXT 0x0001
@@ -545,7 +479,7 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
/* GL_EXT_multisampled_render_to_texture */
#ifndef GL_EXT_multisampled_render_to_texture
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
#define GL_MAX_SAMPLES_EXT 0x8D57
@@ -653,10 +587,10 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
/* GL_EXT_texture_storage */
#ifndef GL_EXT_texture_storage
#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
#define GL_ALPHA8_EXT 0x803C
#define GL_ALPHA8_EXT 0x803C
#define GL_LUMINANCE8_EXT 0x8040
#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
#define GL_RGBA32F_EXT 0x8814
#define GL_RGBA32F_EXT 0x8814
#define GL_RGB32F_EXT 0x8815
#define GL_ALPHA32F_EXT 0x8816
#define GL_LUMINANCE32F_EXT 0x8818
@@ -666,12 +600,12 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
#define GL_ALPHA16F_EXT 0x881C
#define GL_LUMINANCE16F_EXT 0x881E
#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
#define GL_RGB10_A2_EXT 0x8059
#define GL_RGB10_A2_EXT 0x8059
#define GL_RGB10_EXT 0x8052
#define GL_BGRA8_EXT 0x93A1
#define GL_R8_EXT 0x8229
#define GL_RG8_EXT 0x822B
#define GL_R32F_EXT 0x822E
#define GL_R32F_EXT 0x822E
#define GL_RG32F_EXT 0x8230
#define GL_R16F_EXT 0x822D
#define GL_RG16F_EXT 0x822F
@@ -684,9 +618,9 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
/* GL_EXT_unpack_subimage */
#ifndef GL_EXT_unpack_subimage
#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2
#define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3
#define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4
#define GL_UNPACK_ROW_LENGTH 0x0CF2
#define GL_UNPACK_SKIP_ROWS 0x0CF3
#define GL_UNPACK_SKIP_PIXELS 0x0CF4
#endif
/*------------------------------------------------------------------------*
@@ -704,7 +638,7 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
/* GL_FJ_shader_binary_GCCSO */
#ifndef GL_FJ_shader_binary_GCCSO
#define GL_GCCSO_SHADER_BINARY_FJ 0x9260
#define GCCSO_SHADER_BINARY_FJ 0x9260
#endif
/*------------------------------------------------------------------------*
@@ -735,12 +669,6 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#endif
/* GL_IMG_texture_compression_pvrtc2 */
#ifndef GL_IMG_texture_compression_pvrtc2
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
#endif
/* GL_IMG_multisampled_render_to_texture */
#ifndef GL_IMG_multisampled_render_to_texture
#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
@@ -763,7 +691,7 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
#define GL_COVERAGE_BUFFER_BIT_NV 0x00008000
#define GL_COVERAGE_BUFFER_BIT_NV 0x8000
#endif
/* GL_NV_depth_nonlinear */
@@ -808,9 +736,6 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
#endif
/* GL_NV_draw_instanced */
/* No new tokens introduced by this extension. */
/* GL_NV_fbo_color_attachments */
#ifndef GL_NV_fbo_color_attachments
#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
@@ -824,29 +749,6 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
#define GL_FENCE_CONDITION_NV 0x84F4
#endif
/* GL_NV_framebuffer_blit */
#ifndef GL_NV_framebuffer_blit
#define GL_READ_FRAMEBUFFER_NV 0x8CA8
#define GL_DRAW_FRAMEBUFFER_NV 0x8CA9
#define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6
#define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA
#endif
/* GL_NV_framebuffer_multisample */
#ifndef GL_NV_framebuffer_multisample
#define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56
#define GL_MAX_SAMPLES_NV 0x8D57
#endif
/* GL_NV_generate_mipmap_sRGB */
/* No new tokens introduced by this extension. */
/* GL_NV_instanced_arrays */
#ifndef GL_NV_instanced_arrays
#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE
#endif
/* GL_NV_read_buffer */
#ifndef GL_NV_read_buffer
#define GL_READ_BUFFER_NV 0x0C02
@@ -864,36 +766,6 @@ typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,G
/* GL_NV_read_stencil */
/* No new tokens introduced by this extension. */
/* GL_NV_shadow_samplers_array */
#ifndef GL_NV_shadow_samplers_array
#define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4
#endif
/* GL_NV_shadow_samplers_cube */
#ifndef GL_NV_shadow_samplers_cube
#define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5
#endif
/* GL_NV_sRGB_formats */
#ifndef GL_NV_sRGB_formats
#define GL_SLUMINANCE_NV 0x8C46
#define GL_SLUMINANCE_ALPHA_NV 0x8C44
#define GL_SRGB8_NV 0x8C41
#define GL_SLUMINANCE8_NV 0x8C47
#define GL_SLUMINANCE8_ALPHA8_NV 0x8C45
#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
#define GL_ETC1_SRGB8_NV 0x88EE
#endif
/* GL_NV_texture_border_clamp */
#ifndef GL_NV_texture_border_clamp
#define GL_TEXTURE_BORDER_COLOR_NV 0x1004
#define GL_CLAMP_TO_BORDER_NV 0x812D
#endif
/* GL_NV_texture_compression_s3tc_update */
/* No new tokens introduced by this extension. */
@@ -1194,29 +1066,29 @@ typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
#ifndef GL_KHR_debug
#define GL_KHR_debug 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params);
#endif
typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params);
GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
GL_APICALL void GL_APIENTRY glPopDebugGroup (void);
GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
#endif
typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params);
#endif
#ifndef GL_KHR_texture_compression_astc_ldr
@@ -1276,11 +1148,6 @@ typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monito
* ANGLE extension functions
*------------------------------------------------------------------------*/
/* GL_ANGLE_depth_texture */
#ifndef GL_ANGLE_depth_texture
#define GL_ANGLE_depth_texture 1
#endif
/* GL_ANGLE_framebuffer_blit */
#ifndef GL_ANGLE_framebuffer_blit
#define GL_ANGLE_framebuffer_blit 1
@@ -1299,49 +1166,43 @@ GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
#endif
#ifndef GL_ANGLE_instanced_arrays
#define GL_ANGLE_instanced_arrays 1
#ifndef GL_ANGLE_instanced_arrays
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
#endif
typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
typedef void (GL_APIENTRYP PFLGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
typedef void (GL_APIENTRYP PFLGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
typedef void (GL_APIENTRYP PFLGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
#endif
/* GL_ANGLE_pack_reverse_row_order */
#ifndef GL_ANGLE_pack_reverse_row_order
#ifndef GL_ANGLE_pack_reverse_row_order
#define GL_ANGLE_pack_reverse_row_order 1
#endif
/* GL_ANGLE_program_binary */
#ifndef GL_ANGLE_program_binary
#define GL_ANGLE_program_binary 1
#endif
/* GL_ANGLE_texture_compression_dxt3 */
#ifndef GL_ANGLE_texture_compression_dxt3
#ifndef GL_ANGLE_texture_compression_dxt3
#define GL_ANGLE_texture_compression_dxt3 1
#endif
/* GL_ANGLE_texture_compression_dxt5 */
#ifndef GL_ANGLE_texture_compression_dxt5
#ifndef GL_ANGLE_texture_compression_dxt5
#define GL_ANGLE_texture_compression_dxt5 1
#endif
/* GL_ANGLE_texture_usage */
#ifndef GL_ANGLE_texture_usage
#ifndef GL_ANGLE_texture_usage
#define GL_ANGLE_texture_usage 1
#endif
#ifndef GL_ANGLE_translated_shader_source
#ifndef GL_ANGLE_translated_shader_source
#define GL_ANGLE_translated_shader_source 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
#endif
typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
typedef void (GL_APIENTRYP PFLGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
#endif
/*------------------------------------------------------------------------*
@@ -1470,42 +1331,6 @@ GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numA
typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
#endif
#ifndef GL_EXT_disjoint_timer_query
#define GL_EXT_disjoint_timer_query 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
#endif
typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
#endif /* GL_EXT_disjoint_timer_query */
#ifndef GL_EXT_draw_buffers
#define GL_EXT_draw_buffers 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
#endif
typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
#endif /* GL_EXT_draw_buffers */
/* GL_EXT_map_buffer_range */
#ifndef GL_EXT_map_buffer_range
#define GL_EXT_map_buffer_range 1
@@ -1544,10 +1369,10 @@ typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint ind
#ifndef GL_EXT_multi_draw_arrays
#define GL_EXT_multi_draw_arrays 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei);
GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
#endif
@@ -1770,11 +1595,6 @@ typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum
#define GL_IMG_texture_compression_pvrtc 1
#endif
/* GL_IMG_texture_compression_pvrtc2 */
#ifndef GL_IMG_texture_compression_pvrtc2
#define GL_IMG_texture_compression_pvrtc2 1
#endif
/* GL_IMG_multisampled_render_to_texture */
#ifndef GL_IMG_multisampled_render_to_texture
#define GL_IMG_multisampled_render_to_texture 1
@@ -1815,17 +1635,6 @@ GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
#endif
/* GL_NV_draw_instanced */
#ifndef GL_NV_draw_instanced
#define GL_NV_draw_instanced 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
#endif
typedef void (GL_APIENTRYP PFNDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
typedef void (GL_APIENTRYP PFNDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
#endif
/* GL_NV_fbo_color_attachments */
#ifndef GL_NV_fbo_color_attachments
#define GL_NV_fbo_color_attachments 1
@@ -1852,38 +1661,6 @@ typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
#endif
/* GL_NV_framebuffer_blit */
#ifndef GL_NV_framebuffer_blit
#define GL_NV_framebuffer_blit 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glBlitFramebufferNV (int srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
#endif
typedef void (GL_APIENTRYP PFNBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
#endif
/* GL_NV_framebuffer_multisample */
#ifndef GL_NV_framebuffer_multisample
#define GL_NV_framebuffer_multisample 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
#endif
typedef void (GL_APIENTRYP PFNRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
#endif
/* GL_NV_generate_mipmap_sRGB */
#ifndef GL_NV_generate_mipmap_sRGB
#define GL_NV_generate_mipmap_sRGB 1
#endif
/* GL_NV_instanced_arrays */
#ifndef GL_NV_instanced_arrays
#define GL_NV_instanced_arrays 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
#endif
typedef void (GL_APIENTRYP PFNVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
#endif
/* GL_NV_read_buffer */
#ifndef GL_NV_read_buffer
#define GL_NV_read_buffer 1
@@ -1913,26 +1690,6 @@ typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
#define GL_NV_read_stencil 1
#endif
/* GL_NV_shadow_samplers_array */
#ifndef GL_NV_shadow_samplers_array
#define GL_NV_shadow_samplers_array 1
#endif
/* GL_NV_shadow_samplers_cube */
#ifndef GL_NV_shadow_samplers_cube
#define GL_NV_shadow_samplers_cube 1
#endif
/* GL_NV_sRGB_formats */
#ifndef GL_NV_sRGB_formats
#define GL_NV_sRGB_formats 1
#endif
/* GL_NV_texture_border_clamp */
#ifndef GL_NV_texture_border_clamp
#define GL_NV_texture_border_clamp 1
#endif
/* GL_NV_texture_compression_s3tc_update */
#ifndef GL_NV_texture_compression_s3tc_update
#define GL_NV_texture_compression_s3tc_update 1

View File

@@ -2,7 +2,7 @@
#define __gl3_h_
/*
* gl3.h last updated on $Date: 2013-02-12 14:37:24 -0800 (Tue, 12 Feb 2013) $
* gl3.h last updated on $Date: 2012-10-03 07:52:40 -0700 (Wed, 03 Oct 2012) $
*/
#include <GLES3/gl3platform.h>
@@ -12,7 +12,7 @@ extern "C" {
#endif
/*
** Copyright (c) 2007-2013 The Khronos Group Inc.
** Copyright (c) 2007-2012 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
@@ -861,7 +861,7 @@ GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
GL_APICALL GLenum GL_APIENTRY glGetError (void);
@@ -880,7 +880,7 @@ GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);

View File

@@ -35,8 +35,7 @@
#define bool _Bool
/* For compilers that don't have the builtin _Bool type. */
#if (defined(_MSC_VER) && _MSC_VER < 1800) || \
(defined __GNUC__&& __STDC_VERSION__ < 199901L && __GNUC__ < 3)
#if defined(_MSC_VER) || (__STDC_VERSION__ < 199901L && __GNUC__ < 3)
typedef unsigned char _Bool;
#endif

View File

@@ -1,93 +1,93 @@
CHIPSET(0x29A2, i965, "Intel(R) 965G")
CHIPSET(0x2992, i965, "Intel(R) 965Q")
CHIPSET(0x2982, i965, "Intel(R) 965G")
CHIPSET(0x2972, i965, "Intel(R) 946GZ")
CHIPSET(0x2A02, i965, "Intel(R) 965GM")
CHIPSET(0x2A12, i965, "Intel(R) 965GME/GLE")
CHIPSET(0x2A42, g4x, "Mobile Intel® GM45 Express Chipset")
CHIPSET(0x2E02, g4x, "Intel(R) Integrated Graphics Device")
CHIPSET(0x2E12, g4x, "Intel(R) Q45/Q43")
CHIPSET(0x2E22, g4x, "Intel(R) G45/G43")
CHIPSET(0x2E32, g4x, "Intel(R) G41")
CHIPSET(0x2E42, g4x, "Intel(R) B43")
CHIPSET(0x2E92, g4x, "Intel(R) B43")
CHIPSET(0x0042, ilk, "Intel(R) Ironlake Desktop")
CHIPSET(0x0046, ilk, "Intel(R) Ironlake Mobile")
CHIPSET(0x0102, snb_gt1, "Intel(R) Sandybridge Desktop")
CHIPSET(0x0112, snb_gt2, "Intel(R) Sandybridge Desktop")
CHIPSET(0x0122, snb_gt2, "Intel(R) Sandybridge Desktop")
CHIPSET(0x0106, snb_gt1, "Intel(R) Sandybridge Mobile")
CHIPSET(0x0116, snb_gt2, "Intel(R) Sandybridge Mobile")
CHIPSET(0x0126, snb_gt2, "Intel(R) Sandybridge Mobile")
CHIPSET(0x010A, snb_gt1, "Intel(R) Sandybridge Server")
CHIPSET(0x0152, ivb_gt1, "Intel(R) Ivybridge Desktop")
CHIPSET(0x0162, ivb_gt2, "Intel(R) Ivybridge Desktop")
CHIPSET(0x0156, ivb_gt1, "Intel(R) Ivybridge Mobile")
CHIPSET(0x0166, ivb_gt2, "Intel(R) Ivybridge Mobile")
CHIPSET(0x015a, ivb_gt1, "Intel(R) Ivybridge Server")
CHIPSET(0x016a, ivb_gt2, "Intel(R) Ivybridge Server")
CHIPSET(0x0402, hsw_gt1, "Intel(R) Haswell Desktop")
CHIPSET(0x0412, hsw_gt2, "Intel(R) Haswell Desktop")
CHIPSET(0x0422, hsw_gt3, "Intel(R) Haswell Desktop")
CHIPSET(0x0406, hsw_gt1, "Intel(R) Haswell Mobile")
CHIPSET(0x0416, hsw_gt2, "Intel(R) Haswell Mobile")
CHIPSET(0x0426, hsw_gt3, "Intel(R) Haswell Mobile")
CHIPSET(0x040A, hsw_gt1, "Intel(R) Haswell Server")
CHIPSET(0x041A, hsw_gt2, "Intel(R) Haswell Server")
CHIPSET(0x042A, hsw_gt3, "Intel(R) Haswell Server")
CHIPSET(0x040B, hsw_gt1, "Intel(R) Haswell")
CHIPSET(0x041B, hsw_gt2, "Intel(R) Haswell")
CHIPSET(0x042B, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x040E, hsw_gt1, "Intel(R) Haswell")
CHIPSET(0x041E, hsw_gt2, "Intel(R) Haswell")
CHIPSET(0x042E, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x0C02, hsw_gt1, "Intel(R) Haswell Desktop")
CHIPSET(0x0C12, hsw_gt2, "Intel(R) Haswell Desktop")
CHIPSET(0x0C22, hsw_gt3, "Intel(R) Haswell Desktop")
CHIPSET(0x0C06, hsw_gt1, "Intel(R) Haswell Mobile")
CHIPSET(0x0C16, hsw_gt2, "Intel(R) Haswell Mobile")
CHIPSET(0x0C26, hsw_gt3, "Intel(R) Haswell Mobile")
CHIPSET(0x0C0A, hsw_gt1, "Intel(R) Haswell Server")
CHIPSET(0x0C1A, hsw_gt2, "Intel(R) Haswell Server")
CHIPSET(0x0C2A, hsw_gt3, "Intel(R) Haswell Server")
CHIPSET(0x0C0B, hsw_gt1, "Intel(R) Haswell")
CHIPSET(0x0C1B, hsw_gt2, "Intel(R) Haswell")
CHIPSET(0x0C2B, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x0C0E, hsw_gt1, "Intel(R) Haswell")
CHIPSET(0x0C1E, hsw_gt2, "Intel(R) Haswell")
CHIPSET(0x0C2E, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x0A02, hsw_gt1, "Intel(R) Haswell Desktop")
CHIPSET(0x0A12, hsw_gt2, "Intel(R) Haswell Desktop")
CHIPSET(0x0A22, hsw_gt3, "Intel(R) Haswell Desktop")
CHIPSET(0x0A06, hsw_gt1, "Intel(R) Haswell Mobile")
CHIPSET(0x0A16, hsw_gt2, "Intel(R) Haswell Mobile")
CHIPSET(0x0A26, hsw_gt3, "Intel(R) Haswell Mobile")
CHIPSET(0x0A0A, hsw_gt1, "Intel(R) Haswell Server")
CHIPSET(0x0A1A, hsw_gt2, "Intel(R) Haswell Server")
CHIPSET(0x0A2A, hsw_gt3, "Intel(R) Haswell Server")
CHIPSET(0x0A0B, hsw_gt1, "Intel(R) Haswell")
CHIPSET(0x0A1B, hsw_gt2, "Intel(R) Haswell")
CHIPSET(0x0A2B, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x0A0E, hsw_gt1, "Intel(R) Haswell")
CHIPSET(0x0A1E, hsw_gt2, "Intel(R) Haswell")
CHIPSET(0x0A2E, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x0D02, hsw_gt1, "Intel(R) Haswell Desktop")
CHIPSET(0x0D12, hsw_gt2, "Intel(R) Haswell Desktop")
CHIPSET(0x0D22, hsw_gt3, "Intel(R) Haswell Desktop")
CHIPSET(0x0D06, hsw_gt1, "Intel(R) Haswell Mobile")
CHIPSET(0x0D16, hsw_gt2, "Intel(R) Haswell Mobile")
CHIPSET(0x0D26, hsw_gt3, "Intel(R) Haswell Mobile")
CHIPSET(0x0D0A, hsw_gt1, "Intel(R) Haswell Server")
CHIPSET(0x0D1A, hsw_gt2, "Intel(R) Haswell Server")
CHIPSET(0x0D2A, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x0D0B, hsw_gt1, "Intel(R) Haswell")
CHIPSET(0x0D1B, hsw_gt2, "Intel(R) Haswell")
CHIPSET(0x0D2B, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x0D0E, hsw_gt1, "Intel(R) Haswell")
CHIPSET(0x0D1E, hsw_gt2, "Intel(R) Haswell")
CHIPSET(0x0D2E, hsw_gt3, "Intel(R) Haswell")
CHIPSET(0x0F31, byt, "Intel(R) Bay Trail")
CHIPSET(0x0F32, byt, "Intel(R) Bay Trail")
CHIPSET(0x0F33, byt, "Intel(R) Bay Trail")
CHIPSET(0x0157, byt, "Intel(R) Bay Trail")
CHIPSET(0x0155, byt, "Intel(R) Bay Trail")
CHIPSET(0x29A2, I965_G, "Intel(R) 965G")
CHIPSET(0x2992, I965_Q, "Intel(R) 965Q")
CHIPSET(0x2982, I965_G_1, "Intel(R) 965G")
CHIPSET(0x2972, I946_GZ, "Intel(R) 946GZ")
CHIPSET(0x2A02, I965_GM, "Intel(R) 965GM")
CHIPSET(0x2A12, I965_GME, "Intel(R) 965GME/GLE")
CHIPSET(0x2A42, GM45_GM, "Mobile Intel® GM45 Express Chipset")
CHIPSET(0x2E02, IGD_E_G, "Intel(R) Integrated Graphics Device")
CHIPSET(0x2E12, Q45_G, "Intel(R) Q45/Q43")
CHIPSET(0x2E22, G45_G, "Intel(R) G45/G43")
CHIPSET(0x2E32, G41_G, "Intel(R) G41")
CHIPSET(0x2E42, B43_G, "Intel(R) B43")
CHIPSET(0x2E92, B43_G1, "Intel(R) B43")
CHIPSET(0x0042, ILD_G, "Intel(R) Ironlake Desktop")
CHIPSET(0x0046, ILM_G, "Intel(R) Ironlake Mobile")
CHIPSET(0x0102, SANDYBRIDGE_GT1, "Intel(R) Sandybridge Desktop")
CHIPSET(0x0112, SANDYBRIDGE_GT2, "Intel(R) Sandybridge Desktop")
CHIPSET(0x0122, SANDYBRIDGE_GT2_PLUS, "Intel(R) Sandybridge Desktop")
CHIPSET(0x0106, SANDYBRIDGE_M_GT1, "Intel(R) Sandybridge Mobile")
CHIPSET(0x0116, SANDYBRIDGE_M_GT2, "Intel(R) Sandybridge Mobile")
CHIPSET(0x0126, SANDYBRIDGE_M_GT2_PLUS, "Intel(R) Sandybridge Mobile")
CHIPSET(0x010A, SANDYBRIDGE_S, "Intel(R) Sandybridge Server")
CHIPSET(0x0152, IVYBRIDGE_GT1, "Intel(R) Ivybridge Desktop")
CHIPSET(0x0162, IVYBRIDGE_GT2, "Intel(R) Ivybridge Desktop")
CHIPSET(0x0156, IVYBRIDGE_M_GT1, "Intel(R) Ivybridge Mobile")
CHIPSET(0x0166, IVYBRIDGE_M_GT2, "Intel(R) Ivybridge Mobile")
CHIPSET(0x015a, IVYBRIDGE_S_GT1, "Intel(R) Ivybridge Server")
CHIPSET(0x016a, IVYBRIDGE_S_GT2, "Intel(R) Ivybridge Server")
CHIPSET(0x0402, HASWELL_GT1, "Intel(R) Haswell Desktop")
CHIPSET(0x0412, HASWELL_GT2, "Intel(R) Haswell Desktop")
CHIPSET(0x0422, HASWELL_GT3, "Intel(R) Haswell Desktop")
CHIPSET(0x0406, HASWELL_M_GT1, "Intel(R) Haswell Mobile")
CHIPSET(0x0416, HASWELL_M_GT2, "Intel(R) Haswell Mobile")
CHIPSET(0x0426, HASWELL_M_GT3, "Intel(R) Haswell Mobile")
CHIPSET(0x040A, HASWELL_S_GT1, "Intel(R) Haswell Server")
CHIPSET(0x041A, HASWELL_S_GT2, "Intel(R) Haswell Server")
CHIPSET(0x042A, HASWELL_S_GT3, "Intel(R) Haswell Server")
CHIPSET(0x040B, HASWELL_B_GT1, "Intel(R) Haswell")
CHIPSET(0x041B, HASWELL_B_GT2, "Intel(R) Haswell")
CHIPSET(0x042B, HASWELL_B_GT3, "Intel(R) Haswell")
CHIPSET(0x040E, HASWELL_E_GT1, "Intel(R) Haswell")
CHIPSET(0x041E, HASWELL_E_GT2, "Intel(R) Haswell")
CHIPSET(0x042E, HASWELL_E_GT3, "Intel(R) Haswell")
CHIPSET(0x0C02, HASWELL_SDV_GT1, "Intel(R) Haswell Desktop")
CHIPSET(0x0C12, HASWELL_SDV_GT2, "Intel(R) Haswell Desktop")
CHIPSET(0x0C22, HASWELL_SDV_GT3, "Intel(R) Haswell Desktop")
CHIPSET(0x0C06, HASWELL_SDV_M_GT1, "Intel(R) Haswell Mobile")
CHIPSET(0x0C16, HASWELL_SDV_M_GT2, "Intel(R) Haswell Mobile")
CHIPSET(0x0C26, HASWELL_SDV_M_GT3, "Intel(R) Haswell Mobile")
CHIPSET(0x0C0A, HASWELL_SDV_S_GT1, "Intel(R) Haswell Server")
CHIPSET(0x0C1A, HASWELL_SDV_S_GT2, "Intel(R) Haswell Server")
CHIPSET(0x0C2A, HASWELL_SDV_S_GT3, "Intel(R) Haswell Server")
CHIPSET(0x0C0B, HASWELL_SDV_B_GT1, "Intel(R) Haswell")
CHIPSET(0x0C1B, HASWELL_SDV_B_GT2, "Intel(R) Haswell")
CHIPSET(0x0C2B, HASWELL_SDV_B_GT3, "Intel(R) Haswell")
CHIPSET(0x0C0E, HASWELL_SDV_E_GT1, "Intel(R) Haswell")
CHIPSET(0x0C1E, HASWELL_SDV_E_GT2, "Intel(R) Haswell")
CHIPSET(0x0C2E, HASWELL_SDV_E_GT3, "Intel(R) Haswell")
CHIPSET(0x0A02, HASWELL_ULT_GT1, "Intel(R) Haswell Desktop")
CHIPSET(0x0A12, HASWELL_ULT_GT2, "Intel(R) Haswell Desktop")
CHIPSET(0x0A22, HASWELL_ULT_GT3, "Intel(R) Haswell Desktop")
CHIPSET(0x0A06, HASWELL_ULT_M_GT1, "Intel(R) Haswell Mobile")
CHIPSET(0x0A16, HASWELL_ULT_M_GT2, "Intel(R) Haswell Mobile")
CHIPSET(0x0A26, HASWELL_ULT_M_GT3, "Intel(R) Haswell Mobile")
CHIPSET(0x0A0A, HASWELL_ULT_S_GT1, "Intel(R) Haswell Server")
CHIPSET(0x0A1A, HASWELL_ULT_S_GT2, "Intel(R) Haswell Server")
CHIPSET(0x0A2A, HASWELL_ULT_S_GT3, "Intel(R) Haswell Server")
CHIPSET(0x0A0B, HASWELL_ULT_B_GT1, "Intel(R) Haswell")
CHIPSET(0x0A1B, HASWELL_ULT_B_GT2, "Intel(R) Haswell")
CHIPSET(0x0A2B, HASWELL_ULT_B_GT3, "Intel(R) Haswell")
CHIPSET(0x0A0E, HASWELL_ULT_E_GT1, "Intel(R) Haswell")
CHIPSET(0x0A1E, HASWELL_ULT_E_GT2, "Intel(R) Haswell")
CHIPSET(0x0A2E, HASWELL_ULT_E_GT3, "Intel(R) Haswell")
CHIPSET(0x0D02, HASWELL_CRW_GT1, "Intel(R) Haswell Desktop")
CHIPSET(0x0D12, HASWELL_CRW_GT2, "Intel(R) Haswell Desktop")
CHIPSET(0x0D22, HASWELL_CRW_GT3, "Intel(R) Haswell Desktop")
CHIPSET(0x0D06, HASWELL_CRW_M_GT1, "Intel(R) Haswell Mobile")
CHIPSET(0x0D16, HASWELL_CRW_M_GT2, "Intel(R) Haswell Mobile")
CHIPSET(0x0D26, HASWELL_CRW_M_GT3, "Intel(R) Haswell Mobile")
CHIPSET(0x0D0A, HASWELL_CRW_S_GT1, "Intel(R) Haswell Server")
CHIPSET(0x0D1A, HASWELL_CRW_S_GT2, "Intel(R) Haswell Server")
CHIPSET(0x0D2A, HASWELL_CRW_S_GT3, "Intel(R) Haswell")
CHIPSET(0x0D0B, HASWELL_CRW_B_GT1, "Intel(R) Haswell")
CHIPSET(0x0D1B, HASWELL_CRW_B_GT2, "Intel(R) Haswell")
CHIPSET(0x0D2B, HASWELL_CRW_B_GT3, "Intel(R) Haswell")
CHIPSET(0x0D0E, HASWELL_CRW_E_GT1, "Intel(R) Haswell")
CHIPSET(0x0D1E, HASWELL_CRW_E_GT2, "Intel(R) Haswell")
CHIPSET(0x0D2E, HASWELL_CRW_E_GT3, "Intel(R) Haswell")
CHIPSET(0x0F31, BAYTRAIL_M_1, "Intel(R) Bay Trail")
CHIPSET(0x0F32, BAYTRAIL_M_2, "Intel(R) Bay Trail")
CHIPSET(0x0F33, BAYTRAIL_M_3, "Intel(R) Bay Trail")
CHIPSET(0x0157, BAYTRAIL_M_4, "Intel(R) Bay Trail")
CHIPSET(0x0155, BAYTRAIL_D, "Intel(R) Bay Trail")

View File

@@ -14,7 +14,7 @@ static const int i915_chip_ids[] = {
};
static const int i965_chip_ids[] = {
#define CHIPSET(chip, family, name) chip,
#define CHIPSET(chip, desc, name) chip,
#include "pci_ids/i965_pci_ids.h"
#undef CHIPSET
};

View File

@@ -70,51 +70,3 @@ CHIPSET(0x6664, HAINAN_6664, HAINAN)
CHIPSET(0x6665, HAINAN_6665, HAINAN)
CHIPSET(0x6667, HAINAN_6667, HAINAN)
CHIPSET(0x666F, HAINAN_666F, HAINAN)
CHIPSET(0x6640, BONAIRE_6640, BONAIRE)
CHIPSET(0x6641, BONAIRE_6641, BONAIRE)
CHIPSET(0x6649, BONAIRE_6649, BONAIRE)
CHIPSET(0x6650, BONAIRE_6650, BONAIRE)
CHIPSET(0x6651, BONAIRE_6651, BONAIRE)
CHIPSET(0x6658, BONAIRE_6658, BONAIRE)
CHIPSET(0x665C, BONAIRE_665C, BONAIRE)
CHIPSET(0x665D, BONAIRE_665D, BONAIRE)
CHIPSET(0x9830, KABINI_9830, KABINI)
CHIPSET(0x9831, KABINI_9831, KABINI)
CHIPSET(0x9832, KABINI_9832, KABINI)
CHIPSET(0x9833, KABINI_9833, KABINI)
CHIPSET(0x9834, KABINI_9834, KABINI)
CHIPSET(0x9835, KABINI_9835, KABINI)
CHIPSET(0x9836, KABINI_9836, KABINI)
CHIPSET(0x9837, KABINI_9837, KABINI)
CHIPSET(0x9838, KABINI_9838, KABINI)
CHIPSET(0x9839, KABINI_9839, KABINI)
CHIPSET(0x983A, KABINI_983A, KABINI)
CHIPSET(0x983B, KABINI_983B, KABINI)
CHIPSET(0x983C, KABINI_983C, KABINI)
CHIPSET(0x983D, KABINI_983D, KABINI)
CHIPSET(0x983E, KABINI_983E, KABINI)
CHIPSET(0x983F, KABINI_983F, KABINI)
CHIPSET(0x1304, KAVERI_1304, KAVERI)
CHIPSET(0x1305, KAVERI_1305, KAVERI)
CHIPSET(0x1306, KAVERI_1306, KAVERI)
CHIPSET(0x1307, KAVERI_1307, KAVERI)
CHIPSET(0x1309, KAVERI_1309, KAVERI)
CHIPSET(0x130A, KAVERI_130A, KAVERI)
CHIPSET(0x130B, KAVERI_130B, KAVERI)
CHIPSET(0x130C, KAVERI_130C, KAVERI)
CHIPSET(0x130D, KAVERI_130D, KAVERI)
CHIPSET(0x130E, KAVERI_130E, KAVERI)
CHIPSET(0x130F, KAVERI_130F, KAVERI)
CHIPSET(0x1310, KAVERI_1310, KAVERI)
CHIPSET(0x1311, KAVERI_1311, KAVERI)
CHIPSET(0x1312, KAVERI_1312, KAVERI)
CHIPSET(0x1313, KAVERI_1313, KAVERI)
CHIPSET(0x1315, KAVERI_1315, KAVERI)
CHIPSET(0x1316, KAVERI_1316, KAVERI)
CHIPSET(0x1317, KAVERI_1317, KAVERI)
CHIPSET(0x131B, KAVERI_131B, KAVERI)
CHIPSET(0x131C, KAVERI_131C, KAVERI)
CHIPSET(0x131D, KAVERI_131D, KAVERI)

125
m4/ax_prog_cc_for_build.m4 Normal file
View File

@@ -0,0 +1,125 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PROG_CC_FOR_BUILD
#
# DESCRIPTION
#
# This macro searches for a C compiler that generates native executables,
# that is a C compiler that surely is not a cross-compiler. This can be
# useful if you have to generate source code at compile-time like for
# example GCC does.
#
# The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
# needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
# The value of these variables can be overridden by the user by specifying
# a compiler with an environment variable (like you do for standard CC).
#
# It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object
# file extensions for the build platform, and GCC_FOR_BUILD to `yes' if
# the compiler we found is GCC. All these variables but GCC_FOR_BUILD are
# substituted in the Makefile.
#
# LICENSE
#
# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 5
AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
AC_REQUIRE([AC_EXEEXT])dnl
AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
dnl Use the standard macros, but make them use other variable names
dnl
pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
pushdef([ac_cv_objext], ac_cv_build_objext)dnl
pushdef([ac_exeext], ac_build_exeext)dnl
pushdef([ac_objext], ac_build_objext)dnl
pushdef([CC], CC_FOR_BUILD)dnl
pushdef([CPP], CPP_FOR_BUILD)dnl
pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
pushdef([host], build)dnl
pushdef([host_alias], build_alias)dnl
pushdef([host_cpu], build_cpu)dnl
pushdef([host_vendor], build_vendor)dnl
pushdef([host_os], build_os)dnl
pushdef([ac_cv_host], ac_cv_build)dnl
pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
pushdef([ac_cv_host_os], ac_cv_build_os)dnl
pushdef([ac_cpp], ac_build_cpp)dnl
pushdef([ac_compile], ac_build_compile)dnl
pushdef([ac_link], ac_build_link)dnl
save_cross_compiling=$cross_compiling
save_ac_tool_prefix=$ac_tool_prefix
cross_compiling=no
ac_tool_prefix=
AC_PROG_CC
AC_PROG_CPP
AC_EXEEXT
ac_tool_prefix=$save_ac_tool_prefix
cross_compiling=$save_cross_compiling
dnl Restore the old definitions
dnl
popdef([ac_link])dnl
popdef([ac_compile])dnl
popdef([ac_cpp])dnl
popdef([ac_cv_host_os])dnl
popdef([ac_cv_host_vendor])dnl
popdef([ac_cv_host_cpu])dnl
popdef([ac_cv_host_alias])dnl
popdef([ac_cv_host])dnl
popdef([host_os])dnl
popdef([host_vendor])dnl
popdef([host_cpu])dnl
popdef([host_alias])dnl
popdef([host])dnl
popdef([LDFLAGS])dnl
popdef([CPPFLAGS])dnl
popdef([CFLAGS])dnl
popdef([CPP])dnl
popdef([CC])dnl
popdef([ac_objext])dnl
popdef([ac_exeext])dnl
popdef([ac_cv_objext])dnl
popdef([ac_cv_exeext])dnl
popdef([ac_cv_prog_cc_g])dnl
popdef([ac_cv_prog_cc_cross])dnl
popdef([ac_cv_prog_cc_works])dnl
popdef([ac_cv_prog_gcc])dnl
popdef([ac_cv_prog_CPP])dnl
dnl Finally, set Makefile variables
dnl
BUILD_EXEEXT=$ac_build_exeext
BUILD_OBJEXT=$ac_build_objext
AC_SUBST(BUILD_EXEEXT)dnl
AC_SUBST(BUILD_OBJEXT)dnl
AC_SUBST([CFLAGS_FOR_BUILD])dnl
AC_SUBST([CPPFLAGS_FOR_BUILD])dnl
AC_SUBST([LDFLAGS_FOR_BUILD])dnl
])

109
m4/ax_prog_cxx_for_build.m4 Normal file
View File

@@ -0,0 +1,109 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prog_cxx_for_build.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PROG_CXX_FOR_BUILD
#
# DESCRIPTION
#
# This macro searches for a C++ compiler that generates native executables,
# that is a C++ compiler that surely is not a cross-compiler. This can be
# useful if you have to generate source code at compile-time like for
# example GCC does.
#
# The macro sets the CXX_FOR_BUILD and CXXCPP_FOR_BUILD macros to anything
# needed to compile or link (CXX_FOR_BUILD) and preprocess (CXXCPP_FOR_BUILD).
# The value of these variables can be overridden by the user by specifying
# a compiler with an environment variable (like you do for standard CXX).
#
# LICENSE
#
# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
# Copyright (c) 2012 Avionic Design GmbH
#
# Based on the AX_PROG_CC_FOR_BUILD macro by Paolo Bonzini.
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 5
AU_ALIAS([AC_PROG_CXX_FOR_BUILD], [AX_PROG_CXX_FOR_BUILD])
AC_DEFUN([AX_PROG_CXX_FOR_BUILD], [dnl
AC_REQUIRE([AX_PROG_CC_FOR_BUILD])dnl
AC_REQUIRE([AC_PROG_CXX])dnl
AC_REQUIRE([AC_PROG_CXXCPP])dnl
AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
dnl Use the standard macros, but make them use other variable names
dnl
pushdef([ac_cv_prog_CXXCPP], ac_cv_build_prog_CXXCPP)dnl
pushdef([ac_cv_prog_gxx], ac_cv_build_prog_gxx)dnl
pushdef([ac_cv_prog_cxx_works], ac_cv_build_prog_cxx_works)dnl
pushdef([ac_cv_prog_cxx_cross], ac_cv_build_prog_cxx_cross)dnl
pushdef([ac_cv_prog_cxx_g], ac_cv_build_prog_cxx_g)dnl
pushdef([CXX], CXX_FOR_BUILD)dnl
pushdef([CXXCPP], CXXCPP_FOR_BUILD)dnl
pushdef([CXXFLAGS], CXXFLAGS_FOR_BUILD)dnl
pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
pushdef([CXXCPPFLAGS], CXXCPPFLAGS_FOR_BUILD)dnl
pushdef([host], build)dnl
pushdef([host_alias], build_alias)dnl
pushdef([host_cpu], build_cpu)dnl
pushdef([host_vendor], build_vendor)dnl
pushdef([host_os], build_os)dnl
pushdef([ac_cv_host], ac_cv_build)dnl
pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
pushdef([ac_cv_host_os], ac_cv_build_os)dnl
pushdef([ac_cxxcpp], ac_build_cxxcpp)dnl
pushdef([ac_compile], ac_build_compile)dnl
pushdef([ac_link], ac_build_link)dnl
save_cross_compiling=$cross_compiling
save_ac_tool_prefix=$ac_tool_prefix
cross_compiling=no
ac_tool_prefix=
AC_PROG_CXX
AC_PROG_CXXCPP
ac_tool_prefix=$save_ac_tool_prefix
cross_compiling=$save_cross_compiling
dnl Restore the old definitions
dnl
popdef([ac_link])dnl
popdef([ac_compile])dnl
popdef([ac_cxxcpp])dnl
popdef([ac_cv_host_os])dnl
popdef([ac_cv_host_vendor])dnl
popdef([ac_cv_host_cpu])dnl
popdef([ac_cv_host_alias])dnl
popdef([ac_cv_host])dnl
popdef([host_os])dnl
popdef([host_vendor])dnl
popdef([host_cpu])dnl
popdef([host_alias])dnl
popdef([host])dnl
popdef([CXXCPPFLAGS])dnl
popdef([CPPFLAGS])dnl
popdef([CXXFLAGS])dnl
popdef([CXXCPP])dnl
popdef([CXX])dnl
popdef([ac_cv_prog_cxx_g])dnl
popdef([ac_cv_prog_cxx_cross])dnl
popdef([ac_cv_prog_cxx_works])dnl
popdef([ac_cv_prog_gxx])dnl
popdef([ac_cv_prog_CXXCPP])dnl
dnl Finally, set Makefile variables
dnl
AC_SUBST([CXXFLAGS_FOR_BUILD])dnl
AC_SUBST([CXXCPPFLAGS_FOR_BUILD])dnl
])

View File

@@ -53,7 +53,7 @@ AC_DEFUN([AX_PROG_FLEX], [
AC_REQUIRE([AC_PROG_EGREP])
AC_CACHE_CHECK([if flex is the lexer generator],[ax_cv_prog_flex],[
AS_IF([$LEX --version 2>/dev/null | $EGREP -q '^\<flex\>'],
AS_IF([$LEX --version 2>/dev/null | $EGREP -q '^flex '],
[ax_cv_prog_flex=yes], [ax_cv_prog_flex=no])
])
AS_IF([test "$ax_cv_prog_flex" = "yes"],

View File

@@ -295,6 +295,8 @@ def generate(env):
cppdefines += ['_DEBUG']
if platform == 'windows':
cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER']
if platform == 'haiku':
cppdefines += ['BEOS_THREADS']
if env['embedded']:
cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED']
if env['texture_float']:
@@ -504,8 +506,6 @@ def generate(env):
libs += ['m', 'pthread', 'dl']
if env['platform'] in ('linux',):
libs += ['rt']
if env['platform'] in ('haiku'):
libs += ['root', 'be', 'network', 'translation']
env.Append(LIBS = libs)
# OpenMP

View File

@@ -190,16 +190,14 @@ def generate(env):
pass
env.MergeFlags(cppflags)
# Match llvm --fno-rtti flag
cxxflags = env.backtick('llvm-config --cxxflags').split()
if '-fno-rtti' in cxxflags:
env.Append(CXXFLAGS = ['-fno-rtti'])
components = ['engine', 'bitwriter', 'x86asmprinter']
if llvm_version >= distutils.version.LooseVersion('3.1'):
components.append('mcjit')
if llvm_version >= distutils.version.LooseVersion('3.2'):
env.Append(CXXFLAGS = ('-fno-rtti',))
env.ParseConfig('llvm-config --libs ' + ' '.join(components))
env.ParseConfig('llvm-config --ldflags')
except OSError:

View File

@@ -29,10 +29,6 @@ if HAVE_DRI_GLX
SUBDIRS += glx
endif
if HAVE_EGL_PLATFORM_WAYLAND
SUBDIRS += egl/wayland
endif
if HAVE_GBM
SUBDIRS += gbm
endif

View File

@@ -21,4 +21,8 @@
SUBDIRS=
if HAVE_EGL_PLATFORM_WAYLAND
SUBDIRS += wayland
endif
SUBDIRS += drivers main

View File

@@ -28,7 +28,6 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/egl/wayland/wayland-drm \
-I$(top_builddir)/src/egl/wayland/wayland-drm \
$(DEFINES) \
$(VISIBILITY_CFLAGS) \
$(LIBDRM_CFLAGS) \
$(LIBUDEV_CFLAGS) \
$(LIBKMS_CFLAGS) \

View File

@@ -34,7 +34,6 @@
#include <errno.h>
#include <unistd.h>
#include <xf86drm.h>
#include <drm_fourcc.h>
#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
#include <sys/types.h>
@@ -42,10 +41,6 @@
#include "egl_dri2.h"
#ifdef HAVE_WAYLAND_PLATFORM
#include "wayland-drm.h"
#endif
const __DRIuseInvalidateExtension use_invalidate = {
{ __DRI_USE_INVALIDATE, 1 }
};
@@ -80,7 +75,7 @@ EGLint dri2_to_egl_attribute_map[] = {
0, /* __DRI_ATTRIB_TRANSPARENT_GREEN_VALUE */
0, /* __DRI_ATTRIB_TRANSPARENT_BLUE_VALUE */
0, /* __DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE */
0, /* __DRI_ATTRIB_FLOAT_MODE (deprecated) */
0, /* __DRI_ATTRIB_FLOAT_MODE */
0, /* __DRI_ATTRIB_RED_MASK */
0, /* __DRI_ATTRIB_GREEN_MASK */
0, /* __DRI_ATTRIB_BLUE_MASK */
@@ -116,7 +111,7 @@ dri2_match_config(const _EGLConfig *conf, const _EGLConfig *criteria)
struct dri2_egl_config *
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
EGLint surface_type, const EGLint *attr_list,
int depth, EGLint surface_type, const EGLint *attr_list,
const unsigned int *rgba_masks)
{
struct dri2_egl_config *conf;
@@ -146,7 +141,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
else if (value & __DRI_ATTRIB_LUMINANCE_BIT)
value = EGL_LUMINANCE_BUFFER;
else
return NULL;
/* not valid */;
_eglSetConfigKey(&base, EGL_COLOR_BUFFER_TYPE, value);
break;
@@ -200,6 +195,16 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
for (i = 0; attr_list[i] != EGL_NONE; i += 2)
_eglSetConfigKey(&base, attr_list[i], attr_list[i+1]);
/* Allow a 24-bit RGB visual to match a 32-bit RGBA EGLConfig. Otherwise
* it will only match a 32-bit RGBA visual. On a composited window manager
* on X11, this will make all of the EGLConfigs with destination alpha get
* blended by the compositor. This is probably not what the application
* wants... especially on drivers that only have 32-bit RGBA EGLConfigs!
*/
if (depth > 0 && depth != base.BufferSize
&& !(depth == 24 && base.BufferSize == 32))
return NULL;
if (rgba_masks && memcmp(rgba_masks, dri_masks, sizeof(dri_masks)))
return NULL;
@@ -367,10 +372,8 @@ static const __DRIextension **
dri2_open_driver(_EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = disp->DriverData;
const __DRIextension **extensions = NULL;
const __DRIextension **extensions;
char path[PATH_MAX], *search_paths, *p, *next, *end;
char *get_extensions_name;
const __DRIextension **(*get_extensions)(void);
search_paths = NULL;
if (geteuid() == getuid()) {
@@ -411,21 +414,7 @@ dri2_open_driver(_EGLDisplay *disp)
}
_eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
if (asprintf(&get_extensions_name, "%s_%s",
__DRI_DRIVER_GET_EXTENSIONS, dri2_dpy->driver_name) != -1) {
get_extensions = dlsym(dri2_dpy->driver, get_extensions_name);
if (get_extensions) {
extensions = get_extensions();
} else {
_eglLog(_EGL_DEBUG, "driver does not expose %s(): %s\n",
get_extensions_name, dlerror());
}
free(get_extensions_name);
}
if (!extensions)
extensions = dlsym(dri2_dpy->driver, __DRI_DRIVER_EXTENSIONS);
extensions = dlsym(dri2_dpy->driver, __DRI_DRIVER_EXTENSIONS);
if (extensions == NULL) {
_eglLog(_EGL_WARNING,
"DRI2: driver exports no extensions (%s)", dlerror());
@@ -449,7 +438,6 @@ dri2_load_driver(_EGLDisplay *disp)
dlclose(dri2_dpy->driver);
return EGL_FALSE;
}
dri2_dpy->driver_extensions = extensions;
return EGL_TRUE;
}
@@ -470,7 +458,6 @@ dri2_load_driver_swrast(_EGLDisplay *disp)
dlclose(dri2_dpy->driver);
return EGL_FALSE;
}
dri2_dpy->driver_extensions = extensions;
return EGL_TRUE;
}
@@ -520,10 +507,6 @@ dri2_setup_screen(_EGLDisplay *disp)
disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
disp->Extensions.KHR_gl_texture_cubemap_image = EGL_TRUE;
}
if (dri2_dpy->image->base.version >= 8 &&
dri2_dpy->image->createImageFromDmaBufs) {
disp->Extensions.EXT_image_dma_buf_import = EGL_TRUE;
}
}
}
@@ -536,30 +519,14 @@ dri2_create_screen(_EGLDisplay *disp)
dri2_dpy = disp->DriverData;
if (dri2_dpy->dri2) {
if (dri2_dpy->dri2->base.version >= 4) {
dri2_dpy->dri_screen =
dri2_dpy->dri2->createNewScreen2(0, dri2_dpy->fd,
dri2_dpy->extensions,
dri2_dpy->driver_extensions,
&dri2_dpy->driver_configs, disp);
} else {
dri2_dpy->dri_screen =
dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd,
dri2_dpy->extensions,
&dri2_dpy->driver_configs, disp);
}
dri2_dpy->dri_screen =
dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd, dri2_dpy->extensions,
&dri2_dpy->driver_configs, disp);
} else {
assert(dri2_dpy->swrast);
if (dri2_dpy->swrast->base.version >= 4) {
dri2_dpy->dri_screen =
dri2_dpy->swrast->createNewScreen2(0, dri2_dpy->extensions,
dri2_dpy->driver_extensions,
&dri2_dpy->driver_configs, disp);
} else {
dri2_dpy->dri_screen =
dri2_dpy->swrast->createNewScreen(0, dri2_dpy->extensions,
&dri2_dpy->driver_configs, disp);
}
dri2_dpy->dri_screen =
dri2_dpy->swrast->createNewScreen(0, dri2_dpy->extensions,
&dri2_dpy->driver_configs, disp);
}
if (dri2_dpy->dri_screen == NULL) {
@@ -1228,7 +1195,7 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx,
EGLClientBuffer _buffer,
const EGLint *attr_list)
{
struct wl_drm_buffer *buffer;
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) _buffer;
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
const struct wl_drm_components_descriptor *f;
__DRIimage *dri_image;
@@ -1236,9 +1203,7 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx,
EGLint err;
int32_t plane;
buffer = wayland_drm_buffer_get(dri2_dpy->wl_server_drm,
(struct wl_resource *) _buffer);
if (!buffer)
if (!wayland_buffer_is_drm(&buffer->buffer))
return NULL;
err = _eglParseImageAttribList(&attrs, disp, attr_list);
@@ -1375,261 +1340,6 @@ dri2_create_image_khr_texture(_EGLDisplay *disp, _EGLContext *ctx,
return &dri2_img->base;
}
static EGLBoolean
dri2_check_dma_buf_attribs(const _EGLImageAttribs *attrs)
{
unsigned i;
/**
* The spec says:
*
* "Required attributes and their values are as follows:
*
* * EGL_WIDTH & EGL_HEIGHT: The logical dimensions of the buffer in pixels
*
* * EGL_LINUX_DRM_FOURCC_EXT: The pixel format of the buffer, as specified
* by drm_fourcc.h and used as the pixel_format parameter of the
* drm_mode_fb_cmd2 ioctl."
*
* and
*
* "* If <target> is EGL_LINUX_DMA_BUF_EXT, and the list of attributes is
* incomplete, EGL_BAD_PARAMETER is generated."
*/
if (attrs->Width <= 0 || attrs->Height <= 0 ||
!attrs->DMABufFourCC.IsPresent) {
_eglError(EGL_BAD_PARAMETER, "attribute(s) missing");
return EGL_FALSE;
}
/**
* Also:
*
* "If <target> is EGL_LINUX_DMA_BUF_EXT and one or more of the values
* specified for a plane's pitch or offset isn't supported by EGL,
* EGL_BAD_ACCESS is generated."
*/
for (i = 0; i < ARRAY_SIZE(attrs->DMABufPlanePitches); ++i) {
if (attrs->DMABufPlanePitches[i].IsPresent &&
attrs->DMABufPlanePitches[i].Value <= 0) {
_eglError(EGL_BAD_ACCESS, "invalid pitch");
return EGL_FALSE;
}
}
return EGL_TRUE;
}
/* Returns the total number of file descriptors. Zero indicates an error. */
static unsigned
dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
{
unsigned i, plane_n;
switch (attrs->DMABufFourCC.Value) {
case DRM_FORMAT_RGB332:
case DRM_FORMAT_BGR233:
case DRM_FORMAT_XRGB4444:
case DRM_FORMAT_XBGR4444:
case DRM_FORMAT_RGBX4444:
case DRM_FORMAT_BGRX4444:
case DRM_FORMAT_ARGB4444:
case DRM_FORMAT_ABGR4444:
case DRM_FORMAT_RGBA4444:
case DRM_FORMAT_BGRA4444:
case DRM_FORMAT_XRGB1555:
case DRM_FORMAT_XBGR1555:
case DRM_FORMAT_RGBX5551:
case DRM_FORMAT_BGRX5551:
case DRM_FORMAT_ARGB1555:
case DRM_FORMAT_ABGR1555:
case DRM_FORMAT_RGBA5551:
case DRM_FORMAT_BGRA5551:
case DRM_FORMAT_RGB565:
case DRM_FORMAT_BGR565:
case DRM_FORMAT_RGB888:
case DRM_FORMAT_BGR888:
case DRM_FORMAT_XRGB8888:
case DRM_FORMAT_XBGR8888:
case DRM_FORMAT_RGBX8888:
case DRM_FORMAT_BGRX8888:
case DRM_FORMAT_ARGB8888:
case DRM_FORMAT_ABGR8888:
case DRM_FORMAT_RGBA8888:
case DRM_FORMAT_BGRA8888:
case DRM_FORMAT_XRGB2101010:
case DRM_FORMAT_XBGR2101010:
case DRM_FORMAT_RGBX1010102:
case DRM_FORMAT_BGRX1010102:
case DRM_FORMAT_ARGB2101010:
case DRM_FORMAT_ABGR2101010:
case DRM_FORMAT_RGBA1010102:
case DRM_FORMAT_BGRA1010102:
case DRM_FORMAT_YUYV:
case DRM_FORMAT_YVYU:
case DRM_FORMAT_UYVY:
case DRM_FORMAT_VYUY:
plane_n = 1;
break;
case DRM_FORMAT_NV12:
case DRM_FORMAT_NV21:
case DRM_FORMAT_NV16:
case DRM_FORMAT_NV61:
plane_n = 2;
break;
case DRM_FORMAT_YUV410:
case DRM_FORMAT_YVU410:
case DRM_FORMAT_YUV411:
case DRM_FORMAT_YVU411:
case DRM_FORMAT_YUV420:
case DRM_FORMAT_YVU420:
case DRM_FORMAT_YUV422:
case DRM_FORMAT_YVU422:
case DRM_FORMAT_YUV444:
case DRM_FORMAT_YVU444:
plane_n = 3;
break;
default:
_eglError(EGL_BAD_ATTRIBUTE, "invalid format");
return 0;
}
/**
* The spec says:
*
* "* If <target> is EGL_LINUX_DMA_BUF_EXT, and the list of attributes is
* incomplete, EGL_BAD_PARAMETER is generated."
*/
for (i = 0; i < plane_n; ++i) {
if (!attrs->DMABufPlaneFds[i].IsPresent ||
!attrs->DMABufPlaneOffsets[i].IsPresent ||
!attrs->DMABufPlanePitches[i].IsPresent) {
_eglError(EGL_BAD_PARAMETER, "plane attribute(s) missing");
return 0;
}
}
/**
* The spec also says:
*
* "If <target> is EGL_LINUX_DMA_BUF_EXT, and the EGL_LINUX_DRM_FOURCC_EXT
* attribute indicates a single-plane format, EGL_BAD_ATTRIBUTE is
* generated if any of the EGL_DMA_BUF_PLANE1_* or EGL_DMA_BUF_PLANE2_*
* attributes are specified."
*/
for (i = plane_n; i < 3; ++i) {
if (attrs->DMABufPlaneFds[i].IsPresent ||
attrs->DMABufPlaneOffsets[i].IsPresent ||
attrs->DMABufPlanePitches[i].IsPresent) {
_eglError(EGL_BAD_ATTRIBUTE, "too many plane attributes");
return 0;
}
}
return plane_n;
}
/**
* The spec says:
*
* "If eglCreateImageKHR is successful for a EGL_LINUX_DMA_BUF_EXT target,
* the EGL takes ownership of the file descriptor and is responsible for
* closing it, which it may do at any time while the EGLDisplay is
* initialized."
*/
static void
dri2_take_dma_buf_ownership(const int *fds, unsigned num_fds)
{
int already_closed[num_fds];
unsigned num_closed = 0;
unsigned i, j;
for (i = 0; i < num_fds; ++i) {
/**
* The same file descriptor can be referenced multiple times in case more
* than one plane is found in the same buffer, just with a different
* offset.
*/
for (j = 0; j < num_closed; ++j) {
if (already_closed[j] == fds[i])
break;
}
if (j == num_closed) {
close(fds[i]);
already_closed[num_closed++] = fds[i];
}
}
}
static _EGLImage *
dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
EGLClientBuffer buffer, const EGLint *attr_list)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
_EGLImage *res;
EGLint err;
_EGLImageAttribs attrs;
__DRIimage *dri_image;
unsigned num_fds;
unsigned i;
int fds[3];
int pitches[3];
int offsets[3];
unsigned error;
/**
* The spec says:
*
* ""* If <target> is EGL_LINUX_DMA_BUF_EXT and <buffer> is not NULL, the
* error EGL_BAD_PARAMETER is generated."
*/
if (buffer != NULL) {
_eglError(EGL_BAD_PARAMETER, "buffer not NULL");
return NULL;
}
err = _eglParseImageAttribList(&attrs, disp, attr_list);
if (err != EGL_SUCCESS) {
_eglError(err, "bad attribute");
return NULL;
}
if (!dri2_check_dma_buf_attribs(&attrs))
return NULL;
num_fds = dri2_check_dma_buf_format(&attrs);
if (!num_fds)
return NULL;
for (i = 0; i < num_fds; ++i) {
fds[i] = attrs.DMABufPlaneFds[i].Value;
pitches[i] = attrs.DMABufPlanePitches[i].Value;
offsets[i] = attrs.DMABufPlaneOffsets[i].Value;
}
dri_image =
dri2_dpy->image->createImageFromDmaBufs(dri2_dpy->dri_screen,
attrs.Width, attrs.Height, attrs.DMABufFourCC.Value,
fds, num_fds, pitches, offsets,
attrs.DMABufYuvColorSpaceHint.Value,
attrs.DMABufSampleRangeHint.Value,
attrs.DMABufChromaHorizontalSiting.Value,
attrs.DMABufChromaVerticalSiting.Value,
&error,
NULL);
dri2_create_image_khr_texture_error(error);
if (!dri_image)
return EGL_NO_IMAGE_KHR;
res = dri2_create_image(disp, dri_image);
if (res)
dri2_take_dma_buf_ownership(fds, num_fds);
return res;
}
_EGLImage *
dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
@@ -1654,8 +1364,6 @@ dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
case EGL_WAYLAND_BUFFER_WL:
return dri2_create_image_wayland_wl_buffer(disp, ctx, buffer, attr_list);
#endif
case EGL_LINUX_DMA_BUF_EXT:
return dri2_create_image_dma_buf(disp, ctx, buffer, attr_list);
default:
_eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr");
return EGL_NO_IMAGE_KHR;
@@ -1800,8 +1508,8 @@ dri2_wl_reference_buffer(void *user_data, uint32_t name, int fd,
if (fd == -1)
img = dri2_dpy->image->createImageFromNames(dri2_dpy->dri_screen,
buffer->width,
buffer->height,
buffer->buffer.width,
buffer->buffer.height,
buffer->format,
(int*)&name, 1,
buffer->stride,
@@ -1809,8 +1517,8 @@ dri2_wl_reference_buffer(void *user_data, uint32_t name, int fd,
NULL);
else
img = dri2_dpy->image->createImageFromFds(dri2_dpy->dri_screen,
buffer->width,
buffer->height,
buffer->buffer.width,
buffer->buffer.height,
buffer->format,
&fd, 1,
buffer->stride,
@@ -1877,11 +1585,6 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
if (!dri2_dpy->wl_server_drm)
return EGL_FALSE;
/* We have to share the wl_drm instance with gbm, so gbm can convert
* wl_buffers to gbm bos. */
if (dri2_dpy->gbm_dri)
dri2_dpy->gbm_dri->wl_drm = dri2_dpy->wl_server_drm;
return EGL_TRUE;
}
@@ -1904,15 +1607,13 @@ dri2_unbind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
static EGLBoolean
dri2_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *disp,
struct wl_resource *buffer_resource,
struct wl_buffer *_buffer,
EGLint attribute, EGLint *value)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct wl_drm_buffer *buffer;
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) _buffer;
const struct wl_drm_components_descriptor *format;
buffer = wayland_drm_buffer_get(dri2_dpy->wl_server_drm, buffer_resource);
if (!buffer)
if (!wayland_buffer_is_drm(&buffer->buffer))
return EGL_FALSE;
format = buffer->driver_format;
@@ -1921,10 +1622,10 @@ dri2_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *disp,
*value = format->components;
return EGL_TRUE;
case EGL_WIDTH:
*value = buffer->width;
*value = buffer->buffer.width;
return EGL_TRUE;
case EGL_HEIGHT:
*value = buffer->height;
*value = buffer->buffer.height;
return EGL_TRUE;
}

View File

@@ -37,6 +37,7 @@
#ifdef HAVE_WAYLAND_PLATFORM
#include <wayland-client.h>
#include "wayland-drm.h"
#include "wayland-egl-priv.h"
#endif
@@ -117,8 +118,7 @@ struct dri2_egl_display
__DRIdri2LoaderExtension dri2_loader_extension;
__DRIswrastLoaderExtension swrast_loader_extension;
const __DRIextension *extensions[5];
const __DRIextension **driver_extensions;
const __DRIextension *extensions[4];
#ifdef HAVE_X11_PLATFORM
xcb_connection_t *conn;
@@ -189,6 +189,7 @@ struct dri2_egl_surface
#ifdef HAVE_WAYLAND_PLATFORM
struct wl_buffer *wl_buffer;
__DRIimage *dri_image;
int pitch, name;
#endif
#ifdef HAVE_DRM_PLATFORM
struct gbm_bo *bo;
@@ -246,7 +247,7 @@ dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data);
struct dri2_egl_config *
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
EGLint surface_type, const EGLint *attr_list,
int depth, EGLint surface_type, const EGLint *attr_list,
const unsigned int *rgba_masks);
_EGLImage *

View File

@@ -38,6 +38,7 @@
#include <xf86drm.h>
#include <i915_drm.h>
#include <radeon_drm.h>
#include <gralloc_drm.h>
#include "egl_dri2.h"
#include "gralloc_drm.h"
@@ -56,9 +57,9 @@ get_format_bpp(int native)
case HAL_PIXEL_FORMAT_RGB_888:
bpp = 3;
break;
case HAL_PIXEL_FORMAT_DRM_NV12:
case HAL_PIXEL_FORMAT_YV12:
case HAL_PIXEL_FORMAT_RGB_565:
case HAL_PIXEL_FORMAT_RGBA_5551:
case HAL_PIXEL_FORMAT_RGBA_4444:
bpp = 2;
break;
default:
@@ -339,6 +340,7 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp, _EGLContext *ctx,
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_image *dri2_img;
int name;
uint32_t offsets[3], strides[3], handles[3], tmp;
EGLint format;
if (ctx != NULL) {
@@ -367,6 +369,12 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp, _EGLContext *ctx,
/* see the table in droid_add_configs_for_visuals */
switch (buf->format) {
case HAL_PIXEL_FORMAT_DRM_NV12:
format = __DRI_IMAGE_FOURCC_NV12;
break;
case HAL_PIXEL_FORMAT_YV12:
format = __DRI_IMAGE_FOURCC_YVU420;
break;
case HAL_PIXEL_FORMAT_BGRA_8888:
format = __DRI_IMAGE_FORMAT_ARGB8888;
break;
@@ -380,8 +388,6 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp, _EGLContext *ctx,
format = __DRI_IMAGE_FORMAT_XBGR8888;
break;
case HAL_PIXEL_FORMAT_RGB_888:
case HAL_PIXEL_FORMAT_RGBA_5551:
case HAL_PIXEL_FORMAT_RGBA_4444:
/* unsupported */
default:
_eglLog(_EGL_WARNING, "unsupported native buffer format 0x%x", buf->format);
@@ -400,14 +406,70 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp, _EGLContext *ctx,
return NULL;
}
dri2_img->dri_image =
dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
buf->width,
buf->height,
format,
name,
buf->stride,
dri2_img);
switch (format) {
case __DRI_IMAGE_FORMAT_ARGB8888:
case __DRI_IMAGE_FORMAT_RGB565:
case __DRI_IMAGE_FORMAT_ABGR8888:
case __DRI_IMAGE_FORMAT_XBGR8888:
dri2_img->dri_image =
dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
buf->width,
buf->height,
format,
name,
buf->stride,
dri2_img);
break;
case __DRI_IMAGE_FOURCC_YVU420:
offsets[0] = offsets[1] = offsets[2] = 0;
strides[0] = strides[1] = strides[2] = 0;
gralloc_drm_resolve_format(buf->handle, &strides[0], &offsets[0],
&handles[0]);
/* u anv v are given in wrong order than what we need here thus this:*/
tmp = offsets[1];
offsets[1] = offsets[2];
offsets[2] = tmp;
tmp = strides[1];
strides[1] = strides[2];
strides[2] = tmp;
dri2_img->dri_image =
dri2_dpy->image->createImageFromNames(dri2_dpy->dri_screen,
buf->width,
buf->height,
format,
&name, 1,
(int*)strides,
(int*)offsets,
dri2_img);
break;
case __DRI_IMAGE_FOURCC_NV12:
offsets[0] = offsets[1] = offsets[2] = 0;
strides[0] = strides[1] = strides[2] = 0;
gralloc_drm_resolve_format(buf->handle, &strides[0], &offsets[0],
&handles[0]);
dri2_img->dri_image =
dri2_dpy->image->createImageFromNames(dri2_dpy->dri_screen,
buf->width,
buf->height,
format,
&name, 1,
(int*)strides,
(int*)offsets,
dri2_img);
break;
default:
/* We should never arrive here */
_eglLog(_EGL_WARNING, "unsupported native buffer format 0x%x",
buf->format);
break;
}
if (!dri2_img->dri_image) {
free(dri2_img);
_eglError(EGL_BAD_ALLOC, "droid_create_image_mesa_drm");
@@ -547,13 +609,14 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
const struct {
int format;
int size;
unsigned int rgba_masks[4];
} visuals[] = {
{ HAL_PIXEL_FORMAT_RGBA_8888, { 0xff, 0xff00, 0xff0000, 0xff000000 } },
{ HAL_PIXEL_FORMAT_RGBX_8888, { 0xff, 0xff00, 0xff0000, 0x0 } },
{ HAL_PIXEL_FORMAT_RGB_888, { 0xff, 0xff00, 0xff0000, 0x0 } },
{ HAL_PIXEL_FORMAT_RGB_565, { 0xf800, 0x7e0, 0x1f, 0x0 } },
{ HAL_PIXEL_FORMAT_BGRA_8888, { 0xff0000, 0xff00, 0xff, 0xff000000 } },
{ HAL_PIXEL_FORMAT_RGBA_8888, 32, { 0xff, 0xff00, 0xff0000, 0xff000000 } },
{ HAL_PIXEL_FORMAT_RGBX_8888, 32, { 0xff, 0xff00, 0xff0000, 0x0 } },
{ HAL_PIXEL_FORMAT_RGB_888, 24, { 0xff, 0xff00, 0xff0000, 0x0 } },
{ HAL_PIXEL_FORMAT_RGB_565, 16, { 0xf800, 0x7e0, 0x1f, 0x0 } },
{ HAL_PIXEL_FORMAT_BGRA_8888, 32, { 0xff0000, 0xff00, 0xff, 0xff000000 } },
{ 0, 0, { 0, 0, 0, 0 } }
};
int count, i, j;
@@ -575,7 +638,8 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
continue;
dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[j],
count + 1, surface_type, NULL, visuals[i].rgba_masks);
count + 1, visuals[i].size, surface_type, NULL,
visuals[i].rgba_masks);
if (dri2_conf) {
dri2_conf->base.NativeVisualID = visuals[i].format;
dri2_conf->base.NativeVisualType = visuals[i].format;

View File

@@ -175,12 +175,13 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
}
static int
get_back_bo(struct dri2_egl_surface *dri2_surf)
get_back_bo(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
{
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
struct gbm_dri_bo *bo;
struct gbm_dri_surface *surf = dri2_surf->gbm_surf;
int i;
int i, name, pitch;
if (dri2_surf->back == NULL) {
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
@@ -200,17 +201,6 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
if (dri2_surf->back->bo == NULL)
return -1;
return 0;
}
static void
back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
{
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
struct gbm_dri_bo *bo;
int name, pitch;
bo = (struct gbm_dri_bo *) dri2_surf->back->bo;
dri2_dpy->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_NAME, &name);
@@ -221,6 +211,8 @@ back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
buffer->pitch = pitch;
buffer->cpp = 4;
buffer->flags = 0;
return 0;
}
static int
@@ -262,11 +254,10 @@ dri2_get_buffers_with_format(__DRIdrawable *driDrawable,
switch (attachments[i]) {
case __DRI_BUFFER_BACK_LEFT:
if (get_back_bo(dri2_surf) < 0) {
if (get_back_bo(dri2_surf, &dri2_surf->buffers[j]) < 0) {
_eglError(EGL_BAD_ALLOC, "failed to allocate color buffer");
return NULL;
}
back_bo_to_dri_buffer(dri2_surf, &dri2_surf->buffers[j]);
break;
default:
if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1],
@@ -321,27 +312,6 @@ dri2_get_buffers(__DRIdrawable * driDrawable,
return buffer;
}
static int
dri_image_get_buffers(__DRIdrawable *driDrawable,
unsigned int format,
uint32_t *stamp,
void *loaderPrivate,
uint32_t buffer_mask,
struct __DRIimageList *buffers)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
struct gbm_dri_bo *bo;
if (get_back_bo(dri2_surf) < 0)
return 0;
bo = (struct gbm_dri_bo *) dri2_surf->back->bo;
buffers->image_mask = __DRI_IMAGE_BUFFER_BACK;
buffers->back = bo->image;
return 1;
}
static void
dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
{
@@ -378,8 +348,9 @@ dri2_query_buffer_age(_EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surface)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
__DRIbuffer buffer;
if (get_back_bo(dri2_surf) < 0) {
if (get_back_bo(dri2_surf, &buffer) < 0) {
_eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age");
return 0;
}
@@ -498,7 +469,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
dri2_dpy->gbm_dri->get_buffers = dri2_get_buffers;
dri2_dpy->gbm_dri->flush_front_buffer = dri2_flush_front_buffer;
dri2_dpy->gbm_dri->get_buffers_with_format = dri2_get_buffers_with_format;
dri2_dpy->gbm_dri->image_get_buffers = dri_image_get_buffers;
dri2_dpy->gbm_dri->base.base.surface_lock_front_buffer = lock_front_buffer;
dri2_dpy->gbm_dri->base.base.surface_release_buffer = release_buffer;
@@ -506,28 +476,9 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
dri2_setup_screen(disp);
for (i = 0; dri2_dpy->driver_configs[i]; i++) {
EGLint format, attr_list[3];
unsigned int mask;
dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
__DRI_ATTRIB_RED_MASK, &mask);
if (mask == 0x3ff00000)
format = GBM_FORMAT_XRGB2101010;
else if (mask == 0x00ff0000)
format = GBM_FORMAT_XRGB8888;
else if (mask == 0xf800)
format = GBM_FORMAT_RGB565;
else
continue;
attr_list[0] = EGL_NATIVE_VISUAL_ID;
attr_list[1] = format;
attr_list[2] = EGL_NONE;
for (i = 0; dri2_dpy->driver_configs[i]; i++)
dri2_add_config(disp, dri2_dpy->driver_configs[i],
i + 1, EGL_WINDOW_BIT, attr_list, NULL);
}
i + 1, 0, EGL_WINDOW_BIT, NULL, NULL);
drv->API.CreateWindowSurface = dri2_create_window_surface;
drv->API.DestroySurface = dri2_destroy_surface;

View File

@@ -42,8 +42,7 @@
enum wl_drm_format_flags {
HAS_ARGB8888 = 1,
HAS_XRGB8888 = 2,
HAS_RGB565 = 4,
HAS_XRGB8888 = 2
};
static void
@@ -133,9 +132,7 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
goto cleanup_surf;
if (conf->RedSize == 5)
dri2_surf->format = WL_DRM_FORMAT_RGB565;
else if (conf->AlphaSize == 0)
if (conf->AlphaSize == 0)
dri2_surf->format = WL_DRM_FORMAT_XRGB8888;
else
dri2_surf->format = WL_DRM_FORMAT_ARGB8888;
@@ -257,11 +254,12 @@ dri2_release_buffers(struct dri2_egl_surface *dri2_surf)
}
static int
get_back_bo(struct dri2_egl_surface *dri2_surf)
get_back_bo(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
{
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
int i;
__DRIimage *image;
int i, name, pitch;
/* There might be a buffer release already queued that wasn't processed */
wl_display_dispatch_queue_pending(dri2_dpy->wl_dpy, dri2_dpy->wl_queue);
@@ -294,30 +292,23 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
if (dri2_surf->back->dri_image == NULL)
return -1;
dri2_surf->back->locked = 1;
return 0;
}
static void
back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
{
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
__DRIimage *image;
int name, pitch;
image = dri2_surf->back->dri_image;
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_NAME, &name);
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &pitch);
dri2_surf->back->name = name;
dri2_surf->back->pitch = pitch;
buffer->attachment = __DRI_BUFFER_BACK_LEFT;
buffer->name = name;
buffer->pitch = pitch;
buffer->cpp = 4;
buffer->flags = 0;
dri2_surf->back->locked = 1;
return 0;
}
static int
@@ -343,12 +334,16 @@ get_aux_bo(struct dri2_egl_surface *dri2_surf,
return 0;
}
static int
update_buffers(struct dri2_egl_surface *dri2_surf)
static __DRIbuffer *
dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
int *width, int *height,
unsigned int *attachments, int count,
int *out_count, void *loaderPrivate)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
int i;
int i, j;
if (dri2_surf->base.Type == EGL_WINDOW_BIT &&
(dri2_surf->base.Width != dri2_surf->wl_win->width ||
@@ -362,9 +357,22 @@ update_buffers(struct dri2_egl_surface *dri2_surf)
dri2_surf->dy = dri2_surf->wl_win->dy;
}
if (get_back_bo(dri2_surf) < 0) {
_eglError(EGL_BAD_ALLOC, "failed to allocate color buffer");
return -1;
for (i = 0, j = 0; i < 2 * count; i += 2, j++) {
switch (attachments[i]) {
case __DRI_BUFFER_BACK_LEFT:
if (get_back_bo(dri2_surf, &dri2_surf->buffers[j]) < 0) {
_eglError(EGL_BAD_ALLOC, "failed to allocate color buffer");
return NULL;
}
break;
default:
if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1],
&dri2_surf->buffers[j]) < 0) {
_eglError(EGL_BAD_ALLOC, "failed to allocate aux buffer");
return NULL;
}
break;
}
}
/* If we have an extra unlocked buffer at this point, we had to do triple
@@ -380,36 +388,6 @@ update_buffers(struct dri2_egl_surface *dri2_surf)
}
}
return 0;
}
static __DRIbuffer *
dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
int *width, int *height,
unsigned int *attachments, int count,
int *out_count, void *loaderPrivate)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
int i, j;
if (update_buffers(dri2_surf) < 0)
return NULL;
for (i = 0, j = 0; i < 2 * count; i += 2, j++) {
switch (attachments[i]) {
case __DRI_BUFFER_BACK_LEFT:
back_bo_to_dri_buffer(dri2_surf, &dri2_surf->buffers[j]);
break;
default:
if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1],
&dri2_surf->buffers[j]) < 0) {
_eglError(EGL_BAD_ALLOC, "failed to allocate aux buffer");
return NULL;
}
break;
}
}
*out_count = j;
if (j == 0)
return NULL;
@@ -453,25 +431,6 @@ dri2_get_buffers(__DRIdrawable * driDrawable,
return buffer;
}
static int
image_get_buffers(__DRIdrawable *driDrawable,
unsigned int format,
uint32_t *stamp,
void *loaderPrivate,
uint32_t buffer_mask,
struct __DRIimageList *buffers)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
if (update_buffers(dri2_surf) < 0)
return 0;
buffers->image_mask = __DRI_IMAGE_BUFFER_BACK;
buffers->back = dri2_surf->back->dri_image;
return 1;
}
static void
dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
{
@@ -479,12 +438,6 @@ dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
(void) loaderPrivate;
}
static const __DRIimageLoaderExtension image_loader_extension = {
{ __DRI_IMAGE_LOADER, 1 },
image_get_buffers,
dri2_flush_front_buffer
};
static void
wayland_frame_callback(void *data, struct wl_callback *callback, uint32_t time)
{
@@ -503,7 +456,7 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf)
{
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
int fd, stride, name;
int fd;
if (dri2_surf->current->wl_buffer != NULL)
return;
@@ -511,8 +464,6 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf)
if (dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) {
dri2_dpy->image->queryImage(dri2_surf->current->dri_image,
__DRI_IMAGE_ATTRIB_FD, &fd);
dri2_dpy->image->queryImage(dri2_surf->current->dri_image,
__DRI_IMAGE_ATTRIB_STRIDE, &stride);
dri2_surf->current->wl_buffer =
wl_drm_create_prime_buffer(dri2_dpy->wl_drm,
@@ -520,22 +471,17 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf)
dri2_surf->base.Width,
dri2_surf->base.Height,
dri2_surf->format,
0, stride,
0, dri2_surf->current->pitch,
0, 0,
0, 0);
close(fd);
} else {
dri2_dpy->image->queryImage(dri2_surf->current->dri_image,
__DRI_IMAGE_ATTRIB_NAME, &name);
dri2_dpy->image->queryImage(dri2_surf->current->dri_image,
__DRI_IMAGE_ATTRIB_STRIDE, &stride);
dri2_surf->current->wl_buffer =
wl_drm_create_buffer(dri2_dpy->wl_drm,
name,
dri2_surf->current->name,
dri2_surf->base.Width,
dri2_surf->base.Height,
stride,
dri2_surf->current->pitch,
dri2_surf->format);
}
@@ -557,8 +503,7 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
struct dri2_egl_context *dri2_ctx;
_EGLContext *ctx;
__DRIbuffer buffer;
int i, ret = 0;
while (dri2_surf->frame_callback && ret != -1)
@@ -578,7 +523,7 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
/* Make sure we have a back buffer in case we're swapping without ever
* rendering. */
if (get_back_bo(dri2_surf) < 0) {
if (get_back_bo(dri2_surf, &buffer) < 0) {
_eglError(EGL_BAD_ALLOC, "dri2_swap_buffers");
return EGL_FALSE;
}
@@ -600,8 +545,8 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
dri2_surf->dy = 0;
if (n_rects == 0) {
wl_surface_damage(dri2_surf->wl_win->surface,
0, 0, INT32_MAX, INT32_MAX);
wl_surface_damage(dri2_surf->wl_win->surface, 0, 0,
dri2_surf->base.Width, dri2_surf->base.Height);
} else {
for (i = 0; i < n_rects; i++) {
const int *rect = &rects[i * 4];
@@ -612,21 +557,10 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
}
}
if (dri2_dpy->flush->base.version >= 4) {
ctx = _eglGetCurrentContext();
dri2_ctx = dri2_egl_context(ctx);
(*dri2_dpy->flush->flush_with_flags)(dri2_ctx->dri_context,
dri2_surf->dri_drawable,
__DRI2_FLUSH_DRAWABLE,
__DRI2_THROTTLE_SWAPBUFFER);
} else {
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
}
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
wl_surface_commit(dri2_surf->wl_win->surface);
wl_display_flush(dri2_dpy->wl_dpy);
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
return EGL_TRUE;
}
@@ -636,8 +570,9 @@ dri2_query_buffer_age(_EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surface)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
__DRIbuffer buffer;
if (get_back_bo(dri2_surf) < 0) {
if (get_back_bo(dri2_surf, &buffer) < 0) {
_eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age");
return 0;
}
@@ -739,9 +674,6 @@ drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)
case WL_DRM_FORMAT_XRGB8888:
dri2_dpy->formats |= HAS_XRGB8888;
break;
case WL_DRM_FORMAT_RGB565:
dri2_dpy->formats |= HAS_RGB565;
break;
}
}
@@ -783,15 +715,8 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t name,
}
}
static void
registry_handle_global_remove(void *data, struct wl_registry *registry,
uint32_t name)
{
}
static const struct wl_registry_listener registry_listener = {
registry_handle_global,
registry_handle_global_remove
registry_handle_global
};
EGLBoolean
@@ -804,7 +729,6 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
static const unsigned int argb_masks[4] =
{ 0xff0000, 0xff00, 0xff, 0xff000000 };
static const unsigned int rgb_masks[4] = { 0xff0000, 0xff00, 0xff, 0 };
static const unsigned int rgb565_masks[4] = { 0xf800, 0x07e0, 0x001f, 0 };
drv->API.CreateWindowSurface = dri2_create_window_surface;
drv->API.DestroySurface = dri2_destroy_surface;
@@ -861,12 +785,11 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
dri2_get_buffers_with_format;
dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
dri2_dpy->extensions[1] = &image_loader_extension.base;
dri2_dpy->extensions[2] = &image_lookup_extension.base;
dri2_dpy->extensions[3] = &use_invalidate.base;
dri2_dpy->extensions[4] = NULL;
dri2_dpy->extensions[1] = &image_lookup_extension.base;
dri2_dpy->extensions[2] = &use_invalidate.base;
dri2_dpy->extensions[3] = NULL;
if (!dri2_create_screen(disp))
goto cleanup_driver;
@@ -884,11 +807,9 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
for (i = 0; dri2_dpy->driver_configs[i]; i++) {
config = dri2_dpy->driver_configs[i];
if (dri2_dpy->formats & HAS_XRGB8888)
dri2_add_config(disp, config, i + 1, types, NULL, rgb_masks);
dri2_add_config(disp, config, i + 1, 0, types, NULL, rgb_masks);
if (dri2_dpy->formats & HAS_ARGB8888)
dri2_add_config(disp, config, i + 1, types, NULL, argb_masks);
if (dri2_dpy->formats & HAS_RGB565)
dri2_add_config(disp, config, i + 1, types, NULL, rgb565_masks);
dri2_add_config(disp, config, i + 1, 0, types, NULL, argb_masks);
}
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;

View File

@@ -212,7 +212,7 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
dri2_surf->drawable, s.data->root,
dri2_surf->base.Width, dri2_surf->base.Height);
} else {
dri2_surf->drawable = window;
dri2_surf->drawable = (xcb_drawable_t)window;
}
if (dri2_dpy->dri2) {
@@ -630,7 +630,6 @@ dri2_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
xcb_depth_iterator_t d;
xcb_visualtype_t *visuals;
int i, j, id;
unsigned int rgba_masks[4];
EGLint surface_type;
EGLint config_attrs[] = {
EGL_NATIVE_VISUAL_ID, 0,
@@ -661,26 +660,8 @@ dri2_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
config_attrs[1] = visuals[i].visual_id;
config_attrs[3] = visuals[i]._class;
rgba_masks[0] = visuals[i].red_mask;
rgba_masks[1] = visuals[i].green_mask;
rgba_masks[2] = visuals[i].blue_mask;
rgba_masks[3] = 0;
dri2_add_config(disp, dri2_dpy->driver_configs[j], id++,
surface_type, config_attrs, rgba_masks);
/* Allow a 24-bit RGB visual to match a 32-bit RGBA EGLConfig.
* Otherwise it will only match a 32-bit RGBA visual. On a
* composited window manager on X11, this will make all of the
* EGLConfigs with destination alpha get blended by the
* compositor. This is probably not what the application
* wants... especially on drivers that only have 32-bit RGBA
* EGLConfigs! */
if (d.data->depth == 24) {
rgba_masks[3] =
~(rgba_masks[0] | rgba_masks[1] | rgba_masks[2]);
dri2_add_config(disp, dri2_dpy->driver_configs[j], id++,
surface_type, config_attrs, rgba_masks);
}
d.data->depth, surface_type, config_attrs, NULL);
}
}
@@ -762,20 +743,6 @@ dri2_swap_buffers_msc(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
free(reply);
}
/* Since we aren't watching for the server's invalidate events like we're
* supposed to (due to XCB providing no mechanism for filtering the events
* the way xlib does), and SwapBuffers is a common cause of invalidate
* events, just shove one down to the driver, even though we haven't told
* the driver that we're the kind of loader that provides reliable
* invalidate events. This causes the driver to request buffers again at
* its next draw, so that we get the correct buffers if a pageflip
* happened. The driver should still be using the viewport hack to catch
* window resizes.
*/
if (dri2_dpy->flush &&
dri2_dpy->flush->base.version >= 3 && dri2_dpy->flush->invalidate)
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
return swap_count;
}
@@ -869,10 +836,10 @@ dri2_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
gc = xcb_generate_id(dri2_dpy->conn);
xcb_create_gc(dri2_dpy->conn, gc, target, 0, NULL);
xcb_create_gc(dri2_dpy->conn, gc, (xcb_drawable_t)target, 0, NULL);
xcb_copy_area(dri2_dpy->conn,
dri2_surf->drawable,
target,
(xcb_drawable_t)target,
gc,
0, 0,
0, 0,

View File

@@ -22,8 +22,7 @@
AM_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/egl/main \
$(VISIBILITY_CFLAGS) \
$(X11_INCLUDES) \
$(X11_CFLAGS) \
$(DEFINES)
noinst_LTLIBRARIES = libegl_glx.la

View File

@@ -121,11 +121,13 @@ endif
# r300g/r600g/radeonsi
ifneq ($(filter r300g r600g radeonsi, $(MESA_GPU_DRIVERS)),)
gallium_DRIVERS += libmesa_winsys_radeon
LOCAL_SHARED_LIBRARIES += libdrm_radeon
ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
gallium_DRIVERS += libmesa_pipe_r300
endif
ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
gallium_DRIVERS += libmesa_pipe_r600
gallium_DRIVERS += libmesa_pipe_r600 libmesa_pipe_radeon
LOCAL_SHARED_LIBRARIES += libstlport
endif
ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
gallium_DRIVERS += libmesa_pipe_radeonsi

View File

@@ -19,6 +19,8 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
GLAPI_LIB = ../mapi/glapi/libglapi.la
if HAVE_XF86VIDMODE
EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
endif
@@ -27,7 +29,6 @@ AM_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gbm/main \
$(DEFINES) \
$(VISIBILITY_CFLAGS) \
$(EGL_CFLAGS) \
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
-D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" \
@@ -73,7 +74,7 @@ libEGL_la_SOURCES = \
libEGL_la_LIBADD = \
$(EGL_LIB_DEPS)
libEGL_la_LDFLAGS = -Wl,-Bsymbolic -version-number 1:0 -no-undefined
libEGL_la_LDFLAGS = -version-number 1:0 -no-undefined
if HAVE_EGL_PLATFORM_X11
AM_CFLAGS += -DHAVE_X11_PLATFORM
@@ -105,7 +106,7 @@ endif
if HAVE_EGL_DRIVER_GLX
AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX
libEGL_la_LIBADD += ../drivers/glx/libegl_glx.la
libEGL_la_LIBADD += $(DLOPEN_LIBS)
libEGL_la_LIBADD += $(X11_LIBS) $(DLOPEN_LIBS)
endif
if HAVE_EGL_DRIVER_DRI2

View File

@@ -1344,11 +1344,6 @@ eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
RETURN_EGL_EVAL(disp, EGL_NO_IMAGE_KHR);
if (!context && ctx != EGL_NO_CONTEXT)
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR);
/* "If <target> is EGL_LINUX_DMA_BUF_EXT, <dpy> must be a valid display,
* <ctx> must be EGL_NO_CONTEXT..."
*/
if (ctx != EGL_NO_CONTEXT && target == EGL_LINUX_DMA_BUF_EXT)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
img = drv->API.CreateImageKHR(drv,
disp, context, target, buffer, attr_list);
@@ -1576,7 +1571,7 @@ eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
}
EGLBoolean EGLAPIENTRY
eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer,
eglQueryWaylandBufferWL(EGLDisplay dpy,struct wl_buffer *buffer,
EGLint attribute, EGLint *value)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);

View File

@@ -123,7 +123,7 @@ typedef EGLBoolean (*ExportDRMImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, _
struct wl_display;
typedef EGLBoolean (*BindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *disp, struct wl_display *display);
typedef EGLBoolean (*UnbindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *disp, struct wl_display *display);
typedef EGLBoolean (*QueryWaylandBufferWL_t)(_EGLDriver *drv, _EGLDisplay *displ, struct wl_resource *buffer, EGLint attribute, EGLint *value);
typedef EGLBoolean (*QueryWaylandBufferWL_t)(_EGLDriver *drv, _EGLDisplay *displ, struct wl_buffer *buffer, EGLint attribute, EGLint *value);
#endif
typedef EGLBoolean (*PostSubBufferNV_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface, EGLint x, EGLint y, EGLint width, EGLint height);

View File

@@ -116,7 +116,6 @@ struct _egl_extensions
EGLBoolean EXT_create_context_robustness;
EGLBoolean EXT_buffer_age;
EGLBoolean EXT_swap_buffers_with_damage;
EGLBoolean EXT_image_dma_buf_import;
};

View File

@@ -93,82 +93,6 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy,
attrs->PlaneWL = val;
break;
case EGL_LINUX_DRM_FOURCC_EXT:
attrs->DMABufFourCC.Value = val;
attrs->DMABufFourCC.IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE0_FD_EXT:
attrs->DMABufPlaneFds[0].Value = val;
attrs->DMABufPlaneFds[0].IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE0_OFFSET_EXT:
attrs->DMABufPlaneOffsets[0].Value = val;
attrs->DMABufPlaneOffsets[0].IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE0_PITCH_EXT:
attrs->DMABufPlanePitches[0].Value = val;
attrs->DMABufPlanePitches[0].IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE1_FD_EXT:
attrs->DMABufPlaneFds[1].Value = val;
attrs->DMABufPlaneFds[1].IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE1_OFFSET_EXT:
attrs->DMABufPlaneOffsets[1].Value = val;
attrs->DMABufPlaneOffsets[1].IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE1_PITCH_EXT:
attrs->DMABufPlanePitches[1].Value = val;
attrs->DMABufPlanePitches[1].IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE2_FD_EXT:
attrs->DMABufPlaneFds[2].Value = val;
attrs->DMABufPlaneFds[2].IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE2_OFFSET_EXT:
attrs->DMABufPlaneOffsets[2].Value = val;
attrs->DMABufPlaneOffsets[2].IsPresent = EGL_TRUE;
break;
case EGL_DMA_BUF_PLANE2_PITCH_EXT:
attrs->DMABufPlanePitches[2].Value = val;
attrs->DMABufPlanePitches[2].IsPresent = EGL_TRUE;
break;
case EGL_YUV_COLOR_SPACE_HINT_EXT:
if (val != EGL_ITU_REC601_EXT && val != EGL_ITU_REC709_EXT &&
val != EGL_ITU_REC2020_EXT) {
err = EGL_BAD_ATTRIBUTE;
} else {
attrs->DMABufYuvColorSpaceHint.Value = val;
attrs->DMABufYuvColorSpaceHint.IsPresent = EGL_TRUE;
}
break;
case EGL_SAMPLE_RANGE_HINT_EXT:
if (val != EGL_YUV_FULL_RANGE_EXT && val != EGL_YUV_NARROW_RANGE_EXT) {
err = EGL_BAD_ATTRIBUTE;
} else {
attrs->DMABufSampleRangeHint.Value = val;
attrs->DMABufSampleRangeHint.IsPresent = EGL_TRUE;
}
break;
case EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT:
if (val != EGL_YUV_CHROMA_SITING_0_EXT &&
val != EGL_YUV_CHROMA_SITING_0_5_EXT) {
err = EGL_BAD_ATTRIBUTE;
} else {
attrs->DMABufChromaHorizontalSiting.Value = val;
attrs->DMABufChromaHorizontalSiting.IsPresent = EGL_TRUE;
}
break;
case EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT:
if (val != EGL_YUV_CHROMA_SITING_0_EXT &&
val != EGL_YUV_CHROMA_SITING_0_5_EXT) {
err = EGL_BAD_ATTRIBUTE;
} else {
attrs->DMABufChromaVerticalSiting.Value = val;
attrs->DMABufChromaVerticalSiting.IsPresent = EGL_TRUE;
}
break;
default:
/* unknown attrs are ignored */
break;

View File

@@ -34,11 +34,6 @@
#include "egltypedefs.h"
#include "egldisplay.h"
struct _egl_image_attrib_int
{
EGLint Value;
EGLBoolean IsPresent;
};
struct _egl_image_attribs
{
@@ -58,16 +53,6 @@ struct _egl_image_attribs
/* EGL_WL_bind_wayland_display */
EGLint PlaneWL;
/* EGL_EXT_image_dma_buf_import */
struct _egl_image_attrib_int DMABufFourCC;
struct _egl_image_attrib_int DMABufPlaneFds[3];
struct _egl_image_attrib_int DMABufPlaneOffsets[3];
struct _egl_image_attrib_int DMABufPlanePitches[3];
struct _egl_image_attrib_int DMABufYuvColorSpaceHint;
struct _egl_image_attrib_int DMABufSampleRangeHint;
struct _egl_image_attrib_int DMABufChromaHorizontalSiting;
struct _egl_image_attrib_int DMABufChromaVerticalSiting;
};
/**

View File

@@ -118,7 +118,6 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy)
_EGL_CHECK_EXTENSION(EXT_create_context_robustness);
_EGL_CHECK_EXTENSION(EXT_buffer_age);
_EGL_CHECK_EXTENSION(EXT_swap_buffers_with_damage);
_EGL_CHECK_EXTENSION(EXT_image_dma_buf_import);
_EGL_CHECK_EXTENSION(NV_post_sub_buffer);
#undef _EGL_CHECK_EXTENSION

View File

@@ -1,7 +1,6 @@
AM_CFLAGS = -I$(top_srcdir)/src/egl/main \
-I$(top_srcdir)/include \
$(DEFINES) \
$(VISIBILITY_CFLAGS) \
$(WAYLAND_CFLAGS)
noinst_LTLIBRARIES = libwayland-drm.la

View File

@@ -37,19 +37,14 @@
#include "wayland-drm.h"
#include "wayland-drm-server-protocol.h"
#define MIN(x,y) (((x)<(y))?(x):(y))
struct wl_drm {
struct wl_display *display;
struct wl_global *wl_drm_global;
void *user_data;
char *device_name;
uint32_t flags;
struct wayland_drm_callbacks *callbacks;
struct wl_buffer_interface buffer_interface;
};
static void
@@ -68,6 +63,10 @@ buffer_destroy(struct wl_client *client, struct wl_resource *resource)
wl_resource_destroy(resource);
}
const static struct wl_buffer_interface drm_buffer_interface = {
buffer_destroy
};
static void
create_buffer(struct wl_client *client, struct wl_resource *resource,
uint32_t id, uint32_t name, int fd,
@@ -87,8 +86,8 @@ create_buffer(struct wl_client *client, struct wl_resource *resource,
}
buffer->drm = drm;
buffer->width = width;
buffer->height = height;
buffer->buffer.width = width;
buffer->buffer.height = height;
buffer->format = format;
buffer->offset[0] = offset0;
buffer->stride[0] = stride0;
@@ -105,17 +104,16 @@ create_buffer(struct wl_client *client, struct wl_resource *resource,
return;
}
buffer->resource =
wl_resource_create(client, &wl_buffer_interface, 1, id);
if (!buffer->resource) {
wl_resource_post_no_memory(resource);
free(buffer);
return;
}
buffer->buffer.resource.object.id = id;
buffer->buffer.resource.object.interface = &wl_buffer_interface;
buffer->buffer.resource.object.implementation =
(void (**)(void)) &drm_buffer_interface;
buffer->buffer.resource.data = buffer;
wl_resource_set_implementation(buffer->resource,
(void (**)(void)) &drm->buffer_interface,
buffer, destroy_buffer);
buffer->buffer.resource.destroy = destroy_buffer;
buffer->buffer.resource.client = resource->client;
wl_client_add_resource(resource->client, &buffer->buffer.resource);
}
static void
@@ -127,7 +125,6 @@ drm_create_buffer(struct wl_client *client, struct wl_resource *resource,
case WL_DRM_FORMAT_ARGB8888:
case WL_DRM_FORMAT_XRGB8888:
case WL_DRM_FORMAT_YUYV:
case WL_DRM_FORMAT_RGB565:
break;
default:
wl_resource_post_error(resource,
@@ -211,22 +208,13 @@ bind_drm(struct wl_client *client, void *data, uint32_t version, uint32_t id)
struct wl_resource *resource;
uint32_t capabilities;
resource = wl_resource_create(client, &wl_drm_interface,
MIN(version, 2), id);
if (!resource) {
wl_client_post_no_memory(client);
return;
}
wl_resource_set_implementation(resource, &drm_interface, data, NULL);
resource = wl_client_add_object(client, &wl_drm_interface,
&drm_interface, id, data);
wl_resource_post_event(resource, WL_DRM_DEVICE, drm->device_name);
wl_resource_post_event(resource, WL_DRM_FORMAT,
WL_DRM_FORMAT_ARGB8888);
wl_resource_post_event(resource, WL_DRM_FORMAT,
WL_DRM_FORMAT_XRGB8888);
wl_resource_post_event(resource, WL_DRM_FORMAT,
WL_DRM_FORMAT_RGB565);
wl_resource_post_event(resource, WL_DRM_FORMAT, WL_DRM_FORMAT_YUV410);
wl_resource_post_event(resource, WL_DRM_FORMAT, WL_DRM_FORMAT_YUV411);
wl_resource_post_event(resource, WL_DRM_FORMAT, WL_DRM_FORMAT_YUV420);
@@ -244,19 +232,6 @@ bind_drm(struct wl_client *client, void *data, uint32_t version, uint32_t id)
wl_resource_post_event(resource, WL_DRM_CAPABILITIES, capabilities);
}
struct wl_drm_buffer *
wayland_drm_buffer_get(struct wl_drm *drm, struct wl_resource *resource)
{
if (resource == NULL)
return NULL;
if (wl_resource_instance_of(resource, &wl_buffer_interface,
&drm->buffer_interface))
return wl_resource_get_user_data(resource);
else
return NULL;
}
struct wl_drm *
wayland_drm_init(struct wl_display *display, char *device_name,
struct wayland_drm_callbacks *callbacks, void *user_data,
@@ -272,11 +247,7 @@ wayland_drm_init(struct wl_display *display, char *device_name,
drm->user_data = user_data;
drm->flags = flags;
drm->buffer_interface.destroy = buffer_destroy;
drm->wl_drm_global =
wl_global_create(display, &wl_drm_interface, 2,
drm, bind_drm);
wl_display_add_global(display, &wl_drm_interface, drm, bind_drm);
return drm;
}
@@ -286,19 +257,30 @@ wayland_drm_uninit(struct wl_drm *drm)
{
free(drm->device_name);
wl_global_destroy(drm->wl_drm_global);
/* FIXME: need wl_display_del_{object,global} */
free(drm);
}
uint32_t
wayland_drm_buffer_get_format(struct wl_drm_buffer *buffer)
int
wayland_buffer_is_drm(struct wl_buffer *buffer)
{
return buffer->resource.object.implementation ==
(void (**)(void)) &drm_buffer_interface;
}
uint32_t
wayland_drm_buffer_get_format(struct wl_buffer *buffer_base)
{
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) buffer_base;
return buffer->format;
}
void *
wayland_drm_buffer_get_buffer(struct wl_drm_buffer *buffer)
wayland_drm_buffer_get_buffer(struct wl_buffer *buffer_base)
{
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) buffer_base;
return buffer->driver_buffer;
}

View File

@@ -70,9 +70,8 @@ enum wl_drm_format {
struct wl_drm;
struct wl_drm_buffer {
struct wl_resource *resource;
struct wl_buffer buffer;
struct wl_drm *drm;
int32_t width, height;
uint32_t format;
const void *driver_format;
int32_t offset[3];
@@ -91,9 +90,6 @@ struct wayland_drm_callbacks {
enum { WAYLAND_DRM_PRIME = 0x01 };
struct wl_drm_buffer *
wayland_drm_buffer_get(struct wl_drm *drm, struct wl_resource *resource);
struct wl_drm *
wayland_drm_init(struct wl_display *display, char *device_name,
struct wayland_drm_callbacks *callbacks, void *user_data,
@@ -102,10 +98,13 @@ wayland_drm_init(struct wl_display *display, char *device_name,
void
wayland_drm_uninit(struct wl_drm *drm);
int
wayland_buffer_is_drm(struct wl_buffer *buffer);
uint32_t
wayland_drm_buffer_get_format(struct wl_drm_buffer *buffer);
wayland_drm_buffer_get_format(struct wl_buffer *buffer_base);
void *
wayland_drm_buffer_get_buffer(struct wl_drm_buffer *buffer);
wayland_drm_buffer_get_buffer(struct wl_buffer *buffer);
#endif

View File

@@ -2,7 +2,6 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = wayland-egl.pc
AM_CFLAGS = $(DEFINES) \
$(VISIBILITY_CFLAGS) \
$(WAYLAND_CFLAGS)
lib_LTLIBRARIES = libwayland-egl.la

View File

@@ -6,6 +6,5 @@ includedir=@includedir@
Name: wayland-egl
Description: Mesa wayland-egl library
Version: @VERSION@
Requires: wayland-client
Libs: -L${libdir} -lwayland-egl
Cflags: -I${includedir}

View File

@@ -48,7 +48,10 @@ endif
ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
SUBDIRS += \
winsys/nouveau/drm \
drivers/nouveau
drivers/nouveau \
drivers/nvfx \
drivers/nv50 \
drivers/nvc0
endif
# r300g/r600g/radeonsi
@@ -58,7 +61,7 @@ ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
SUBDIRS += drivers/r300
endif
ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
SUBDIRS += drivers/r600
SUBDIRS += drivers/r600 drivers/radeon
endif
ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
SUBDIRS += drivers/radeonsi

View File

@@ -45,6 +45,9 @@ if not env['embedded']:
if env['dri']:
SConscript('state_trackers/dri/SConscript')
if env['dri'] and env['xorg']:
SConscript('state_trackers/xorg/SConscript')
if env['platform'] == 'windows':
SConscript('state_trackers/wgl/SConscript')
@@ -119,7 +122,6 @@ if not env['embedded']:
if env['platform'] == 'haiku':
SConscript([
'targets/haiku-softpipe/SConscript',
'targets/libgl-haiku/SConscript',
])
if env['dri']:
@@ -133,6 +135,11 @@ if not env['embedded']:
'targets/dri-i915/SConscript',
])
if env['xorg'] and env['drm']:
SConscript([
#'targets/xorg-i915/SConscript',
])
#
# Unit tests & tools

View File

@@ -25,6 +25,12 @@ AM_CXXFLAGS += \
$(GALLIUM_CFLAGS) \
$(LLVM_CXXFLAGS)
if LLVM_NEEDS_FNORTTI
AM_CXXFLAGS += -fno-rtti
endif
libgallium_la_SOURCES += \
$(GALLIVM_SOURCES) \
$(GALLIVM_CPP_SOURCES)
@@ -32,17 +38,13 @@ libgallium_la_SOURCES += \
endif
indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py
$(MKDIR_P) indices
$(AM_V_GEN) $(PYTHON2) $< > $@
indices/u_unfilled_gen.c: $(srcdir)/indices/u_unfilled_gen.py
$(MKDIR_P) indices
$(AM_V_GEN) $(PYTHON2) $< > $@
util/u_format_srgb.c: $(srcdir)/util/u_format_srgb.py
$(MKDIR_P) util
$(AM_V_GEN) $(PYTHON2) $< > $@
util/u_format_table.c: $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format_pack.py $(srcdir)/util/u_format_parse.py $(srcdir)/util/u_format.csv
$(MKDIR_P) util
$(AM_V_GEN) $(PYTHON2) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@

View File

@@ -43,9 +43,7 @@ C_SOURCES := \
hud/hud_cpu.c \
hud/hud_fps.c \
hud/hud_driver_query.c \
indices/u_primconvert.c \
os/os_misc.c \
os/os_process.c \
os/os_time.c \
pipebuffer/pb_buffer_fenced.c \
pipebuffer/pb_buffer_malloc.c \
@@ -165,7 +163,6 @@ GENERATED_SOURCES := \
GALLIVM_SOURCES := \
gallivm/lp_bld_arit.c \
gallivm/lp_bld_arit_overflow.c \
gallivm/lp_bld_assert.c \
gallivm/lp_bld_bitarit.c \
gallivm/lp_bld_const.c \
@@ -174,7 +171,6 @@ GALLIVM_SOURCES := \
gallivm/lp_bld_format_aos.c \
gallivm/lp_bld_format_aos_array.c \
gallivm/lp_bld_format_float.c \
gallivm/lp_bld_format_srgb.c \
gallivm/lp_bld_format_soa.c \
gallivm/lp_bld_format_yuv.c \
gallivm/lp_bld_gather.c \

View File

@@ -111,7 +111,6 @@ struct cso_context {
void *velements, *velements_saved;
struct pipe_query *render_condition, *render_condition_saved;
uint render_condition_mode, render_condition_mode_saved;
boolean render_condition_cond, render_condition_cond_saved;
struct pipe_clip_state clip;
struct pipe_clip_state clip_saved;
@@ -304,28 +303,16 @@ void cso_release_all( struct cso_context *ctx )
if (ctx->pipe) {
ctx->pipe->bind_blend_state( ctx->pipe, NULL );
ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL );
{
static struct pipe_sampler_view *views[PIPE_MAX_SAMPLERS] = { NULL };
static void *zeros[PIPE_MAX_SAMPLERS] = { NULL };
struct pipe_screen *scr = ctx->pipe->screen;
unsigned sh;
for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) {
int max = scr->get_shader_param(scr, sh,
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS);
assert(max <= PIPE_MAX_SAMPLERS);
if (max > 0) {
ctx->pipe->bind_sampler_states(ctx->pipe, sh, 0, max, zeros);
ctx->pipe->set_sampler_views(ctx->pipe, sh, 0, max, views);
}
}
}
ctx->pipe->bind_fragment_sampler_states( ctx->pipe, 0, NULL );
if (ctx->pipe->bind_vertex_sampler_states)
ctx->pipe->bind_vertex_sampler_states(ctx->pipe, 0, NULL);
ctx->pipe->bind_depth_stencil_alpha_state( ctx->pipe, NULL );
ctx->pipe->bind_fs_state( ctx->pipe, NULL );
ctx->pipe->bind_vs_state( ctx->pipe, NULL );
ctx->pipe->bind_vertex_elements_state( ctx->pipe, NULL );
ctx->pipe->set_fragment_sampler_views(ctx->pipe, 0, NULL);
if (ctx->pipe->set_vertex_sampler_views)
ctx->pipe->set_vertex_sampler_views(ctx->pipe, 0, NULL);
if (ctx->pipe->set_stream_output_targets)
ctx->pipe->set_stream_output_targets(ctx->pipe, 0, NULL, 0);
}
@@ -736,17 +723,13 @@ void cso_restore_stencil_ref(struct cso_context *ctx)
}
void cso_set_render_condition(struct cso_context *ctx,
struct pipe_query *query,
boolean condition, uint mode)
struct pipe_query *query, uint mode)
{
struct pipe_context *pipe = ctx->pipe;
if (ctx->render_condition != query ||
ctx->render_condition_mode != mode ||
ctx->render_condition_cond != condition) {
pipe->render_condition(pipe, query, condition, mode);
if (ctx->render_condition != query || ctx->render_condition_mode != mode) {
pipe->render_condition(pipe, query, mode);
ctx->render_condition = query;
ctx->render_condition_cond = condition;
ctx->render_condition_mode = mode;
}
}
@@ -754,14 +737,12 @@ void cso_set_render_condition(struct cso_context *ctx,
void cso_save_render_condition(struct cso_context *ctx)
{
ctx->render_condition_saved = ctx->render_condition;
ctx->render_condition_cond_saved = ctx->render_condition_cond;
ctx->render_condition_mode_saved = ctx->render_condition_mode;
}
void cso_restore_render_condition(struct cso_context *ctx)
{
cso_set_render_condition(ctx, ctx->render_condition_saved,
ctx->render_condition_cond_saved,
ctx->render_condition_mode_saved);
}
@@ -1089,17 +1070,27 @@ single_sampler_done(struct cso_context *ctx, unsigned shader_stage)
memcpy(info->hw.samplers,
info->samplers,
info->nr_samplers * sizeof(void *));
/* set remaining slots/pointers to null */
for (i = info->nr_samplers; i < info->hw.nr_samplers; i++)
info->samplers[i] = NULL;
ctx->pipe->bind_sampler_states(ctx->pipe, shader_stage, 0,
MAX2(info->nr_samplers,
info->hw.nr_samplers),
info->samplers);
info->hw.nr_samplers = info->nr_samplers;
switch (shader_stage) {
case PIPE_SHADER_FRAGMENT:
ctx->pipe->bind_fragment_sampler_states(ctx->pipe,
info->nr_samplers,
info->samplers);
break;
case PIPE_SHADER_VERTEX:
ctx->pipe->bind_vertex_sampler_states(ctx->pipe,
info->nr_samplers,
info->samplers);
break;
case PIPE_SHADER_GEOMETRY:
ctx->pipe->bind_geometry_sampler_states(ctx->pipe,
info->nr_samplers,
info->samplers);
break;
default:
assert(!"bad shader type in single_sampler_done()");
}
}
}
@@ -1185,8 +1176,19 @@ cso_set_sampler_views(struct cso_context *ctx,
info->nr_views = count;
/* bind the new sampler views */
ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0, count,
info->views);
switch (shader_stage) {
case PIPE_SHADER_FRAGMENT:
ctx->pipe->set_fragment_sampler_views(ctx->pipe, count, info->views);
break;
case PIPE_SHADER_VERTEX:
ctx->pipe->set_vertex_sampler_views(ctx->pipe, count, info->views);
break;
case PIPE_SHADER_GEOMETRY:
ctx->pipe->set_geometry_sampler_views(ctx->pipe, count, info->views);
break;
default:
assert(!"bad shader type in cso_set_sampler_views()");
}
}
@@ -1210,7 +1212,6 @@ cso_restore_sampler_views(struct cso_context *ctx, unsigned shader_stage)
{
struct sampler_info *info = &ctx->samplers[shader_stage];
unsigned i, nr_saved = info->nr_views_saved;
unsigned num;
for (i = 0; i < nr_saved; i++) {
pipe_sampler_view_reference(&info->views[i], NULL);
@@ -1222,10 +1223,20 @@ cso_restore_sampler_views(struct cso_context *ctx, unsigned shader_stage)
pipe_sampler_view_reference(&info->views[i], NULL);
}
num = MAX2(info->nr_views, nr_saved);
/* bind the old/saved sampler views */
ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0, num, info->views);
switch (shader_stage) {
case PIPE_SHADER_FRAGMENT:
ctx->pipe->set_fragment_sampler_views(ctx->pipe, nr_saved, info->views);
break;
case PIPE_SHADER_VERTEX:
ctx->pipe->set_vertex_sampler_views(ctx->pipe, nr_saved, info->views);
break;
case PIPE_SHADER_GEOMETRY:
ctx->pipe->set_geometry_sampler_views(ctx->pipe, nr_saved, info->views);
break;
default:
assert(!"bad shader type in cso_restore_sampler_views()");
}
info->nr_views = nr_saved;
info->nr_views_saved = 0;

View File

@@ -170,8 +170,7 @@ void cso_save_stencil_ref(struct cso_context *cso);
void cso_restore_stencil_ref(struct cso_context *cso);
void cso_set_render_condition(struct cso_context *cso,
struct pipe_query *query,
boolean condition, uint mode);
struct pipe_query *query, uint mode);
void cso_save_render_condition(struct cso_context *cso);
void cso_restore_render_condition(struct cso_context *cso);

View File

@@ -140,7 +140,7 @@ static boolean TAG(do_cliptest)( struct pt_post_vs *pvs,
clipdist = out->data[cd[0]][i];
else
clipdist = out->data[cd[1]][i-4];
if (clipdist < 0 || util_is_inf_or_nan(clipdist))
if (clipdist < 0)
mask |= 1 << plane_idx;
} else {
if (dot4(clipvertex, plane[plane_idx]) < 0)

View File

@@ -38,10 +38,7 @@
#include "util/u_inlines.h"
#include "util/u_helpers.h"
#include "util/u_prim.h"
#include "util/u_format.h"
#include "draw_context.h"
#include "draw_pipe.h"
#include "draw_prim_assembler.h"
#include "draw_vs.h"
#include "draw_gs.h"
@@ -61,7 +58,7 @@ draw_get_option_use_llvm(void)
#ifdef PIPE_ARCH_X86
util_cpu_detect();
/* require SSE2 due to LLVM PR6960. XXX Might be fixed by now? */
/* require SSE2 due to LLVM PR6960. */
if (!util_cpu_caps.has_sse2)
value = FALSE;
#endif
@@ -81,9 +78,6 @@ draw_create_context(struct pipe_context *pipe, boolean try_llvm)
if (draw == NULL)
goto err_out;
/* we need correct cpu caps for disabling denorms in draw_vbo() */
util_cpu_detect();
#if HAVE_LLVM
if (try_llvm && draw_get_option_use_llvm()) {
draw->llvm = draw_llvm_create(draw);
@@ -97,10 +91,6 @@ draw_create_context(struct pipe_context *pipe, boolean try_llvm)
if (!draw_init(draw))
goto err_destroy;
draw->ia = draw_prim_assembler_create(draw);
if (!draw->ia)
goto err_destroy;
return draw;
err_destroy:
@@ -148,7 +138,6 @@ boolean draw_init(struct draw_context *draw)
draw->clip_z = TRUE;
draw->pt.user.planes = (float (*) [DRAW_TOTAL_CLIP_PLANES][4]) &(draw->plane[0]);
draw->pt.user.eltMax = ~0;
if (!draw_pipeline_init( draw ))
return FALSE;
@@ -165,8 +154,6 @@ boolean draw_init(struct draw_context *draw)
draw->quads_always_flatshade_last = !draw->pipe->screen->get_param(
draw->pipe->screen, PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION);
draw->floating_point_depth = false;
return TRUE;
}
@@ -214,7 +201,6 @@ void draw_destroy( struct draw_context *draw )
draw->render->destroy( draw->render );
*/
draw_prim_assembler_destroy(draw->ia);
draw_pipeline_destroy( draw );
draw_pt_destroy( draw );
draw_vs_destroy( draw );
@@ -236,20 +222,15 @@ void draw_flush( struct draw_context *draw )
/**
* Specify the depth stencil format for the draw pipeline. This function
* determines the Minimum Resolvable Depth factor for polygon offset.
* Specify the Minimum Resolvable Depth factor for polygon offset.
* This factor potentially depends on the number of Z buffer bits,
* the rasterization algorithm and the arithmetic performed on Z
* values between vertex shading and rasterization.
* values between vertex shading and rasterization. It will vary
* from one driver to another.
*/
void draw_set_zs_format(struct draw_context *draw, enum pipe_format format)
void draw_set_mrd(struct draw_context *draw, double mrd)
{
const struct util_format_description *desc = util_format_description(format);
draw->floating_point_depth =
(util_get_depth_format_type(desc) == UTIL_FORMAT_TYPE_FLOAT);
draw->mrd = util_get_depth_format_mrd(desc);
draw->mrd = mrd;
}
@@ -555,28 +536,6 @@ draw_get_shader_info(const struct draw_context *draw)
}
}
/**
* Prepare outputs slots from the draw module
*
* Certain parts of the draw module can emit additional
* outputs that can be quite useful to the backends, a good
* example of it is the process of decomposing primitives
* into wireframes (aka. lines) which normally would lose
* the face-side information, but using this method we can
* inject another shader output which passes the original
* face side information to the backend.
*/
void
draw_prepare_shader_outputs(struct draw_context *draw)
{
draw_remove_extra_vertex_attribs(draw);
draw_prim_assembler_prepare_outputs(draw->ia);
draw_unfilled_prepare_outputs(draw, draw->pipeline.unfilled);
if (draw->pipeline.aapoint)
draw_aapoint_prepare_outputs(draw, draw->pipeline.aapoint);
if (draw->pipeline.aaline)
draw_aaline_prepare_outputs(draw, draw->pipeline.aaline);
}
/**
* Ask the draw module for the location/slot of the given vertex attribute in
@@ -641,40 +600,6 @@ draw_num_shader_outputs(const struct draw_context *draw)
}
/**
* Return total number of the vertex shader outputs. This function
* also counts any extra vertex output attributes that may
* be filled in by some draw stages (such as AA point, AA line,
* front face).
*/
uint
draw_total_vs_outputs(const struct draw_context *draw)
{
const struct tgsi_shader_info *info = &draw->vs.vertex_shader->info;
return info->num_outputs + draw->extra_shader_outputs.num;;
}
/**
* Return total number of the geometry shader outputs. This function
* also counts any extra geometry output attributes that may
* be filled in by some draw stages (such as AA point, AA line, front
* face).
*/
uint
draw_total_gs_outputs(const struct draw_context *draw)
{
const struct tgsi_shader_info *info;
if (!draw->gs.geometry_shader)
return 0;
info = &draw->gs.geometry_shader->info;
return info->num_outputs + draw->extra_shader_outputs.num;
}
/**
* Provide TGSI sampler objects for vertex/geometry shaders that use
* texture fetches. This state only needs to be set once per context.
@@ -813,7 +738,6 @@ draw_current_shader_clipvertex_output(const struct draw_context *draw)
uint
draw_current_shader_clipdistance_output(const struct draw_context *draw, int index)
{
debug_assert(index < PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT);
if (draw->gs.geometry_shader)
return draw->gs.geometry_shader->clipdistance_output[index];
return draw->vs.clipdistance_output[index];
@@ -832,7 +756,6 @@ draw_current_shader_num_written_clipdistances(const struct draw_context *draw)
uint
draw_current_shader_culldistance_output(const struct draw_context *draw, int index)
{
debug_assert(index < PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT);
if (draw->gs.geometry_shader)
return draw->gs.geometry_shader->culldistance_output[index];
return draw->vs.vertex_shader->culldistance_output[index];
@@ -1044,29 +967,3 @@ draw_stats_clipper_primitives(struct draw_context *draw,
}
}
}
/**
* Returns true if the draw module will inject the frontface
* info into the outputs.
*
* Given the specified primitive and rasterizer state
* the function will figure out if the draw module
* will inject the front-face information into shader
* outputs. This is done to preserve the front-facing
* info when decomposing primitives into wireframes.
*/
boolean
draw_will_inject_frontface(const struct draw_context *draw)
{
unsigned reduced_prim = u_reduced_prim(draw->pt.prim);
const struct pipe_rasterizer_state *rast = draw->rasterizer;
if (reduced_prim != PIPE_PRIM_TRIANGLES) {
return FALSE;
}
return (rast &&
(rast->fill_front != PIPE_POLYGON_MODE_FILL ||
rast->fill_back != PIPE_POLYGON_MODE_FILL));
}

View File

@@ -111,7 +111,7 @@ void draw_enable_line_stipple(struct draw_context *draw, boolean enable);
void draw_enable_point_sprites(struct draw_context *draw, boolean enable);
void draw_set_zs_format(struct draw_context *draw, enum pipe_format format);
void draw_set_mrd(struct draw_context *draw, double mrd);
boolean
draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe);
@@ -126,24 +126,13 @@ draw_install_pstipple_stage(struct draw_context *draw, struct pipe_context *pipe
struct tgsi_shader_info *
draw_get_shader_info(const struct draw_context *draw);
void
draw_prepare_shader_outputs(struct draw_context *draw);
int
draw_find_shader_output(const struct draw_context *draw,
uint semantic_name, uint semantic_index);
boolean
draw_will_inject_frontface(const struct draw_context *draw);
uint
draw_num_shader_outputs(const struct draw_context *draw);
uint
draw_total_vs_outputs(const struct draw_context *draw);
uint
draw_total_gs_outputs(const struct draw_context *draw);
void
draw_texture_sampler(struct draw_context *draw,

View File

@@ -126,8 +126,7 @@ static void tgsi_fetch_gs_input(struct draw_geometry_shader *shader,
unsigned prim_idx)
{
struct tgsi_exec_machine *machine = shader->machine;
unsigned slot, i;
int vs_slot;
unsigned slot, vs_slot, i;
unsigned input_vertex_stride = shader->input_vertex_stride;
const float (*input_ptr)[4];
@@ -226,8 +225,7 @@ llvm_fetch_gs_input(struct draw_geometry_shader *shader,
unsigned num_vertices,
unsigned prim_idx)
{
unsigned slot, i;
int vs_slot;
unsigned slot, vs_slot, i;
unsigned input_vertex_stride = shader->input_vertex_stride;
const float (*input_ptr)[4];
float (*input_data)[6][PIPE_MAX_SHADER_INPUTS][TGSI_NUM_CHANNELS][TGSI_NUM_CHANNELS] = &shader->gs_input->data;
@@ -536,7 +534,7 @@ int draw_geometry_shader_run(struct draw_geometry_shader *shader,
{
const float (*input)[4] = (const float (*)[4])input_verts->verts->data;
unsigned input_stride = input_verts->vertex_size;
unsigned num_outputs = draw_total_gs_outputs(shader->draw);
unsigned num_outputs = shader->info.num_outputs;
unsigned vertex_size = sizeof(struct vertex_header) + num_outputs * 4 * sizeof(float);
unsigned num_input_verts = input_prim->linear ?
input_verts->count :
@@ -794,13 +792,13 @@ draw_create_geometry_shader(struct draw_context *draw,
if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_VIEWPORT_INDEX)
gs->viewport_index_output = i;
if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_CLIPDIST) {
debug_assert(gs->info.output_semantic_index[i] <
PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT);
gs->clipdistance_output[gs->info.output_semantic_index[i]] = i;
if (gs->info.output_semantic_index[i] == 0)
gs->clipdistance_output[0] = i;
else
gs->clipdistance_output[1] = i;
}
if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_CULLDIST) {
debug_assert(gs->info.output_semantic_index[i] <
PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT);
debug_assert(gs->info.output_semantic_index[i] < Elements(gs->culldistance_output));
gs->culldistance_output[gs->info.output_semantic_index[i]] = i;
}
}

View File

@@ -67,8 +67,8 @@ struct draw_geometry_shader {
struct tgsi_shader_info info;
unsigned position_output;
unsigned viewport_index_output;
unsigned clipdistance_output[PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT];
unsigned culldistance_output[PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT];
unsigned clipdistance_output[2];
unsigned culldistance_output[2];
unsigned max_output_vertices;
unsigned primitive_boundary;

View File

@@ -32,7 +32,6 @@
#include "draw_gs.h"
#include "gallivm/lp_bld_arit.h"
#include "gallivm/lp_bld_arit_overflow.h"
#include "gallivm/lp_bld_logic.h"
#include "gallivm/lp_bld_const.h"
#include "gallivm/lp_bld_swizzle.h"
@@ -674,7 +673,6 @@ generate_vs(struct draw_llvm_variant *variant,
static void
generate_fetch(struct gallivm_state *gallivm,
struct draw_context *draw,
LLVMValueRef vbuffers_ptr,
LLVMValueRef *res,
struct pipe_vertex_element *velem,
@@ -697,57 +695,35 @@ generate_fetch(struct gallivm_state *gallivm,
LLVMValueRef buffer_size = draw_jit_dvbuffer_size(gallivm, vbuffer_ptr);
LLVMValueRef stride;
LLVMValueRef buffer_overflowed;
LLVMValueRef needed_buffer_size;
LLVMValueRef temp_ptr =
lp_build_alloca(gallivm,
lp_build_vec_type(gallivm, lp_float32_vec4_type()), "");
LLVMValueRef ofbit = NULL;
struct lp_build_if_state if_ctx;
if (velem->instance_divisor) {
/* Index is equal to the start instance plus the number of current
* instance divided by the divisor. In this case we compute it as:
* index = start_instance + (instance_id / divisor)
*/
LLVMValueRef current_instance;
index = lp_build_const_int32(gallivm, draw->start_instance);
current_instance = LLVMBuildUDiv(builder, instance_id,
lp_build_const_int32(gallivm, velem->instance_divisor),
"instance_divisor");
index = lp_build_uadd_overflow(gallivm, index, current_instance, &ofbit);
/* array index = instance_id / instance_divisor */
index = LLVMBuildUDiv(builder, instance_id,
lp_build_const_int32(gallivm, velem->instance_divisor),
"instance_divisor");
}
stride = lp_build_umul_overflow(gallivm, vb_stride, index, &ofbit);
stride = lp_build_uadd_overflow(gallivm, stride, vb_buffer_offset, &ofbit);
stride = lp_build_uadd_overflow(
gallivm, stride,
lp_build_const_int32(gallivm, velem->src_offset), &ofbit);
needed_buffer_size = lp_build_uadd_overflow(
gallivm, stride,
lp_build_const_int32(gallivm,
util_format_get_blocksize(velem->src_format)),
&ofbit);
stride = LLVMBuildMul(builder, vb_stride, index, "");
buffer_overflowed = LLVMBuildICmp(builder, LLVMIntUGT,
needed_buffer_size, buffer_size,
stride = LLVMBuildAdd(builder, stride,
vb_buffer_offset,
"");
stride = LLVMBuildAdd(builder, stride,
lp_build_const_int32(gallivm, velem->src_offset),
"");
buffer_overflowed = LLVMBuildICmp(builder, LLVMIntUGE,
stride, buffer_size,
"buffer_overflowed");
buffer_overflowed = LLVMBuildOr(builder, buffer_overflowed, ofbit, "");
#if 0
lp_build_printf(gallivm, "vbuf index = %u, vb_stride is %u\n",
index, vb_stride);
lp_build_printf(gallivm, " vb_buffer_offset = %u, src_offset is %u\n",
vb_buffer_offset,
lp_build_const_int32(gallivm, velem->src_offset));
lp_build_print_value(gallivm, " blocksize = ",
lp_build_const_int32(
gallivm,
util_format_get_blocksize(velem->src_format)));
lp_build_printf(gallivm, " instance_id = %u\n", instance_id);
lp_build_printf(gallivm, " stride = %u\n", stride);
lp_build_printf(gallivm, " buffer size = %u\n", buffer_size);
lp_build_printf(gallivm, " needed_buffer_size = %u\n", needed_buffer_size);
/*
lp_build_printf(gallivm, "vbuf index = %d, stride is %d\n", indices, stride);
lp_build_print_value(gallivm, " buffer size = ", buffer_size);
lp_build_print_value(gallivm, " buffer overflowed = ", buffer_overflowed);
#endif
*/
lp_build_if(&if_ctx, gallivm, buffer_overflowed);
{
@@ -977,12 +953,6 @@ convert_to_aos(struct gallivm_state *gallivm,
LLVMConstInt(LLVMInt32TypeInContext(gallivm->context),
chan, 0));
lp_build_print_value(gallivm, "val = ", out);
{
LLVMValueRef iv =
LLVMBuildBitCast(builder, out, lp_build_int_vec_type(gallivm, soa_type), "");
lp_build_print_value(gallivm, " ival = ", iv);
}
#endif
soa[chan] = out;
}
@@ -1036,9 +1006,6 @@ store_clip(struct gallivm_state *gallivm,
LLVMValueRef io_ptrs[LP_MAX_VECTOR_WIDTH / 32];
LLVMValueRef inds[LP_MAX_VECTOR_WIDTH / 32];
LLVMValueRef clip_ptrs[LP_MAX_VECTOR_WIDTH / 32];
LLVMTypeRef clip_ptr_type =
LLVMPointerType(LLVMVectorType(LLVMFloatTypeInContext(gallivm->context),
4), 0);
int i, j;
indices[0] =
@@ -1073,6 +1040,7 @@ store_clip(struct gallivm_state *gallivm,
}
for (j = 0; j < vs_type.length; j++) {
LLVMTypeRef clip_ptr_type = LLVMPointerType(LLVMVectorType(LLVMFloatTypeInContext(gallivm->context), 4), 0);
LLVMValueRef clip_ptr;
clip_ptr = LLVMBuildGEP(builder, clip_ptrs[j], indices, 2, "clipo");
@@ -1263,7 +1231,6 @@ generate_clipmask(struct draw_llvm *llvm,
if (clip_user) {
LLVMValueRef planes_ptr = draw_jit_context_planes(gallivm, context_ptr);
LLVMValueRef indices[3];
LLVMValueRef is_nan_or_inf;
/* userclip planes */
while (ucp_enable) {
@@ -1283,8 +1250,6 @@ generate_clipmask(struct draw_llvm *llvm,
clipdist = LLVMBuildLoad(builder, outputs[cd[1]][i-4], "");
}
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, clipdist);
is_nan_or_inf = lp_build_is_inf_or_nan(gallivm, vs_type, clipdist);
test = LLVMBuildOr(builder, test, is_nan_or_inf, "");
temp = lp_build_const_int_vec(gallivm, i32_type, 1 << plane_idx);
test = LLVMBuildAnd(builder, test, temp, "");
mask = LLVMBuildOr(builder, mask, test, "");
@@ -1362,9 +1327,8 @@ clipmask_booli32(struct gallivm_state *gallivm,
static LLVMValueRef
draw_gs_llvm_fetch_input(const struct lp_build_tgsi_gs_iface *gs_iface,
struct lp_build_tgsi_context * bld_base,
boolean is_vindex_indirect,
boolean is_indirect,
LLVMValueRef vertex_index,
boolean is_aindex_indirect,
LLVMValueRef attrib_index,
LLVMValueRef swizzle_index)
{
@@ -1375,28 +1339,18 @@ draw_gs_llvm_fetch_input(const struct lp_build_tgsi_gs_iface *gs_iface,
LLVMValueRef res;
struct lp_type type = bld_base->base.type;
if (is_vindex_indirect || is_aindex_indirect) {
if (is_indirect) {
int i;
res = bld_base->base.zero;
for (i = 0; i < type.length; ++i) {
LLVMValueRef idx = lp_build_const_int32(gallivm, i);
LLVMValueRef vert_chan_index = vertex_index;
LLVMValueRef attr_chan_index = attrib_index;
LLVMValueRef vert_chan_index = LLVMBuildExtractElement(builder,
vertex_index, idx, "");
LLVMValueRef channel_vec, value;
if (is_vindex_indirect) {
vert_chan_index = LLVMBuildExtractElement(builder,
vertex_index, idx, "");
}
if (is_aindex_indirect) {
attr_chan_index = LLVMBuildExtractElement(builder,
attrib_index, idx, "");
}
indices[0] = vert_chan_index;
indices[1] = attr_chan_index;
indices[1] = attrib_index;
indices[2] = swizzle_index;
channel_vec = LLVMBuildGEP(builder, gs->input, indices, 3, "");
channel_vec = LLVMBuildLoad(builder, channel_vec, "");
value = LLVMBuildExtractElement(builder, channel_vec, idx, "");
@@ -1508,7 +1462,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
struct gallivm_state *gallivm = variant->gallivm;
LLVMContextRef context = gallivm->context;
LLVMTypeRef int32_type = LLVMInt32TypeInContext(context);
LLVMTypeRef arg_types[10];
LLVMTypeRef arg_types[9];
unsigned num_arg_types =
elts ? Elements(arg_types) : Elements(arg_types) - 1;
LLVMTypeRef func_type;
@@ -1518,7 +1472,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
struct lp_type vs_type;
LLVMValueRef end, start;
LLVMValueRef count, fetch_elts, fetch_elt_max, fetch_count;
LLVMValueRef vertex_id_offset;
LLVMValueRef stride, step, io_itr;
LLVMValueRef io_ptr, vbuffers_ptr, vb_ptr;
LLVMValueRef zero = lp_build_const_int32(gallivm, 0);
@@ -1564,7 +1517,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
arg_types[i++] = int32_type; /* stride */
arg_types[i++] = get_vb_ptr_type(variant); /* pipe_vertex_buffer's */
arg_types[i++] = int32_type; /* instance_id */
arg_types[i++] = int32_type; /* vertex_id_offset */
func_type = LLVMFunctionType(int32_type, arg_types, num_arg_types, 0);
@@ -1589,7 +1541,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
stride = LLVMGetParam(variant_func, 5 + (elts ? 1 : 0));
vb_ptr = LLVMGetParam(variant_func, 6 + (elts ? 1 : 0));
system_values.instance_id = LLVMGetParam(variant_func, 7 + (elts ? 1 : 0));
vertex_id_offset = LLVMGetParam(variant_func, 8 + (elts ? 1 : 0));
lp_build_name(context_ptr, "context");
lp_build_name(io_ptr, "io");
@@ -1597,7 +1548,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
lp_build_name(stride, "stride");
lp_build_name(vb_ptr, "vb");
lp_build_name(system_values.instance_id, "instance_id");
lp_build_name(vertex_id_offset, "vertex_id_offset");
if (elts) {
fetch_elts = LLVMGetParam(variant_func, 3);
@@ -1645,7 +1595,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
if (elts) {
start = zero;
end = fetch_count;
count = fetch_count;
}
else {
end = lp_build_add(&bld, start, count);
@@ -1655,7 +1604,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
fetch_max = LLVMBuildSub(builder, end, one, "fetch_max");
lp_build_loop_begin(&lp_loop, gallivm, zero);
lp_build_loop_begin(&lp_loop, gallivm, start);
{
LLVMValueRef inputs[PIPE_MAX_SHADER_INPUTS][TGSI_NUM_CHANNELS];
LLVMValueRef aos_attribs[PIPE_MAX_SHADER_INPUTS][LP_MAX_VECTOR_WIDTH / 32] = { { 0 } };
@@ -1663,7 +1612,10 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
LLVMValueRef clipmask; /* holds the clipmask value */
const LLVMValueRef (*ptr_aos)[TGSI_NUM_CHANNELS];
io_itr = lp_loop.counter;
if (elts)
io_itr = lp_loop.counter;
else
io_itr = LLVMBuildSub(builder, lp_loop.counter, start, "");
io = LLVMBuildGEP(builder, io_ptr, &io_itr, 1, "");
#if DEBUG_STORE
@@ -1672,19 +1624,21 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
#endif
system_values.vertex_id = lp_build_zero(gallivm, lp_type_uint_vec(32, 32*vector_length));
for (i = 0; i < vector_length; ++i) {
LLVMValueRef vert_index =
LLVMValueRef true_index =
LLVMBuildAdd(builder,
lp_loop.counter,
lp_build_const_int32(gallivm, i), "");
LLVMValueRef true_index =
LLVMBuildAdd(builder, start, vert_index, "");
LLVMValueRef vertex_id;
/* make sure we're not out of bounds which can happen
* if fetch_count % 4 != 0, because on the last iteration
* a few of the 4 vertex fetches will be out of bounds */
true_index = lp_build_min(&bld, true_index, fetch_max);
system_values.vertex_id = LLVMBuildInsertElement(
gallivm->builder,
system_values.vertex_id, true_index,
lp_build_const_int32(gallivm, i), "");
if (elts) {
LLVMValueRef fetch_ptr;
LLVMValueRef index_overflowed;
@@ -1693,10 +1647,10 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
gallivm,
lp_build_vec_type(gallivm, lp_type_int(32)), "");
struct lp_build_if_state if_ctx;
index_overflowed = LLVMBuildICmp(builder, LLVMIntUGT,
index_overflowed = LLVMBuildICmp(builder, LLVMIntUGE,
true_index, fetch_elt_max,
"index_overflowed");
lp_build_if(&if_ctx, gallivm, index_overflowed);
{
/* Generate maximum possible index so that
@@ -1721,30 +1675,13 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
lp_build_endif(&if_ctx);
true_index = LLVMBuildLoad(builder, index_ptr, "true_index");
}
/* in the paths with elts vertex id has to be unaffected by the
* index bias and because indices inside our elements array have
* already had index bias applied we need to subtract it here to
* get back to the original index.
* in the linear paths vertex id has to be unaffected by the
* original start index and because we abuse the 'start' variable
* to either represent the actual start index or the index at which
* the primitive was split (we split rendering into chunks of at
* most 4095-vertices) we need to back out the original start
* index out of our vertex id here.
*/
vertex_id = LLVMBuildSub(builder, true_index, vertex_id_offset, "");
system_values.vertex_id = LLVMBuildInsertElement(
gallivm->builder,
system_values.vertex_id, vertex_id,
lp_build_const_int32(gallivm, i), "");
for (j = 0; j < draw->pt.nr_vertex_elements; ++j) {
struct pipe_vertex_element *velem = &draw->pt.vertex_element[j];
LLVMValueRef vb_index =
lp_build_const_int32(gallivm, velem->vertex_buffer_index);
LLVMValueRef vb = LLVMBuildGEP(builder, vb_ptr, &vb_index, 1, "");
generate_fetch(gallivm, draw, vbuffers_ptr,
generate_fetch(gallivm, vbuffers_ptr,
&aos_attribs[j][i], velem, vb, true_index,
system_values.instance_id);
}
@@ -1807,7 +1744,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant,
vs_info->num_outputs, vs_type,
have_clipdist);
}
lp_build_loop_end_cond(&lp_loop, count, step, LLVMIntUGE);
lp_build_loop_end_cond(&lp_loop, end, step, LLVMIntUGE);
sampler->destroy(sampler);
@@ -1849,7 +1787,6 @@ draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store)
key->need_edgeflags = (llvm->draw->vs.edgeflag_output ? TRUE : FALSE);
key->ucp_enable = llvm->draw->rasterizer->clip_plane_enable;
key->has_gs = llvm->draw->gs.geometry_shader != NULL;
key->num_outputs = draw_total_vs_outputs(llvm->draw);
key->pad1 = 0;
/* All variants of this shader will have the same value for
@@ -2056,19 +1993,31 @@ generate_mask_value(struct draw_gs_llvm_variant *variant,
{
struct gallivm_state *gallivm = variant->gallivm;
LLVMBuilderRef builder = gallivm->builder;
struct lp_type mask_type = lp_int_type(gs_type);
LLVMValueRef num_prims;
LLVMValueRef mask_val = lp_build_const_vec(gallivm, mask_type, 0);
LLVMValueRef bits[16];
struct lp_type mask_type = lp_int_type(gs_type);
struct lp_type mask_elem_type = lp_elem_type(mask_type);
LLVMValueRef mask_val = lp_build_const_vec(gallivm,
mask_type,
0);
unsigned i;
num_prims = lp_build_broadcast(gallivm, lp_build_vec_type(gallivm, mask_type),
variant->num_prims);
for (i = 0; i <= gs_type.length; i++) {
LLVMValueRef idx = lp_build_const_int32(gallivm, i);
mask_val = LLVMBuildInsertElement(builder, mask_val, idx, idx, "");
assert(gs_type.length <= Elements(bits));
for (i = gs_type.length; i >= 1; --i) {
int idx = i - 1;
LLVMValueRef ind = lp_build_const_int32(gallivm, i);
bits[idx] = lp_build_compare(gallivm,
mask_elem_type, PIPE_FUNC_GEQUAL,
variant->num_prims, ind);
}
mask_val = lp_build_compare(gallivm, mask_type,
PIPE_FUNC_GREATER, num_prims, mask_val);
for (i = 0; i < gs_type.length; ++i) {
LLVMValueRef ind = lp_build_const_int32(gallivm, i);
mask_val = LLVMBuildInsertElement(builder, mask_val, bits[i], ind, "");
}
mask_val = lp_build_compare(gallivm,
mask_type, PIPE_FUNC_NOTEQUAL,
mask_val,
lp_build_const_int_vec(gallivm, mask_type, 0));
return mask_val;
}
@@ -2181,11 +2130,6 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
system_values.prim_id = LLVMBuildLoad(builder, prim_id_ptr, "prim_id");;
}
if (gallivm_debug & (GALLIVM_DEBUG_TGSI | GALLIVM_DEBUG_IR)) {
tgsi_dump(tokens, 0);
draw_gs_llvm_dump_variant_key(&variant->key);
}
lp_build_tgsi_soa(variant->gallivm,
tokens,
gs_type,
@@ -2280,8 +2224,6 @@ draw_gs_llvm_make_variant_key(struct draw_llvm *llvm, char *store)
key = (struct draw_gs_llvm_variant_key *)store;
key->num_outputs = draw_total_gs_outputs(llvm->draw);
/* All variants of this shader will have the same value for
* nr_samplers. Not yet trying to compact away holes in the
* sampler array.

View File

@@ -263,8 +263,7 @@ typedef int
unsigned count,
unsigned stride,
struct pipe_vertex_buffer *vertex_buffers,
unsigned instance_id,
unsigned vertex_id_offset);
unsigned instance_id);
typedef int
@@ -276,8 +275,7 @@ typedef int
unsigned fetch_count,
unsigned stride,
struct pipe_vertex_buffer *vertex_buffers,
unsigned instance_id,
unsigned vertex_id_offset);
unsigned instance_id);
typedef int
@@ -301,13 +299,12 @@ struct draw_llvm_variant_key
unsigned bypass_viewport:1;
unsigned need_edgeflags:1;
unsigned has_gs:1;
unsigned num_outputs:8;
/*
* it is important there are no holes in this struct
* (and all padding gets zeroed).
*/
unsigned ucp_enable:PIPE_MAX_CLIP_PLANES;
unsigned pad1:24-PIPE_MAX_CLIP_PLANES;
unsigned pad1:32-PIPE_MAX_CLIP_PLANES;
/* Variable number of vertex elements:
*/
@@ -322,7 +319,6 @@ struct draw_gs_llvm_variant_key
{
unsigned nr_samplers:8;
unsigned nr_sampler_views:8;
unsigned num_outputs:8;
struct draw_sampler_static_state samplers[1];
};

View File

@@ -238,7 +238,6 @@ draw_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base,
const struct lp_derivatives *derivs,
LLVMValueRef lod_bias, /* optional */
LLVMValueRef explicit_lod, /* optional */
enum lp_sampler_lod_property lod_property,
LLVMValueRef *texel)
{
struct draw_llvm_sampler_soa *sampler = (struct draw_llvm_sampler_soa *)base;
@@ -257,7 +256,7 @@ draw_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base,
coords,
offsets,
derivs,
lod_bias, explicit_lod, lod_property,
lod_bias, explicit_lod,
texel);
}
@@ -270,9 +269,7 @@ draw_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base,
struct gallivm_state *gallivm,
struct lp_type type,
unsigned texture_unit,
unsigned target,
boolean is_sviewinfo,
enum lp_sampler_lod_property lod_property,
boolean need_nr_mips,
LLVMValueRef explicit_lod, /* optional */
LLVMValueRef *sizes_out)
{
@@ -285,9 +282,7 @@ draw_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base,
&sampler->dynamic_state.base,
type,
texture_unit,
target,
is_sviewinfo,
lod_property,
need_nr_mips,
explicit_lod,
sizes_out);
}

View File

@@ -35,7 +35,6 @@
#include "pipe/p_compiler.h"
#include "draw_private.h" /* for sizeof(vertex_header) */
#include "draw_context.h"
/**
@@ -92,6 +91,7 @@ extern struct draw_stage *draw_wide_line_stage( struct draw_context *context );
extern struct draw_stage *draw_wide_point_stage( struct draw_context *context );
extern struct draw_stage *draw_validate_stage( struct draw_context *context );
extern void draw_free_temp_verts( struct draw_stage *stage );
extern boolean draw_alloc_temp_verts( struct draw_stage *stage, unsigned nr );
@@ -101,12 +101,7 @@ void draw_pipe_passthrough_tri(struct draw_stage *stage, struct prim_header *hea
void draw_pipe_passthrough_line(struct draw_stage *stage, struct prim_header *header);
void draw_pipe_passthrough_point(struct draw_stage *stage, struct prim_header *header);
void draw_aapoint_prepare_outputs(struct draw_context *context,
struct draw_stage *stage);
void draw_aaline_prepare_outputs(struct draw_context *context,
struct draw_stage *stage);
void draw_unfilled_prepare_outputs(struct draw_context *context,
struct draw_stage *stage);
/**
* Get a writeable copy of a vertex.
@@ -122,7 +117,7 @@ dup_vert( struct draw_stage *stage,
{
struct vertex_header *tmp = stage->tmp[idx];
const uint vsize = sizeof(struct vertex_header)
+ draw_num_shader_outputs(stage->draw) * 4 * sizeof(float);
+ stage->draw->vs.num_vs_outputs * 4 * sizeof(float);
memcpy(tmp, vert, vsize);
tmp->vertex_id = UNDEFINED_VERTEX_ID;
return tmp;

View File

@@ -107,7 +107,7 @@ struct aaline_stage
struct aaline_fragment_shader *fs;
struct {
void *sampler[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view *sampler_views[PIPE_MAX_SHADER_SAMPLER_VIEWS];
struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
} state;
/*
@@ -118,11 +118,11 @@ struct aaline_stage
void (*driver_bind_fs_state)(struct pipe_context *, void *);
void (*driver_delete_fs_state)(struct pipe_context *, void *);
void (*driver_bind_sampler_states)(struct pipe_context *, unsigned, unsigned,
unsigned, void **);
void (*driver_bind_sampler_states)(struct pipe_context *, unsigned,
void **);
void (*driver_set_sampler_views)(struct pipe_context *, unsigned shader,
unsigned start, unsigned count,
void (*driver_set_sampler_views)(struct pipe_context *,
unsigned,
struct pipe_sampler_view **);
};
@@ -692,7 +692,13 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header)
return;
}
draw_aaline_prepare_outputs(draw, draw->pipeline.aaline);
/* update vertex attrib info */
aaline->pos_slot = draw_current_shader_position_output(draw);;
/* allocate the extra post-transformed vertex attribute */
aaline->tex_slot = draw_alloc_extra_vertex_attrib(draw,
TGSI_SEMANTIC_GENERIC,
aaline->fs->generic_attrib);
/* how many samplers? */
/* we'll use sampler/texture[pstip->sampler_unit] for the stipple */
@@ -704,12 +710,8 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header)
aaline->sampler_view);
draw->suspend_flushing = TRUE;
aaline->driver_bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0,
num_samplers, aaline->state.sampler);
aaline->driver_set_sampler_views(pipe, PIPE_SHADER_FRAGMENT, 0,
num_samplers, aaline->state.sampler_views);
aaline->driver_bind_sampler_states(pipe, num_samplers, aaline->state.sampler);
aaline->driver_set_sampler_views(pipe, num_samplers, aaline->state.sampler_views);
/* Disable triangle culling, stippling, unfilled mode etc. */
r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade);
@@ -736,13 +738,10 @@ aaline_flush(struct draw_stage *stage, unsigned flags)
/* restore original frag shader, texture, sampler state */
draw->suspend_flushing = TRUE;
aaline->driver_bind_fs_state(pipe, aaline->fs ? aaline->fs->driver_fs : NULL);
aaline->driver_bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0,
aaline->num_samplers,
aaline->driver_bind_sampler_states(pipe, aaline->num_samplers,
aaline->state.sampler);
aaline->driver_set_sampler_views(pipe, PIPE_SHADER_FRAGMENT, 0,
aaline->num_samplers,
aaline->driver_set_sampler_views(pipe,
aaline->num_sampler_views,
aaline->state.sampler_views);
/* restore original rasterizer state */
@@ -770,7 +769,7 @@ aaline_destroy(struct draw_stage *stage)
struct pipe_context *pipe = stage->draw->pipe;
uint i;
for (i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; i++) {
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
pipe_sampler_view_reference(&aaline->state.sampler_views[i], NULL);
}
@@ -791,8 +790,8 @@ aaline_destroy(struct draw_stage *stage)
pipe->bind_fs_state = aaline->driver_bind_fs_state;
pipe->delete_fs_state = aaline->driver_delete_fs_state;
pipe->bind_sampler_states = aaline->driver_bind_sampler_states;
pipe->set_sampler_views = aaline->driver_set_sampler_views;
pipe->bind_fragment_sampler_states = aaline->driver_bind_sampler_states;
pipe->set_fragment_sampler_views = aaline->driver_set_sampler_views;
FREE( stage );
}
@@ -832,12 +831,7 @@ static struct aaline_stage *
aaline_stage_from_pipe(struct pipe_context *pipe)
{
struct draw_context *draw = (struct draw_context *) pipe->draw;
if (draw) {
return aaline_stage(draw->pipeline.aaline);
} else {
return NULL;
}
return aaline_stage(draw->pipeline.aaline);
}
@@ -850,12 +844,7 @@ aaline_create_fs_state(struct pipe_context *pipe,
const struct pipe_shader_state *fs)
{
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
struct aaline_fragment_shader *aafs = NULL;
if (aaline == NULL)
return NULL;
aafs = CALLOC_STRUCT(aaline_fragment_shader);
struct aaline_fragment_shader *aafs = CALLOC_STRUCT(aaline_fragment_shader);
if (aafs == NULL)
return NULL;
@@ -875,10 +864,6 @@ aaline_bind_fs_state(struct pipe_context *pipe, void *fs)
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
struct aaline_fragment_shader *aafs = (struct aaline_fragment_shader *) fs;
if (aaline == NULL) {
return;
}
/* save current */
aaline->fs = aafs;
/* pass-through */
@@ -892,91 +877,55 @@ aaline_delete_fs_state(struct pipe_context *pipe, void *fs)
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
struct aaline_fragment_shader *aafs = (struct aaline_fragment_shader *) fs;
if (aafs == NULL) {
return;
}
/* pass-through */
aaline->driver_delete_fs_state(pipe, aafs->driver_fs);
if (aaline != NULL) {
/* pass-through */
aaline->driver_delete_fs_state(pipe, aafs->driver_fs);
if (aafs->aaline_fs)
aaline->driver_delete_fs_state(pipe, aafs->aaline_fs);
}
if (aafs->aaline_fs)
aaline->driver_delete_fs_state(pipe, aafs->aaline_fs);
FREE((void*)aafs->state.tokens);
FREE(aafs);
}
static void
aaline_bind_sampler_states(struct pipe_context *pipe, unsigned shader,
unsigned start, unsigned num, void **sampler)
aaline_bind_sampler_states(struct pipe_context *pipe,
unsigned num, void **sampler)
{
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
assert(start == 0);
if (aaline == NULL) {
return;
}
if (shader == PIPE_SHADER_FRAGMENT) {
/* save current */
memcpy(aaline->state.sampler, sampler, num * sizeof(void *));
aaline->num_samplers = num;
}
/* save current */
memcpy(aaline->state.sampler, sampler, num * sizeof(void *));
aaline->num_samplers = num;
/* pass-through */
aaline->driver_bind_sampler_states(pipe, shader, start, num, sampler);
aaline->driver_bind_sampler_states(pipe, num, sampler);
}
static void
aaline_set_sampler_views(struct pipe_context *pipe, unsigned shader,
unsigned start, unsigned num,
aaline_set_sampler_views(struct pipe_context *pipe,
unsigned num,
struct pipe_sampler_view **views)
{
struct aaline_stage *aaline = aaline_stage_from_pipe(pipe);
uint i;
if (aaline == NULL) {
return;
/* save current */
for (i = 0; i < num; i++) {
pipe_sampler_view_reference(&aaline->state.sampler_views[i], views[i]);
}
if (shader == PIPE_SHADER_FRAGMENT) {
/* save current */
for (i = 0; i < num; i++) {
pipe_sampler_view_reference(&aaline->state.sampler_views[start + i],
views[i]);
}
aaline->num_sampler_views = num;
for ( ; i < PIPE_MAX_SAMPLERS; i++) {
pipe_sampler_view_reference(&aaline->state.sampler_views[i], NULL);
}
aaline->num_sampler_views = num;
/* pass-through */
aaline->driver_set_sampler_views(pipe, shader, start, num, views);
aaline->driver_set_sampler_views(pipe, num, views);
}
void
draw_aaline_prepare_outputs(struct draw_context *draw,
struct draw_stage *stage)
{
struct aaline_stage *aaline = aaline_stage(stage);
const struct pipe_rasterizer_state *rast = draw->rasterizer;
/* update vertex attrib info */
aaline->pos_slot = draw_current_shader_position_output(draw);;
if (!rast->line_smooth)
return;
/* allocate the extra post-transformed vertex attribute */
aaline->tex_slot = draw_alloc_extra_vertex_attrib(draw,
TGSI_SEMANTIC_GENERIC,
aaline->fs->generic_attrib);
}
/**
* Called by drivers that want to install this AA line prim stage
* into the draw module's pipeline. This will not be used if the
@@ -1008,16 +957,16 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe)
aaline->driver_bind_fs_state = pipe->bind_fs_state;
aaline->driver_delete_fs_state = pipe->delete_fs_state;
aaline->driver_bind_sampler_states = pipe->bind_sampler_states;
aaline->driver_set_sampler_views = pipe->set_sampler_views;
aaline->driver_bind_sampler_states = pipe->bind_fragment_sampler_states;
aaline->driver_set_sampler_views = pipe->set_fragment_sampler_views;
/* override the driver's functions */
pipe->create_fs_state = aaline_create_fs_state;
pipe->bind_fs_state = aaline_bind_fs_state;
pipe->delete_fs_state = aaline_delete_fs_state;
pipe->bind_sampler_states = aaline_bind_sampler_states;
pipe->set_sampler_views = aaline_set_sampler_views;
pipe->bind_fragment_sampler_states = aaline_bind_sampler_states;
pipe->set_fragment_sampler_views = aaline_set_sampler_views;
/* Install once everything is known to be OK:
*/

View File

@@ -308,9 +308,9 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_W;
ctx->emit_instruction(ctx, &newInst);
/* KILL_IF -tmp0.yyyy; # if -tmp0.y < 0, KILL */
/* KIL -tmp0.yyyy; # if -tmp0.y < 0, KILL */
newInst = tgsi_default_full_instruction();
newInst.Instruction.Opcode = TGSI_OPCODE_KILL_IF;
newInst.Instruction.Opcode = TGSI_OPCODE_KIL;
newInst.Instruction.NumDstRegs = 0;
newInst.Instruction.NumSrcRegs = 1;
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
@@ -696,7 +696,28 @@ aapoint_first_point(struct draw_stage *stage, struct prim_header *header)
*/
bind_aapoint_fragment_shader(aapoint);
draw_aapoint_prepare_outputs(draw, draw->pipeline.aapoint);
/* update vertex attrib info */
aapoint->pos_slot = draw_current_shader_position_output(draw);
/* allocate the extra post-transformed vertex attribute */
aapoint->tex_slot = draw_alloc_extra_vertex_attrib(draw,
TGSI_SEMANTIC_GENERIC,
aapoint->fs->generic_attrib);
assert(aapoint->tex_slot > 0); /* output[0] is vertex pos */
/* find psize slot in post-transform vertex */
aapoint->psize_slot = -1;
if (draw->rasterizer->point_size_per_vertex) {
const struct tgsi_shader_info *info = draw_get_shader_info(draw);
uint i;
/* find PSIZ vertex output */
for (i = 0; i < info->num_outputs; i++) {
if (info->output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
aapoint->psize_slot = i;
break;
}
}
}
draw->suspend_flushing = TRUE;
@@ -760,39 +781,6 @@ aapoint_destroy(struct draw_stage *stage)
FREE( stage );
}
void
draw_aapoint_prepare_outputs(struct draw_context *draw,
struct draw_stage *stage)
{
struct aapoint_stage *aapoint = aapoint_stage(stage);
const struct pipe_rasterizer_state *rast = draw->rasterizer;
/* update vertex attrib info */
aapoint->pos_slot = draw_current_shader_position_output(draw);
if (!rast->point_smooth)
return;
/* allocate the extra post-transformed vertex attribute */
aapoint->tex_slot = draw_alloc_extra_vertex_attrib(draw,
TGSI_SEMANTIC_GENERIC,
aapoint->fs->generic_attrib);
assert(aapoint->tex_slot > 0); /* output[0] is vertex pos */
/* find psize slot in post-transform vertex */
aapoint->psize_slot = -1;
if (draw->rasterizer->point_size_per_vertex) {
const struct tgsi_shader_info *info = draw_get_shader_info(draw);
uint i;
/* find PSIZ vertex output */
for (i = 0; i < info->num_outputs; i++) {
if (info->output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) {
aapoint->psize_slot = i;
break;
}
}
}
}
static struct aapoint_stage *
draw_aapoint_stage(struct draw_context *draw)

View File

@@ -104,7 +104,7 @@ static void interp_attr( float dst[4],
float t,
const float in[4],
const float out[4] )
{
{
dst[0] = LINTERP( t, out[0], in[0] );
dst[1] = LINTERP( t, out[1], in[1] );
dst[2] = LINTERP( t, out[2], in[2] );
@@ -136,7 +136,7 @@ static void interp( const struct clip_stage *clip,
const struct vertex_header *in,
unsigned viewport_index )
{
const unsigned nr_attrs = draw_num_shader_outputs(clip->stage.draw);
const unsigned nr_attrs = draw_current_shader_outputs(clip->stage.draw);
const unsigned pos_attr = draw_current_shader_position_output(clip->stage.draw);
const unsigned clip_attr = draw_current_shader_clipvertex_output(clip->stage.draw);
unsigned j;
@@ -209,29 +209,6 @@ static void interp( const struct clip_stage *clip,
}
}
/**
* Checks whether the specifed triangle is empty and if it is returns
* true, otherwise returns false.
* Triangle is considered null/empty if it's area is qual to zero.
*/
static INLINE boolean
is_tri_null(struct draw_context *draw, const struct prim_header *header)
{
const unsigned pos_attr = draw_current_shader_position_output(draw);
float x1 = header->v[1]->data[pos_attr][0] - header->v[0]->data[pos_attr][0];
float y1 = header->v[1]->data[pos_attr][1] - header->v[0]->data[pos_attr][1];
float z1 = header->v[1]->data[pos_attr][2] - header->v[0]->data[pos_attr][2];
float x2 = header->v[2]->data[pos_attr][0] - header->v[0]->data[pos_attr][0];
float y2 = header->v[2]->data[pos_attr][1] - header->v[0]->data[pos_attr][1];
float z2 = header->v[2]->data[pos_attr][2] - header->v[0]->data[pos_attr][2];
float vx = y1 * z2 - z1 * y2;
float vy = x1 * z2 - z1 * x2;
float vz = x1 * y2 - y1 * x2;
return (vx*vx + vy*vy + vz*vz) == 0.f;
}
/**
* Emit a post-clip polygon to the next pipeline stage. The polygon
@@ -246,8 +223,6 @@ static void emit_poly( struct draw_stage *stage,
struct prim_header header;
unsigned i;
ushort edge_first, edge_middle, edge_last;
boolean last_tri_was_null = FALSE;
boolean tri_was_not_null = FALSE;
if (stage->draw->rasterizer->flatshade_first) {
edge_first = DRAW_PIPE_EDGE_FLAG_0;
@@ -269,7 +244,6 @@ static void emit_poly( struct draw_stage *stage,
header.pad = 0;
for (i = 2; i < n; i++, header.flags = edge_middle) {
boolean tri_null;
/* order the triangle verts to respect the provoking vertex mode */
if (stage->draw->rasterizer->flatshade_first) {
header.v[0] = inlist[0]; /* the provoking vertex */
@@ -282,19 +256,6 @@ static void emit_poly( struct draw_stage *stage,
header.v[2] = inlist[0]; /* the provoking vertex */
}
tri_null = is_tri_null(stage->draw, &header);
/* If we generated a triangle with an area, aka. non-null triangle,
* or if the previous triangle was also null then skip all subsequent
* null triangles */
if ((tri_was_not_null && tri_null) || (last_tri_was_null && tri_null)) {
last_tri_was_null = tri_null;
continue;
}
last_tri_was_null = tri_null;
if (!tri_null) {
tri_was_not_null = TRUE;
}
if (!edgeflags[i-1]) {
header.flags &= ~edge_middle;
}
@@ -303,6 +264,7 @@ static void emit_poly( struct draw_stage *stage,
header.flags |= edge_last;
if (DEBUG_CLIP) {
const struct draw_vertex_shader *vs = stage->draw->vs.vertex_shader;
uint j, k;
debug_printf("Clipped tri: (flat-shade-first = %d)\n",
stage->draw->rasterizer->flatshade_first);
@@ -312,7 +274,7 @@ static void emit_poly( struct draw_stage *stage,
header.v[j]->clip[1],
header.v[j]->clip[2],
header.v[j]->clip[3]);
for (k = 0; k < draw_num_shader_outputs(stage->draw); k++) {
for (k = 0; k < vs->info.num_outputs; k++) {
debug_printf(" Vert %d: Attr %d: %f %f %f %f\n", j, k,
header.v[j]->data[k][0],
header.v[j]->data[k][1],
@@ -321,6 +283,7 @@ static void emit_poly( struct draw_stage *stage,
}
}
}
stage->next->tri( stage->next, &header );
}
}
@@ -419,9 +382,6 @@ do_clip_tri( struct draw_stage *stage,
dp_prev = getclipdist(clipper, vert_prev, plane_idx);
clipmask &= ~(1<<plane_idx);
if (util_is_inf_or_nan(dp_prev))
return; //discard nan
assert(n < MAX_CLIPPED_VERTICES);
if (n >= MAX_CLIPPED_VERTICES)
return;
@@ -434,9 +394,6 @@ do_clip_tri( struct draw_stage *stage,
float dp = getclipdist(clipper, vert, plane_idx);
if (util_is_inf_or_nan(dp))
return; //discard nan
if (!IS_NEGATIVE(dp_prev)) {
assert(outcount < MAX_CLIPPED_VERTICES);
if (outcount >= MAX_CLIPPED_VERTICES)
@@ -567,9 +524,6 @@ do_clip_line( struct draw_stage *stage,
const float dp0 = getclipdist(clipper, v0, plane_idx);
const float dp1 = getclipdist(clipper, v1, plane_idx);
if (util_is_inf_or_nan(dp0) || util_is_inf_or_nan(dp1))
return; //discard nan
if (dp1 < 0.0F) {
float t = dp1 / (dp1 - dp0);
t1 = MAX2(t1, t);
@@ -622,7 +576,7 @@ clip_line( struct draw_stage *stage,
{
unsigned clipmask = (header->v[0]->clipmask |
header->v[1]->clipmask);
if (clipmask == 0) {
/* no clipping needed */
stage->next->line( stage->next, header );
@@ -642,7 +596,7 @@ clip_tri( struct draw_stage *stage,
unsigned clipmask = (header->v[0]->clipmask |
header->v[1]->clipmask |
header->v[2]->clipmask);
if (clipmask == 0) {
/* no clipping needed */
stage->next->tri( stage->next, header );
@@ -655,35 +609,6 @@ clip_tri( struct draw_stage *stage,
}
static int
find_interp(const struct draw_fragment_shader *fs, int *indexed_interp,
uint semantic_name, uint semantic_index)
{
int interp;
/* If it's gl_{Front,Back}{,Secondary}Color, pick up the mode
* from the array we've filled before. */
if (semantic_name == TGSI_SEMANTIC_COLOR ||
semantic_name == TGSI_SEMANTIC_BCOLOR) {
interp = indexed_interp[semantic_index];
} else {
/* Otherwise, search in the FS inputs, with a decent default
* if we don't find it.
*/
uint j;
interp = TGSI_INTERPOLATE_PERSPECTIVE;
if (fs) {
for (j = 0; j < fs->info.num_inputs; j++) {
if (semantic_name == fs->info.input_semantic_name[j] &&
semantic_index == fs->info.input_semantic_index[j]) {
interp = fs->info.input_interpolate[j];
break;
}
}
}
}
return interp;
}
/* Update state. Could further delay this until we hit the first
* primitive that really requires clipping.
*/
@@ -691,9 +616,11 @@ static void
clip_init_state( struct draw_stage *stage )
{
struct clip_stage *clipper = clip_stage( stage );
const struct draw_vertex_shader *vs = stage->draw->vs.vertex_shader;
const struct draw_geometry_shader *gs = stage->draw->gs.geometry_shader;
const struct draw_fragment_shader *fs = stage->draw->fs.fragment_shader;
uint i, j;
const struct tgsi_shader_info *info = draw_get_shader_info(stage->draw);
uint i;
const struct tgsi_shader_info *vs_info = gs ? &gs->info : &vs->info;
/* We need to know for each attribute what kind of interpolation is
* done on it (flat, smooth or noperspective). But the information
@@ -736,36 +663,42 @@ clip_init_state( struct draw_stage *stage )
clipper->num_flat_attribs = 0;
memset(clipper->noperspective_attribs, 0, sizeof(clipper->noperspective_attribs));
for (i = 0; i < info->num_outputs; i++) {
/* Find the interpolation mode for a specific attribute */
int interp = find_interp(fs, indexed_interp,
info->output_semantic_name[i],
info->output_semantic_index[i]);
for (i = 0; i < vs_info->num_outputs; i++) {
/* Find the interpolation mode for a specific attribute
*/
int interp;
/* If it's gl_{Front,Back}{,Secondary}Color, pick up the mode
* from the array we've filled before. */
if (vs_info->output_semantic_name[i] == TGSI_SEMANTIC_COLOR ||
vs_info->output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) {
interp = indexed_interp[vs_info->output_semantic_index[i]];
} else {
/* Otherwise, search in the FS inputs, with a decent default
* if we don't find it.
*/
uint j;
interp = TGSI_INTERPOLATE_PERSPECTIVE;
if (fs) {
for (j = 0; j < fs->info.num_inputs; j++) {
if (vs_info->output_semantic_name[i] == fs->info.input_semantic_name[j] &&
vs_info->output_semantic_index[i] == fs->info.input_semantic_index[j]) {
interp = fs->info.input_interpolate[j];
break;
}
}
}
}
/* If it's flat, add it to the flat vector. Otherwise update
* the noperspective mask.
*/
if (interp == TGSI_INTERPOLATE_CONSTANT) {
clipper->flat_attribs[clipper->num_flat_attribs] = i;
clipper->num_flat_attribs++;
} else
clipper->noperspective_attribs[i] = interp == TGSI_INTERPOLATE_LINEAR;
}
/* Search the extra vertex attributes */
for (j = 0; j < stage->draw->extra_shader_outputs.num; j++) {
/* Find the interpolation mode for a specific attribute */
int interp = find_interp(fs, indexed_interp,
stage->draw->extra_shader_outputs.semantic_name[j],
stage->draw->extra_shader_outputs.semantic_index[j]);
/* If it's flat, add it to the flat vector. Otherwise update
* the noperspective mask.
*/
if (interp == TGSI_INTERPOLATE_CONSTANT) {
clipper->flat_attribs[clipper->num_flat_attribs] = i + j;
clipper->num_flat_attribs++;
} else
clipper->noperspective_attribs[i + j] = interp == TGSI_INTERPOLATE_LINEAR;
}
stage->tri = clip_tri;
stage->line = clip_line;

View File

@@ -1,5 +1,5 @@
/**************************************************************************
*
*
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
/**
@@ -51,10 +51,10 @@ static INLINE struct cull_stage *cull_stage( struct draw_stage *stage )
return (struct cull_stage *)stage;
}
static INLINE boolean
cull_distance_is_out(float dist)
static INLINE
boolean cull_distance_is_out(float dist)
{
return (dist < 0.0f) || util_is_inf_or_nan(dist);
return (dist < 0) || util_is_inf_or_nan(dist);
}
/*
@@ -68,21 +68,23 @@ static void cull_point( struct draw_stage *stage,
{
const unsigned num_written_culldistances =
draw_current_shader_num_written_culldistances(stage->draw);
unsigned i;
debug_assert(num_written_culldistances);
for (i = 0; i < num_written_culldistances; ++i) {
unsigned cull_idx = i / 4;
unsigned out_idx =
draw_current_shader_culldistance_output(stage->draw, cull_idx);
unsigned idx = i % 4;
float cull1 = header->v[0]->data[out_idx][idx];
boolean vert1_out = cull_distance_is_out(cull1);
if (vert1_out)
return;
if (num_written_culldistances) {
unsigned i;
boolean culled = FALSE;
for (i = 0; i < num_written_culldistances; ++i) {
unsigned cull_idx = i / 4;
unsigned out_idx =
draw_current_shader_culldistance_output(stage->draw, cull_idx);
unsigned idx = i % 4;
float cull1 = header->v[0]->data[out_idx][idx];
boolean vert1_out = cull_distance_is_out(cull1);
if (vert1_out)
culled = TRUE;
}
if (!culled)
stage->next->point( stage->next, header );
}
stage->next->point( stage->next, header );
}
/*
@@ -92,27 +94,29 @@ static void cull_point( struct draw_stage *stage,
* on primitives without faces (e.g. points and lines)
*/
static void cull_line( struct draw_stage *stage,
struct prim_header *header )
struct prim_header *header )
{
const unsigned num_written_culldistances =
draw_current_shader_num_written_culldistances(stage->draw);
unsigned i;
debug_assert(num_written_culldistances);
for (i = 0; i < num_written_culldistances; ++i) {
unsigned cull_idx = i / 4;
unsigned out_idx =
draw_current_shader_culldistance_output(stage->draw, cull_idx);
unsigned idx = i % 4;
float cull1 = header->v[0]->data[out_idx][idx];
float cull2 = header->v[1]->data[out_idx][idx];
boolean vert1_out = cull_distance_is_out(cull1);
boolean vert2_out = cull_distance_is_out(cull2);
if (vert1_out && vert2_out)
return;
if (num_written_culldistances) {
unsigned i;
boolean culled = FALSE;
for (i = 0; i < num_written_culldistances; ++i) {
unsigned cull_idx = i / 4;
unsigned out_idx =
draw_current_shader_culldistance_output(stage->draw, cull_idx);
unsigned idx = i % 4;
float cull1 = header->v[0]->data[out_idx][idx];
float cull2 = header->v[1]->data[out_idx][idx];
boolean vert1_out = cull_distance_is_out(cull1);
boolean vert2_out = cull_distance_is_out(cull2);
if (vert1_out && vert2_out)
culled = TRUE;
}
if (!culled)
stage->next->line( stage->next, header );
}
stage->next->line( stage->next, header );
}
/*
@@ -129,6 +133,7 @@ static void cull_tri( struct draw_stage *stage,
/* Do the distance culling */
if (num_written_culldistances) {
unsigned i;
boolean culled = FALSE;
for (i = 0; i < num_written_culldistances; ++i) {
unsigned cull_idx = i / 4;
unsigned out_idx =
@@ -141,8 +146,10 @@ static void cull_tri( struct draw_stage *stage,
boolean vert2_out = cull_distance_is_out(cull2);
boolean vert3_out = cull_distance_is_out(cull3);
if (vert1_out && vert2_out && vert3_out)
return;
culled = TRUE;
}
if (!culled)
stage->next->tri( stage->next, header );
}
/* Do the regular face culling */
@@ -159,7 +166,7 @@ static void cull_tri( struct draw_stage *stage,
const float fx = v1[0] - v2[0];
const float fy = v1[1] - v2[1];
/* det = cross(e,f).z */
header->det = ex * fy - ey * fx;
@@ -210,7 +217,7 @@ static void cull_first_line( struct draw_stage *stage,
}
}
static void cull_first_tri( struct draw_stage *stage,
static void cull_first_tri( struct draw_stage *stage,
struct prim_header *header )
{
struct cull_stage *cull = cull_stage(stage);

View File

@@ -32,7 +32,6 @@
* \author Brian Paul
*/
#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "draw_pipe.h"
@@ -90,22 +89,7 @@ static void do_offset_tri( struct draw_stage *stage,
float dzdx = fabsf(a * inv_det);
float dzdy = fabsf(b * inv_det);
float zoffset, maxz, bias, mult;
mult = MAX2(dzdx, dzdy) * offset->scale;
if (stage->draw->floating_point_depth) {
maxz = MAX3(v0[2], v1[2], v2[2]);
/**
* XXX: TODO optimize this to quickly resolve a pow2 number through
* an exponent only operation.
*/
bias = offset->units * util_fast_exp2(util_get_float32_exponent(maxz) - 23);
zoffset = bias + mult;
} else {
zoffset = offset->units + mult;
}
float zoffset = offset->units + MAX2(dzdx, dzdy) * offset->scale;
if (offset->clamp)
zoffset = (offset->clamp < 0.0f) ? MAX2(zoffset, offset->clamp) :
@@ -173,17 +157,7 @@ static void offset_first_tri( struct draw_stage *stage,
if (do_offset) {
offset->scale = rast->offset_scale;
offset->clamp = rast->offset_clamp;
/*
* If depth is floating point, depth bias is calculated with respect
* to the primitive's maximum Z value. Retain the original depth bias
* value until that stage.
*/
if (stage->draw->floating_point_depth) {
offset->units = (float) rast->offset_units;
} else {
offset->units = (float) (rast->offset_units * stage->draw->mrd);
}
offset->units = (float) (rast->offset_units * stage->draw->mrd);
}
else {
offset->scale = 0.0f;

View File

@@ -87,7 +87,7 @@ struct pstip_stage
struct pstip_fragment_shader *fs;
struct {
void *samplers[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view *sampler_views[PIPE_MAX_SHADER_SAMPLER_VIEWS];
struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
const struct pipe_poly_stipple *stipple;
} state;
@@ -99,12 +99,10 @@ struct pstip_stage
void (*driver_bind_fs_state)(struct pipe_context *, void *);
void (*driver_delete_fs_state)(struct pipe_context *, void *);
void (*driver_bind_sampler_states)(struct pipe_context *, unsigned,
unsigned, unsigned, void **);
void (*driver_bind_sampler_states)(struct pipe_context *, unsigned, void **);
void (*driver_set_sampler_views)(struct pipe_context *,
unsigned shader, unsigned start,
unsigned count,
unsigned,
struct pipe_sampler_view **);
void (*driver_set_polygon_stipple)(struct pipe_context *,
@@ -280,7 +278,7 @@ pstip_transform_inst(struct tgsi_transform_context *ctx,
/*
* Insert new MUL/TEX/KILL_IF instructions at start of program
* Insert new MUL/TEX/KILP instructions at start of program
* Take gl_FragCoord, divide by 32 (stipple size), sample the
* texture and kill fragment if needed.
*
@@ -317,9 +315,9 @@ pstip_transform_inst(struct tgsi_transform_context *ctx,
newInst.Src[1].Register.Index = pctx->freeSampler;
ctx->emit_instruction(ctx, &newInst);
/* KILL_IF -texTemp; # if -texTemp < 0, KILL fragment */
/* KIL -texTemp; # if -texTemp < 0, KILL fragment */
newInst = tgsi_default_full_instruction();
newInst.Instruction.Opcode = TGSI_OPCODE_KILL_IF;
newInst.Instruction.Opcode = TGSI_OPCODE_KIL;
newInst.Instruction.NumDstRegs = 0;
newInst.Instruction.NumSrcRegs = 1;
newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY;
@@ -404,7 +402,7 @@ pstip_update_texture(struct pstip_stage *pstip)
/*
* Load alpha texture.
* Note: 0 means keep the fragment, 255 means kill it.
* We'll negate the texel value and use KILL_IF which kills if value
* We'll negate the texel value and use KILP which kills if value
* is negative.
*/
for (i = 0; i < 32; i++) {
@@ -549,13 +547,8 @@ pstip_first_tri(struct draw_stage *stage, struct prim_header *header)
assert(num_samplers <= PIPE_MAX_SAMPLERS);
draw->suspend_flushing = TRUE;
pstip->driver_bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0,
num_samplers, pstip->state.samplers);
pstip->driver_set_sampler_views(pipe, PIPE_SHADER_FRAGMENT, 0,
num_samplers, pstip->state.sampler_views);
pstip->driver_bind_sampler_states(pipe, num_samplers, pstip->state.samplers);
pstip->driver_set_sampler_views(pipe, num_samplers, pstip->state.sampler_views);
draw->suspend_flushing = FALSE;
/* now really draw first triangle */
@@ -577,15 +570,11 @@ pstip_flush(struct draw_stage *stage, unsigned flags)
/* restore original frag shader, texture, sampler state */
draw->suspend_flushing = TRUE;
pstip->driver_bind_fs_state(pipe, pstip->fs ? pstip->fs->driver_fs : NULL);
pstip->driver_bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0,
pstip->num_samplers,
pstip->driver_bind_sampler_states(pipe, pstip->num_samplers,
pstip->state.samplers);
pstip->driver_set_sampler_views(pipe, PIPE_SHADER_FRAGMENT, 0,
pstip->driver_set_sampler_views(pipe,
pstip->num_sampler_views,
pstip->state.sampler_views);
draw->suspend_flushing = FALSE;
}
@@ -603,7 +592,7 @@ pstip_destroy(struct draw_stage *stage)
struct pstip_stage *pstip = pstip_stage(stage);
uint i;
for (i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; i++) {
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
pipe_sampler_view_reference(&pstip->state.sampler_views[i], NULL);
}
@@ -712,47 +701,44 @@ pstip_delete_fs_state(struct pipe_context *pipe, void *fs)
static void
pstip_bind_sampler_states(struct pipe_context *pipe, unsigned shader,
unsigned start, unsigned num, void **sampler)
pstip_bind_sampler_states(struct pipe_context *pipe,
unsigned num, void **sampler)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
uint i;
assert(start == 0);
if (shader == PIPE_SHADER_FRAGMENT) {
/* save current */
memcpy(pstip->state.samplers, sampler, num * sizeof(void *));
for (i = num; i < PIPE_MAX_SAMPLERS; i++) {
pstip->state.samplers[i] = NULL;
}
pstip->num_samplers = num;
/* save current */
memcpy(pstip->state.samplers, sampler, num * sizeof(void *));
for (i = num; i < PIPE_MAX_SAMPLERS; i++) {
pstip->state.samplers[i] = NULL;
}
pstip->num_samplers = num;
/* pass-through */
pstip->driver_bind_sampler_states(pstip->pipe, shader, start, num, sampler);
pstip->driver_bind_sampler_states(pstip->pipe, num, sampler);
}
static void
pstip_set_sampler_views(struct pipe_context *pipe,
unsigned shader, unsigned start, unsigned num,
unsigned num,
struct pipe_sampler_view **views)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
uint i;
if (shader == PIPE_SHADER_FRAGMENT) {
/* save current */
for (i = 0; i < num; i++) {
pipe_sampler_view_reference(&pstip->state.sampler_views[start + i],
views[i]);
}
pstip->num_sampler_views = num;
/* save current */
for (i = 0; i < num; i++) {
pipe_sampler_view_reference(&pstip->state.sampler_views[i], views[i]);
}
for (; i < PIPE_MAX_SAMPLERS; i++) {
pipe_sampler_view_reference(&pstip->state.sampler_views[i], NULL);
}
pstip->num_sampler_views = num;
/* pass-through */
pstip->driver_set_sampler_views(pstip->pipe, shader, start, num, views);
pstip->driver_set_sampler_views(pstip->pipe, num, views);
}
@@ -806,8 +792,8 @@ draw_install_pstipple_stage(struct draw_context *draw,
pstip->driver_bind_fs_state = pipe->bind_fs_state;
pstip->driver_delete_fs_state = pipe->delete_fs_state;
pstip->driver_bind_sampler_states = pipe->bind_sampler_states;
pstip->driver_set_sampler_views = pipe->set_sampler_views;
pstip->driver_bind_sampler_states = pipe->bind_fragment_sampler_states;
pstip->driver_set_sampler_views = pipe->set_fragment_sampler_views;
pstip->driver_set_polygon_stipple = pipe->set_polygon_stipple;
/* override the driver's functions */
@@ -815,8 +801,8 @@ draw_install_pstipple_stage(struct draw_context *draw,
pipe->bind_fs_state = pstip_bind_fs_state;
pipe->delete_fs_state = pstip_delete_fs_state;
pipe->bind_sampler_states = pstip_bind_sampler_states;
pipe->set_sampler_views = pstip_set_sampler_views;
pipe->bind_fragment_sampler_states = pstip_bind_sampler_states;
pipe->set_fragment_sampler_views = pstip_set_sampler_views;
pipe->set_polygon_stipple = pstip_set_polygon_stipple;
return TRUE;

View File

@@ -37,7 +37,6 @@
#include "pipe/p_defines.h"
#include "draw_private.h"
#include "draw_pipe.h"
#include "draw_fs.h"
struct unfilled_stage {
@@ -48,8 +47,6 @@ struct unfilled_stage {
* and PIPE_POLYGON_MODE_POINT,
*/
unsigned mode[2];
int face_slot;
};
@@ -58,33 +55,8 @@ static INLINE struct unfilled_stage *unfilled_stage( struct draw_stage *stage )
return (struct unfilled_stage *)stage;
}
static void
inject_front_face_info(struct draw_stage *stage,
struct prim_header *header)
{
struct unfilled_stage *unfilled = unfilled_stage(stage);
unsigned ccw = header->det < 0.0;
boolean is_front_face = (
(stage->draw->rasterizer->front_ccw && ccw) ||
(!stage->draw->rasterizer->front_ccw && !ccw));
int slot = unfilled->face_slot;
unsigned i;
/* In case the backend doesn't care about it */
if (slot < 0) {
return;
}
for (i = 0; i < 3; ++i) {
struct vertex_header *v = header->v[i];
v->data[slot][0] = is_front_face;
v->data[slot][1] = is_front_face;
v->data[slot][2] = is_front_face;
v->data[slot][3] = is_front_face;
}
}
static void point( struct draw_stage *stage,
struct vertex_header *v0 )
{
@@ -111,8 +83,6 @@ static void points( struct draw_stage *stage,
struct vertex_header *v1 = header->v[1];
struct vertex_header *v2 = header->v[2];
inject_front_face_info(stage, header);
if ((header->flags & DRAW_PIPE_EDGE_FLAG_0) && v0->edgeflag) point( stage, v0 );
if ((header->flags & DRAW_PIPE_EDGE_FLAG_1) && v1->edgeflag) point( stage, v1 );
if ((header->flags & DRAW_PIPE_EDGE_FLAG_2) && v2->edgeflag) point( stage, v2 );
@@ -129,8 +99,6 @@ static void lines( struct draw_stage *stage,
if (header->flags & DRAW_PIPE_RESET_STIPPLE)
stage->next->reset_stipple_counter( stage->next );
inject_front_face_info(stage, header);
if ((header->flags & DRAW_PIPE_EDGE_FLAG_2) && v2->edgeflag) line( stage, v2, v0 );
if ((header->flags & DRAW_PIPE_EDGE_FLAG_0) && v0->edgeflag) line( stage, v0, v1 );
if ((header->flags & DRAW_PIPE_EDGE_FLAG_1) && v1->edgeflag) line( stage, v1, v2 );
@@ -224,29 +192,6 @@ static void unfilled_destroy( struct draw_stage *stage )
FREE( stage );
}
/*
* Try to allocate an output slot which we can use
* to preserve the front face information.
*/
void
draw_unfilled_prepare_outputs( struct draw_context *draw,
struct draw_stage *stage )
{
struct unfilled_stage *unfilled = unfilled_stage(stage);
const struct pipe_rasterizer_state *rast = draw ? draw->rasterizer : 0;
boolean is_unfilled = (rast &&
(rast->fill_front != PIPE_POLYGON_MODE_FILL ||
rast->fill_back != PIPE_POLYGON_MODE_FILL));
const struct draw_fragment_shader *fs = draw ? draw->fs.fragment_shader : 0;
if (is_unfilled && fs && fs->info.uses_frontface) {
unfilled->face_slot = draw_alloc_extra_vertex_attrib(
stage->draw, TGSI_SEMANTIC_FACE, 0);
} else {
unfilled->face_slot = -1;
}
}
/**
* Create unfilled triangle stage.
@@ -268,8 +213,6 @@ struct draw_stage *draw_unfilled_stage( struct draw_context *draw )
unfilled->stage.reset_stipple_counter = unfilled_reset_stipple_counter;
unfilled->stage.destroy = unfilled_destroy;
unfilled->face_slot = -1;
if (!draw_alloc_temp_verts( &unfilled->stage, 0 ))
goto fail;

View File

@@ -30,13 +30,28 @@
#include "util/u_memory.h"
#include "util/u_math.h"
#include "util/u_prim.h"
#include "pipe/p_defines.h"
#include "draw_private.h"
#include "draw_pipe.h"
#include "draw_context.h"
#include "draw_vbuf.h"
static boolean points( unsigned prim )
{
return (prim == PIPE_PRIM_POINTS);
}
static boolean lines( unsigned prim )
{
return (prim == PIPE_PRIM_LINES ||
prim == PIPE_PRIM_LINE_STRIP ||
prim == PIPE_PRIM_LINE_LOOP);
}
static boolean triangles( unsigned prim )
{
return prim >= PIPE_PRIM_TRIANGLES;
}
/**
* Default version of a function to check if we need any special
@@ -51,8 +66,6 @@ draw_need_pipeline(const struct draw_context *draw,
const struct pipe_rasterizer_state *rasterizer,
unsigned int prim )
{
unsigned reduced_prim = u_reduced_prim(prim);
/* If the driver has overridden this, use that version:
*/
if (draw->render &&
@@ -67,7 +80,8 @@ draw_need_pipeline(const struct draw_context *draw,
* and triggering the pipeline, because we have to trigger the
* pipeline *anyway* if unfilled mode is active.
*/
if (reduced_prim == PIPE_PRIM_LINES) {
if (lines(prim))
{
/* line stipple */
if (rasterizer->line_stipple_enable && draw->pipeline.line_stipple)
return TRUE;
@@ -83,7 +97,9 @@ draw_need_pipeline(const struct draw_context *draw,
if (draw_current_shader_num_written_culldistances(draw))
return TRUE;
}
else if (reduced_prim == PIPE_PRIM_POINTS) {
if (points(prim))
{
/* large points */
if (rasterizer->point_size > draw->pipeline.wide_point_threshold)
return TRUE;
@@ -101,7 +117,10 @@ draw_need_pipeline(const struct draw_context *draw,
if (rasterizer->sprite_coord_enable && draw->pipeline.point_sprite)
return TRUE;
}
else if (reduced_prim == PIPE_PRIM_TRIANGLES) {
if (triangles(prim))
{
/* polygon stipple */
if (rasterizer->poly_stipple_enable && draw->pipeline.pstipple)
return TRUE;
@@ -261,6 +280,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
next = draw->pipeline.clip;
}
draw->pipeline.first = next;
if (0) {

Some files were not shown because too many files have changed in this diff Show More