Chia-I Wu [Mon, 25 Oct 2010 16:16:49 +0000 (00:16 +0800)]
glapi: Merge glapioffsets.h into glapidispath.h.
Move defines in glapioffsets.h to glapidispatch.h. Rename
_gloffset_FIRST_DYNAMIC to _gloffset_COUNT, which is equal to the number
of entries in _glapi_table.
Consistently use SET_by_offset, GET_by_offset, CALL_by_offset, and
_gloffset_* to recursively define all SET/GET/CALL macros.
Chia-I Wu [Mon, 25 Oct 2010 14:27:17 +0000 (22:27 +0800)]
glapi: Do not use glapioffsets.h.
glapioffsets.h exists for the same reason as glapidispatch.h does. It
is of no use to glapi. This commit also drops the use of glapioffsets.h
in glx as glx is considered an extension to glapi when it comes to
defining public GL entries.
Chia-I Wu [Mon, 25 Oct 2010 19:42:09 +0000 (03:42 +0800)]
glapi: Move glapidispatch.h to core mesa.
It is a core mesa header, not a glapi header.
Chia-I Wu [Mon, 25 Oct 2010 14:05:20 +0000 (22:05 +0800)]
glapi: Do not use glapidispatch.h.
glapidispatch.h exists so that core mesa (libmesa.a) can be built for
DRI drivers or for non-DRI drivers as a compile time decision (whether
IN_DRI_DRIVER is defined). It is of no use to glapi. This commit also
drops the use of glapidispatch.h in glx and libgl-xlib as they are
considered extensions to glapi when it comes to defining public GL
entries.
Brian Paul [Wed, 27 Oct 2010 00:04:28 +0000 (18:04 -0600)]
mesa: remove the unused _mesa_is_fragment_shader_active() function
This reverts commit
013d5ffeec3af5665c81c6a7a8370d21699ca609.
Brian Paul [Wed, 27 Oct 2010 00:01:50 +0000 (18:01 -0600)]
mesa: call _mesa_valid_to_render() in glDrawPixels, glCopyPixels, glBitmap
This lets us simplify and consolidate some state checking code.
This implements the GL_INVALID_OPERATION check for all drawing commands
required by GL_EXT_texture_integer.
Brian Paul [Wed, 27 Oct 2010 00:01:06 +0000 (18:01 -0600)]
mesa: do integer FB / shader validation check in _mesa_valid_to_render()
Eric Anholt [Tue, 26 Oct 2010 21:49:38 +0000 (14:49 -0700)]
i965: Disable register spilling on gen6 until it's fixed.
Avoids GPU hang on glsl-fs-convolution-1.
Eric Anholt [Tue, 26 Oct 2010 21:36:18 +0000 (14:36 -0700)]
i965: Fix VS URB entry sizing.
I'm trying to clamp to a minimum of 1 URB row, not a maximum of 1.
Fixes:
glsl-kwin-blur
glsl-max-varying
glsl-routing
Eric Anholt [Tue, 26 Oct 2010 20:46:09 +0000 (13:46 -0700)]
i965: Drop the eot argument to read messages, which can never be set.
Eric Anholt [Tue, 26 Oct 2010 20:17:54 +0000 (13:17 -0700)]
i965: Add support for constant buffer loads on gen6.
Fixes glsl-fs-uniform-array-5.
Eric Anholt [Tue, 26 Oct 2010 20:15:01 +0000 (13:15 -0700)]
i965: Set up the constant buffer on gen6 when it's needed.
This was slightly confused because gen6_wm_constants does the push
constant buffer, while brw_wm_constants does pull constants.
Eric Anholt [Tue, 26 Oct 2010 19:19:46 +0000 (12:19 -0700)]
i965: Fix typo in comment about state flags.
Eric Anholt [Tue, 26 Oct 2010 18:23:27 +0000 (11:23 -0700)]
i965: Handle new ir_unop_round_even in channel expression splitting.
Eric Anholt [Mon, 25 Oct 2010 23:22:31 +0000 (16:22 -0700)]
i965: Add support for discard instructions on gen6.
It's a little more painful than before because we don't have the handy
mask register any more, and have to make do with cooking up a value
out of the flag register.
Eric Anholt [Tue, 26 Oct 2010 17:56:53 +0000 (10:56 -0700)]
i965: Add disasm for the flag register.
Eric Anholt [Tue, 26 Oct 2010 17:31:08 +0000 (10:31 -0700)]
i965: Clear some undefined fields of g0 when using them for gen6 FB writes.
This doesn't appear to help any testcases I'm looking at, but it looks
like it's required.
Eric Anholt [Tue, 26 Oct 2010 16:35:34 +0000 (09:35 -0700)]
i965: Use SENDC on the first render target write on gen6.
This is apparently required, as the thread will be initiated while it
still has dependencies, and this is what waits for those to be
resolved before writing color.
Eric Anholt [Mon, 25 Oct 2010 23:22:04 +0000 (16:22 -0700)]
i965: Clarify an XXX comment in FB writes with real info.
Eric Anholt [Mon, 25 Oct 2010 18:23:13 +0000 (11:23 -0700)]
i965: Add EU code for dword scattered reads (constant buffer array indexing).
Chia-I Wu [Tue, 26 Oct 2010 07:00:56 +0000 (15:00 +0800)]
egl_dri2: Fix a typo that make glFlush be called at wrong time.
We want to call glFlush when there is a current context. That is,
old_ctx. This is a regression introduced by
d19afc57fe49816f3f3290410e0124d326577be2.
Dave Airlie [Tue, 26 Oct 2010 02:08:00 +0000 (12:08 +1000)]
r600g: add assembler support for all the kcache fields.
Brian Paul [Tue, 26 Oct 2010 01:08:55 +0000 (19:08 -0600)]
mesa: additional teximage error checks for GL_EXT_texture_integer
Brian Paul [Tue, 26 Oct 2010 01:08:04 +0000 (19:08 -0600)]
mesa: additional switch cases for GL_EXT_texture_integer
Brian Paul [Tue, 26 Oct 2010 01:07:33 +0000 (19:07 -0600)]
mesa: additional glReadPixels error checks for GL_EXT_texture_integer
Dave Airlie [Thu, 14 Oct 2010 01:15:37 +0000 (11:15 +1000)]
r600g: fix magic 0x1 ->flat shade ena
Kenneth Graunke [Mon, 25 Oct 2010 19:44:55 +0000 (12:44 -0700)]
glsl: Fix constant component count in vector constructor emitting.
Fixes freedesktop.org bug #31101 as well as piglit test cases
assignment-type-mismatch.vert and constructor-28.vert.
Chad Versace [Sat, 23 Oct 2010 17:40:40 +0000 (10:40 -0700)]
glsl: Fix ast-to-hir for ARB_fragment_coord_conventions
Function ast_declarator_list::hir(), when processing keywords added by
extension ARB_fragment_coord_conventions, made the mistake of checking only if
the extension was __supported by the driver__. The correct behavior is to check
if the extensi0n is __enabled in the parse state__.
NOTE: this is a candidate for the 7.9 branch.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Mon, 25 Oct 2010 16:34:44 +0000 (10:34 -0600)]
translate: remove unused prototypes
Brian Paul [Mon, 25 Oct 2010 16:31:42 +0000 (10:31 -0600)]
translate: use function typedefs, casts to silence warnings
Marek Olšák [Mon, 4 Oct 2010 19:49:11 +0000 (21:49 +0200)]
st/mesa: support RGBA16 and use it for RGBA12 as well
Tested with r300g.
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Brian Paul [Mon, 25 Oct 2010 15:18:07 +0000 (09:18 -0600)]
rtasm: use pointer_to_func() to silence warning
Brian Paul [Mon, 25 Oct 2010 15:17:40 +0000 (09:17 -0600)]
util: use pointer_to_func() to silence warning
Brian Paul [Mon, 25 Oct 2010 15:17:09 +0000 (09:17 -0600)]
xlib: silence unused var warning
Brian Paul [Mon, 25 Oct 2010 15:11:25 +0000 (09:11 -0600)]
mesa: fix uninitialized var warning
http://bugs.freedesktop.org/show_bug.cgi?id=31067
Brian Paul [Mon, 25 Oct 2010 15:10:32 +0000 (09:10 -0600)]
mesa: silence enum comparison warning
http://bugs.freedesktop.org/show_bug.cgi?id=31069
Marek Olšák [Tue, 5 Oct 2010 00:52:03 +0000 (02:52 +0200)]
r300g: fix texture border for 16-bits-per-channel formats
This is kinda hacky, but it's hard to come up with a generic solution for
all formats when only a few are used in practice (I mostly get B8G8R8*8).
Marek Olšák [Sat, 2 Oct 2010 19:53:03 +0000 (21:53 +0200)]
mesa: allow FBO attachments of formats LUMINANCE, LUMINANCE_ALPHA, and INTENSITY
As per the GL_ARB_framebuffer_object specification.
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Jon TURNEY [Sun, 24 Oct 2010 13:06:50 +0000 (14:06 +0100)]
Ensure -L$(TOP)/$(LIB_DIR) appears in link line before any -L in $LDFLAGS
Ensure -L$(TOP)/$(LIB_DIR) (the staging dir for build products), appears
in the link line before any -L in $LDFLAGS, so that we link driver we are
building with libEGL we have just built, and not an installed version
[olv: make a similar change to targets/egl]
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Dave Airlie [Sun, 24 Oct 2010 03:04:44 +0000 (13:04 +1000)]
r600g: drop more common state handling code
Tilman Sauerbeck [Sat, 23 Oct 2010 11:33:22 +0000 (13:33 +0200)]
r600g: Also clear bc data when we're destroying a shader.
[airlied: remove unused vars]
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Tilman Sauerbeck [Sat, 23 Oct 2010 11:33:18 +0000 (13:33 +0200)]
r600g: Added r600_pipe_shader_destroy().
Not yet complete.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 24 Oct 2010 02:53:50 +0000 (12:53 +1000)]
r600g: merge more of the common r600/evergreen state handling
Tilman Sauerbeck [Sat, 23 Oct 2010 11:33:15 +0000 (13:33 +0200)]
r600g: Fixed r600_vertex_element leak.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Sat, 23 Oct 2010 16:27:19 +0000 (10:27 -0600)]
softpipe: remove >32bpp color restriction
The comment was out of date. The tile cache does handle >32-bit colors.
Brian Paul [Sat, 23 Oct 2010 16:23:05 +0000 (10:23 -0600)]
st/mesa: be smarter choosing texture format for glDrawPixels()
This lets us get an integer texture format for integer pixel formats.
Brian Paul [Sat, 23 Oct 2010 16:19:12 +0000 (10:19 -0600)]
mesa: display list support for GL_EXT_texture_integer
Brian Paul [Sat, 23 Oct 2010 16:02:11 +0000 (10:02 -0600)]
mesa: plug in GL_EXT_texture_integer functions
Brian Paul [Sat, 23 Oct 2010 16:01:56 +0000 (10:01 -0600)]
mesa: regenerated API files for GL_EXT_texture_integer
Brian Paul [Sat, 23 Oct 2010 16:01:25 +0000 (10:01 -0600)]
glapi: include/build EXT_texture_integer.xml
Brian Paul [Sat, 23 Oct 2010 16:00:36 +0000 (10:00 -0600)]
glapi: GL_EXT_texture_integer API
Brian Paul [Sat, 23 Oct 2010 15:45:24 +0000 (09:45 -0600)]
mesa: simplify target_can_be_compressed() function
Brian Paul [Sat, 23 Oct 2010 15:43:50 +0000 (09:43 -0600)]
st/mesa: add format selection for signed/unsigned integer formats
Brian Paul [Sat, 23 Oct 2010 15:40:49 +0000 (09:40 -0600)]
mesa: added cases for GL_EXT_texture_integer
Brian Paul [Sat, 23 Oct 2010 15:39:07 +0000 (09:39 -0600)]
mesa: added cases for GL_EXT_texture_integer formats
Brian Paul [Sat, 23 Oct 2010 15:38:45 +0000 (09:38 -0600)]
mesa: compute _IntegerColor field in _mesa_test_framebuffer_completeness()
Brian Paul [Sat, 23 Oct 2010 15:37:39 +0000 (09:37 -0600)]
mesa: added glGet query for GL_RGBA_INTEGER_MODE_EXT
Brian Paul [Sat, 23 Oct 2010 15:37:06 +0000 (09:37 -0600)]
mesa: added new gl_framebuffer::_IntegerColor field
Brian Paul [Sat, 23 Oct 2010 15:36:44 +0000 (09:36 -0600)]
mesa: added new gl_extensions::EXT_gpu_shader4 field
Brian Paul [Sat, 23 Oct 2010 15:35:37 +0000 (09:35 -0600)]
softpipe: added some texture sample debug code (disabled)
Brian Paul [Sat, 23 Oct 2010 15:35:01 +0000 (09:35 -0600)]
mesa: new glDrawPixels error check for integer formats
Brian Paul [Sat, 23 Oct 2010 15:33:36 +0000 (09:33 -0600)]
mesa: added _mesa_is_fragment_shader_active() helper
Brian Paul [Sat, 23 Oct 2010 15:32:08 +0000 (09:32 -0600)]
mesa: minor reformatting, clean-ups
Brian Paul [Sat, 23 Oct 2010 15:27:12 +0000 (09:27 -0600)]
mesa: _mesa_is_format_integer() function
Brian Paul [Sat, 23 Oct 2010 15:26:10 +0000 (09:26 -0600)]
mesa: _mesa_ClearColorIuiEXT() and _mesa_ClearColorIiEXT()
For GL_EXT_texture_integer.
Brian Paul [Sat, 23 Oct 2010 15:22:48 +0000 (09:22 -0600)]
mesa: add pixel packing for unscaled integer types
And add some missing GL_RG cases.
Brian Paul [Sat, 23 Oct 2010 15:15:01 +0000 (09:15 -0600)]
mesa: split up the image.c file
New files:
pack.c - image/row packing/unpacking functions
pixeltransfer.c - pixel scale/bias/lookup functions
Brian Paul [Fri, 22 Oct 2010 17:38:23 +0000 (11:38 -0600)]
mesa: simplify fbo format checking code
Brian Paul [Fri, 22 Oct 2010 17:25:14 +0000 (11:25 -0600)]
mesa: 80-column wrapping
Brian Paul [Fri, 22 Oct 2010 17:01:06 +0000 (11:01 -0600)]
docs: updated GL3 status for primitive restart
Chia-I Wu [Sat, 23 Oct 2010 09:27:58 +0000 (17:27 +0800)]
st/egl: Use resource reference count for egl_g3d_sync.
Chia-I Wu [Sat, 23 Oct 2010 08:51:01 +0000 (16:51 +0800)]
egl: Fix a false negative check in _eglCheckMakeCurrent.
This call sequence
eglMakeCurrent(dpy, surf, surf, ctx1);
eglMakeCurrent(dpy, surf, surf, ctx2);
should be valid if ctx1 and ctx2 have the same client API and are not
current in another thread.
Chia-I Wu [Sat, 23 Oct 2010 04:52:26 +0000 (12:52 +0800)]
egl: Use reference counting to replace IsLinked or IsBound.
Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update
_eglBindContext and drivers to do reference counting.
Chia-I Wu [Sat, 23 Oct 2010 03:59:03 +0000 (11:59 +0800)]
egl: Add reference count for resources.
This is a really simple mechanism. There is no atomicity and the caller
is expected to hold the display lock.
Chia-I Wu [Sat, 23 Oct 2010 03:31:29 +0000 (11:31 +0800)]
st/egl: Fix native_mode refresh mode.
Define the unit to match _EGLMode's.
Chia-I Wu [Fri, 22 Oct 2010 18:52:14 +0000 (02:52 +0800)]
egl: Fix _eglModeLookup.
Internally a mode belongs to a screen. But functions like
eglGetModeAttribMESA treat a mode as a display resource: a mode can be
looked up without a screen. Considering how KMS works, it is better to
stick to the current implementation.
To properly support looking up a mode without a screen, this commit
assigns each mode (of all screens) a unique ID.
Chia-I Wu [Fri, 22 Oct 2010 18:11:21 +0000 (02:11 +0800)]
egl: Minor changes to the _EGLScreen interface.
Make _eglInitScreen take a display and rename _eglAddScreen to
_eglLinkScreen. Remove unused functions.
Chia-I Wu [Fri, 22 Oct 2010 16:47:22 +0000 (00:47 +0800)]
egl: Minor changes to the _EGLConfig interface.
Mainly to rename _eglAddConfig to _eglLinkConfig, along with a few clean
ups.
Chia-I Wu [Fri, 22 Oct 2010 16:37:19 +0000 (00:37 +0800)]
egl: Drop dpy argument from the link functions.
All display resources are already initialized with a display. Linking
simply links a resource to its display.
Eric Anholt [Fri, 22 Oct 2010 19:57:00 +0000 (12:57 -0700)]
i965: Add support for pull constants to the new FS backend.
Fixes glsl-fs-uniform-array-5, but not 6 which fails in ir_to_mesa.
Eric Anholt [Fri, 22 Oct 2010 20:17:38 +0000 (13:17 -0700)]
i965: Move the FS disasm/annotation printout to codegen time.
This makes it a lot easier to track down where we failed when some
code emit triggers an assert. Plus, less memory allocation for
codegen.
Dave Airlie [Fri, 22 Oct 2010 21:45:59 +0000 (07:45 +1000)]
r600g: not fatal if we can't get tiling info from kernel
Marek Olšák [Fri, 22 Oct 2010 18:33:25 +0000 (20:33 +0200)]
r300g: say no to PIPE_CAP_STREAM_OUTPUT and PIPE_CAP_PRIMITIVE_RESTART
Marek Olšák [Fri, 22 Oct 2010 17:45:05 +0000 (19:45 +0200)]
r300g: do not print get_param errors in non-debug build
Brian Paul [Fri, 22 Oct 2010 14:59:06 +0000 (08:59 -0600)]
mesa: move declaration before code
Brian Paul [Fri, 22 Oct 2010 14:58:35 +0000 (08:58 -0600)]
galahad: silence warnings
Francisco Jerez [Fri, 22 Oct 2010 11:43:57 +0000 (13:43 +0200)]
dri/nouveau: Force a "slow" Z clear if we're getting a new depth buffer.
Chia-I Wu [Fri, 22 Oct 2010 10:11:04 +0000 (18:11 +0800)]
egl: Move fallback routines to eglfallbacks.c.
We do not want them to be all over the places.
Chia-I Wu [Fri, 22 Oct 2010 09:09:40 +0000 (17:09 +0800)]
egl: Parse image attributes with _eglParseImageAttribList.
Avoid code duplications.
Chia-I Wu [Fri, 22 Oct 2010 08:36:47 +0000 (16:36 +0800)]
egl: Move attributes in _EGLImage to _EGLImageAttribs.
The opaque nature of EGLImage implies that extensions almost always
define their own attributes. Move attributes in _EGLImage to
_EGLImageAttribs and add a helper function to parse attribute lists.
Chia-I Wu [Fri, 22 Oct 2010 07:44:33 +0000 (15:44 +0800)]
egl_glx: Fix borken driver.
The driver was broken since
6eda3f311bc24999835003e404d5eda5599bc5de.
All configs fail to pass _eglValidateConfig.
Chia-I Wu [Fri, 22 Oct 2010 06:55:31 +0000 (14:55 +0800)]
egl_glx: Drop the use of [SG]ET_CONFIG_ATTRIB.
_EGLConfig can be directly dereferenced now. Since egl_glx is the last
user of the macros, drop the macros too.
Chia-I Wu [Fri, 22 Oct 2010 07:03:11 +0000 (15:03 +0800)]
egl_dri2: Drop the use of _egl[SG]etConfigKey.
_EGLConfig can be directly dereferenced now.
Brian Paul [Fri, 22 Oct 2010 01:55:01 +0000 (19:55 -0600)]
winsys/xlib: rename xm->xlib
Move away from the old Mesa-oriented names.
Brian Paul [Fri, 22 Oct 2010 01:49:32 +0000 (19:49 -0600)]
winsys/xlib: fix up allocation/dealloction of XImage
Fixes a crash upon exit when using remote display.
Brian Paul [Fri, 22 Oct 2010 01:37:11 +0000 (19:37 -0600)]
winsys/xlib: use Bool type for shm field
Brian Paul [Fri, 22 Oct 2010 01:17:31 +0000 (19:17 -0600)]
winsys/xlib: formatting fixes
Brian Paul [Fri, 22 Oct 2010 01:05:40 +0000 (19:05 -0600)]
Merge branch 'primitive-restart-cleanup'
Conflicts:
docs/relnotes-7.10.html
This branch is a re-do of the primitive-restart branch with all
the intermediate/temporary stuff cleaned out.
Brian Paul [Fri, 22 Oct 2010 01:03:39 +0000 (19:03 -0600)]
docs: added GL_NV_primitive_restart extension
Brian Paul [Fri, 22 Oct 2010 01:03:38 +0000 (19:03 -0600)]
llvmpipe: enable primitive restart