mesa.git
15 years agor200: make use of DMA buffers for Elts a lot better.
Dave Airlie [Fri, 26 Jun 2009 05:05:02 +0000 (15:05 +1000)]
r200: make use of DMA buffers for Elts a lot better.

This allows us to return the unused portion of the dma buffer
to the allocator instead of wasting nearly 16k a pop.

15 years agor200: only emit unitneeded textures
Dave Airlie [Fri, 26 Jun 2009 05:04:30 +0000 (15:04 +1000)]
r200: only emit unitneeded textures

15 years agor300-gallium: organize fragment/vertex shaders
Joakim Sindholt [Thu, 25 Jun 2009 23:08:13 +0000 (01:08 +0200)]
r300-gallium: organize fragment/vertex shaders

Appart from separating r3xx/r5xx fragment shaders, a more consistent
naming scheme has been applied. From now on:
r300 = all chips
r3xx = R300/R400 only
r5xx = R500 only
This way r300_fragment_shader is the master struct, and the structs
r3xx_fragment_shader and r5xx_fragment_shader inherits it.

15 years agogallium: Add PIPE_OS_APPLE token.
Vinson Lee [Thu, 25 Jun 2009 15:52:50 +0000 (09:52 -0600)]
gallium: Add PIPE_OS_APPLE token.

15 years agoprogs/tests: Add yet another mipmap test
Jakob Bornecrantz [Sat, 13 Jun 2009 23:04:00 +0000 (01:04 +0200)]
progs/tests: Add yet another mipmap test

15 years agoradeon: fix hw texture limits
Roland Scheidegger [Thu, 25 Jun 2009 13:57:33 +0000 (15:57 +0200)]
radeon: fix hw texture limits

still always enable max, but the right values this time.
More work should probably be done for saner limits without mm, and/or
dri conf option allow_large_textures (which is ignored) removed.
3D limit on r100 is pretty arbitrary as still handled by swrast anyway.
Also fix r300 limits (except 3d I've no idea what the max is anyway so
keep using mesa default).

15 years agoradeon/r200: add some hw texture limits
Dave Airlie [Thu, 25 Jun 2009 03:26:52 +0000 (13:26 +1000)]
radeon/r200: add some hw texture limits

15 years agoradeon: fix stupidity in cs space check code.
Dave Airlie [Thu, 25 Jun 2009 02:13:17 +0000 (12:13 +1000)]
radeon: fix stupidity in cs space check code.

This was already correct in the GEM code

15 years agointel: fix additional merge conflicts missed in previous commit
Brian Paul [Wed, 24 Jun 2009 14:57:48 +0000 (08:57 -0600)]
intel: fix additional merge conflicts missed in previous commit

15 years agoMerge branch 'mesa_7_5_branch'
Brian Paul [Wed, 24 Jun 2009 14:54:37 +0000 (08:54 -0600)]
Merge branch 'mesa_7_5_branch'

Conflicts:

src/mesa/drivers/dri/i915/i915_tex_layout.c
src/mesa/drivers/dri/i965/brw_wm_glsl.c
src/mesa/drivers/dri/intel/intel_buffer_objects.c
src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
src/mesa/drivers/dri/intel/intel_pixel_draw.c
src/mesa/main/enums.c
src/mesa/main/texstate.c
src/mesa/vbo/vbo_exec_array.c

15 years agowgl: Handle flush after a window is destroyed.
José Fonseca [Wed, 24 Jun 2009 13:46:07 +0000 (14:46 +0100)]
wgl: Handle flush after a window is destroyed.

Fixes assertion failure with conform.

15 years agoidentity: Add new identity driver
Jakob Bornecrantz [Wed, 24 Jun 2009 00:42:41 +0000 (02:42 +0200)]
identity: Add new identity driver

This driver does no transformation of the gallium calls
going to the real driver, like the identity matrix. It is
intended to be the basis for transforming and/or debug
drivers like trace and rbug.

Authors of this patch are:
Michal Krol, orignal heavy lifting.
José Fonesca, object wrapping code stolen from trace.
Jakob Bornecrantz, put it all toghether and renamed a stuff.

15 years agoi965: Disable texture tiling by default.
Eric Anholt [Wed, 24 Jun 2009 02:31:43 +0000 (19:31 -0700)]
i965: Disable texture tiling by default.

I haven't fixed all the regressions yet, and it'll be easy to re-enable when
the known problems are fixed.

15 years agoi965: Set the max index buffer address correctly according to the docs.
Eric Anholt [Wed, 24 Jun 2009 02:30:25 +0000 (19:30 -0700)]
i965: Set the max index buffer address correctly according to the docs.

It's the last addressable byte, not the byte after the end of the buffer.

15 years agoi965: Don't set a reserved bit in MI_FLUSH.
Eric Anholt [Wed, 24 Jun 2009 02:29:35 +0000 (19:29 -0700)]
i965: Don't set a reserved bit in MI_FLUSH.

I noticed this when this MI_FLUSH showed up in IPEHR for the ut2004 hang.
Not setting the reserved bit didn't help, though.

15 years agodri2: Refresh the fake front contents after glXSwapBuffers().
Eric Anholt [Mon, 22 Jun 2009 23:33:29 +0000 (16:33 -0700)]
dri2: Refresh the fake front contents after glXSwapBuffers().

Bug #19177.

Reviewed by: Ian Romanick <ian.d.romanick@intel.com>

15 years agoi965: Fix depth-texture Y-tiling detection for sized internal formats.
Eric Anholt [Mon, 22 Jun 2009 23:23:56 +0000 (16:23 -0700)]
i965: Fix depth-texture Y-tiling detection for sized internal formats.

Fixes assertion failure on norsetto shadow mapping demo.

15 years agoi965: Fix packed depth/stencil textures to be Y-tiled as well.
Eric Anholt [Mon, 22 Jun 2009 22:39:37 +0000 (15:39 -0700)]
i965: Fix packed depth/stencil textures to be Y-tiled as well.

Fixes shadowtex.c.  And an assert is added to catch this sooner next time.

15 years agointel: Bail on blits with non-tile-aligned offsets.
Eric Anholt [Mon, 22 Jun 2009 22:23:38 +0000 (15:23 -0700)]
intel: Bail on blits with non-tile-aligned offsets.

15 years agointel: Avoid trying to do blits to Y tiled regions.
Eric Anholt [Mon, 22 Jun 2009 18:00:11 +0000 (11:00 -0700)]
intel: Avoid trying to do blits to Y tiled regions.

This is somewhat nasty, but we need to do Y-tiled depth for FBO support.
May help with corruption and hangs since enabling texture tiling, and
since switching depth textures to Y tiled.

Fixes piglit depthtex.c on 965.

15 years agointel: Fix some potential writes to zero-copy PBOs when used as regions.
Eric Anholt [Mon, 22 Jun 2009 18:20:18 +0000 (11:20 -0700)]
intel: Fix some potential writes to zero-copy PBOs when used as regions.

I was in the midst of fixing some blitting-with-Y-tiled issues when I
noticed this.  Hopefully PBO usage will be a little more robust, as a
result.

15 years agointel: Remove long-unused intel_region_fill and intelEmitFillBlit.
Eric Anholt [Mon, 22 Jun 2009 17:54:50 +0000 (10:54 -0700)]
intel: Remove long-unused intel_region_fill and intelEmitFillBlit.

15 years agointel: Refuse to do texture tiling if we don't have the kernel support.
Eric Anholt [Mon, 22 Jun 2009 18:54:02 +0000 (11:54 -0700)]
intel: Refuse to do texture tiling if we don't have the kernel support.

15 years agodemos: fix issues in glxcontexts.c
Brian Paul [Tue, 23 Jun 2009 15:31:27 +0000 (09:31 -0600)]
demos: fix issues in glxcontexts.c

The reshape() function was called when there was no GLX context so
the viewport/modelview/projection setup wasn't doing anything.  Move
the call to reshape() into draw().

Also, remove -stereo, -fullscreen options and do some general clean-up.

15 years agoFix crash when debug output is enabled and sarea is notset in r200Clear
Pauli Nieminen [Tue, 23 Jun 2009 14:43:00 +0000 (16:43 +0200)]
Fix crash when debug output is enabled and sarea is notset in r200Clear

15 years agomesa: From float type modifier from values to large for singles
Ian Romanick [Tue, 23 Jun 2009 01:22:51 +0000 (18:22 -0700)]
mesa: From float type modifier from values to large for singles

The values 2147483648.0 and 4294967294.0 are too larget to be stored in single
precision floats.  Forcing these to be singles causes bits to be lost, which
results in errors in some pixel transfer tests.

This fixes bug #22344.

15 years agost/mesa: fix setup_edgeflags() regression
Brian Paul [Mon, 22 Jun 2009 23:49:22 +0000 (17:49 -0600)]
st/mesa: fix setup_edgeflags() regression

stobj is now non-null for the default/null buffer object.  Update the
test to check the buffer ID to see if it's a real buffer object.

15 years agoi965: handle OPCODE_SWZ in the glsl path
Roland Scheidegger [Tue, 16 Jun 2009 19:38:58 +0000 (21:38 +0200)]
i965: handle OPCODE_SWZ in the glsl path

glsl compiler will not generate OPCODE_SWZ, and as a first step it would
be translated away to a MOV anyway (why?), but later internally this opcode is
generated (for EXT_texture_swizzling).
(cherry picked from commit 4ef1f8e3b52a06fcf58f78c9c36738531b91dbac)

15 years agoDisable SGI_swap_control extension for DRI2
Owen W. Taylor [Sat, 6 Jun 2009 18:46:22 +0000 (14:46 -0400)]
Disable SGI_swap_control extension for DRI2

We currently don't have support for SGI_swap_control for direct
contexts with DRI2, so disable reporting the extension. Reporting
the extension, and then having glXSwapIntervalSGI() "succeed"
but do nothing can confuse applications.

https://bugs.freedesktop.org/show_bug.cgi?id=22123
(cherry picked from commit 279143c6e808b37c333321b696d80df77f709a04)

15 years agointel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.
Michel Dänzer [Thu, 11 Jun 2009 10:09:10 +0000 (12:09 +0200)]
intel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.

Fixes glean depthStencil test.
(cherry picked from commit 3885b708fdbb7bbd5dd3a247c41fb9a75ee7c057)

15 years agoi965: added intelFlush() call in intel_get_tex_image()
Brian Paul [Tue, 9 Jun 2009 21:07:39 +0000 (15:07 -0600)]
i965: added intelFlush() call in intel_get_tex_image()

Fixes the render-to-texture test in progs/tests/getteximage.c
(cherry picked from commit a03b349153660e449daf4f56d750f1caef23b1a5)

15 years agomesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS/ in NV funcs
Brian Paul [Fri, 22 May 2009 13:19:27 +0000 (07:19 -0600)]
mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS/ in NV funcs
(cherry picked from commit 4dc426c01627a240bd5b148c1804c45b0d5ecd6c)

15 years agomesa: rename MAX_VERTEX_ATTRIBS to MAX_VERTEX_GENERIC_ATTRIBS
Brian Paul [Fri, 22 May 2009 13:26:08 +0000 (07:26 -0600)]
mesa: rename MAX_VERTEX_ATTRIBS to MAX_VERTEX_GENERIC_ATTRIBS

Be clearer that this is the number of generic vertex program/shader
attributes, not counting the legacy attributes (pos, normal, color, etc).
(cherry picked from commit 4a95185c9f30c2de7a03bb1a0653f51b53b1111d)

15 years agomesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS
Brian Paul [Thu, 21 May 2009 23:03:21 +0000 (17:03 -0600)]
mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS
(cherry picked from commit d2a74d76c96957cf0294dcf40d29526621ada95e)

15 years agomesa: fix some potential state-restore issues in pop_texture_group()
Brian Paul [Thu, 21 May 2009 16:05:04 +0000 (10:05 -0600)]
mesa: fix some potential state-restore issues in pop_texture_group()

Call the _mesa_set_enable() functions instead of driver functions, etc.

Also, add missing code for 1D/2D texture arrays.
(cherry picked from commit aac19609bfd7c950b2577489b06886c8a8097bb2)

15 years agovbo: return VP_NONE from get_program_mode() if running fixed-func vertex program
Brian Paul [Thu, 21 May 2009 15:52:33 +0000 (09:52 -0600)]
vbo: return VP_NONE from get_program_mode() if running fixed-func vertex program

If we're running a vertex program to emulated fixed-function, we still need
to treat vertex arrays/attributes as if we're in fixed-function mode.

This should probably be back-ported to Mesa 7.5 after a bit more testing.
(cherry picked from commit dda82137d28aba846dda73da230871c115e30aaf)

15 years agomesa: create/use a fallback texture when bound texture is incomplete
Brian Paul [Fri, 1 May 2009 15:30:32 +0000 (09:30 -0600)]
mesa: create/use a fallback texture when bound texture is incomplete

When a GLSL sampler reads from an incomplete texture it should
return (0,0,0,1).  Instead of jumping through hoops in all the drivers
to make this happen, just create/install a fallback texture with those
texel values.

Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some
GPU lockups when trying to sample from missing surfaces.  If a binding
table entry is NULL, it seems that sampling sometimes works, but not
always (lockup).

Todo: create a fallback texture for each type of texture target?
(cherry picked from commit 3f25219c7bf0f090502489928f0f018e62c4f6cf)

15 years agogallium-intel: Improve Xorg Makefile a bit
Jakob Bornecrantz [Mon, 22 Jun 2009 21:15:21 +0000 (23:15 +0200)]
gallium-intel: Improve Xorg Makefile a bit

The real solution is to create a Makefile.template for xorg
drivers and use that here.

15 years agost/xorg: Convert to template makefile
Jakob Bornecrantz [Mon, 22 Jun 2009 21:09:56 +0000 (23:09 +0200)]
st/xorg: Convert to template makefile

15 years agost/dri: Fix typo when checking for depth formats
Jakob Bornecrantz [Mon, 22 Jun 2009 21:05:33 +0000 (23:05 +0200)]
st/dri: Fix typo when checking for depth formats

15 years agoi965: Fix warnings in intel_pixel_read.c.
Eric Anholt [Mon, 22 Jun 2009 15:52:52 +0000 (08:52 -0700)]
i965: Fix warnings in intel_pixel_read.c.

15 years agointel: Fix glReadPixels regression since changing context init order.
Michel Dänzer [Mon, 22 Jun 2009 12:40:51 +0000 (14:40 +0200)]
intel: Fix glReadPixels regression since changing context init order.

Fixes regression in dd26899ca39111e0866afed9df94bfb1618dd363 that also
affected some PBO operations.

15 years agointel: Also get the DRI2 front buffer when doing front buffer reading.
Eric Anholt [Sat, 20 Jun 2009 05:12:52 +0000 (22:12 -0700)]
intel: Also get the DRI2 front buffer when doing front buffer reading.

15 years agointel: Update Mesa state before span setup in glReadPixels.
Eric Anholt [Sat, 20 Jun 2009 05:03:37 +0000 (22:03 -0700)]
intel: Update Mesa state before span setup in glReadPixels.

We could have mapped the wrong set of draw buffers.  Noticed while looking
into a DRI2 glean ReadPixels issue.

15 years agointel: Move intel_pixel_read.c to shared for use with i965.
Eric Anholt [Sat, 20 Jun 2009 04:43:22 +0000 (21:43 -0700)]
intel: Move intel_pixel_read.c to shared for use with i965.

15 years agointel: Don't map regions with drm_intel_gem_bo_map_gtt() unless they're tiled.
Eric Anholt [Sat, 20 Jun 2009 00:14:27 +0000 (17:14 -0700)]
intel: Don't map regions with drm_intel_gem_bo_map_gtt() unless they're tiled.

This fixes a regression in region read performance that came in with the
texture tiling changes.  Ideally we'd have an access flag coming in so we
could also use bo_map_gtt for writing, like we do for buffer objects.

Bug #22190

15 years agointel: Fix other metaops versus GL_COMPILE_AND_EXECUTE dlists.
Eric Anholt [Fri, 19 Jun 2009 22:57:03 +0000 (15:57 -0700)]
intel: Fix other metaops versus GL_COMPILE_AND_EXECUTE dlists.

Fixes oglconform zbfunc.c and pxtrans-cidraw.c, at least.

(cherry picked from commit 405300bb190f516e16b704050abe3389b366ed27)

15 years agointel: Fix glClear behavior versus display lists.
Eric Anholt [Fri, 19 Jun 2009 22:49:24 +0000 (15:49 -0700)]
intel: Fix glClear behavior versus display lists.

The CALL_DrawArrays was leaking the clear's primitives into the display
list with GL_COMPILE_AND_EXECUTE.  Use _mesa_DrawArrays instead, which
doesn't appear to leak.  Fixes piglit dlist-clear test.
(cherry picked from commit 64edde1004f7a69e77877bba24d315a92bcd47c8)

15 years agointel: Fix other metaops versus GL_COMPILE_AND_EXECUTE dlists.
Eric Anholt [Fri, 19 Jun 2009 22:57:03 +0000 (15:57 -0700)]
intel: Fix other metaops versus GL_COMPILE_AND_EXECUTE dlists.

Fixes oglconform zbfunc.c and pxtrans-cidraw.c, at least.

15 years agointel: Fix glClear behavior versus display lists.
Eric Anholt [Fri, 19 Jun 2009 22:49:24 +0000 (15:49 -0700)]
intel: Fix glClear behavior versus display lists.

The CALL_DrawArrays was leaking the clear's primitives into the display
list with GL_COMPILE_AND_EXECUTE.  Use _mesa_DrawArrays instead, which
doesn't appear to leak.  Fixes piglit dlist-clear test.

15 years agomesa: Make VBO dlist printing use the same path as other dlist printing.
Eric Anholt [Fri, 19 Jun 2009 22:36:50 +0000 (15:36 -0700)]
mesa: Make VBO dlist printing use the same path as other dlist printing.

I was rather confused when mesa_print_display_list didn't show any of
my glBegin()..glEnd().  Nothing but print_list appears to call
this function, so matching its behavior seems like a good idea.

15 years agointel: Do not access pbo's buffer directly when attaching.
Chia-I Wu [Thu, 18 Jun 2009 05:42:24 +0000 (13:42 +0800)]
intel: Do not access pbo's buffer directly when attaching.

pbo might be system buffer based or attached to another region.  Call
intel_bufferobj_buffer to make sure pbo has a buffer of its own.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agointel: Data are copied in the wrong direction when breaking COW tie.
Chia-I Wu [Thu, 18 Jun 2009 05:42:23 +0000 (13:42 +0800)]
intel: Data are copied in the wrong direction when breaking COW tie.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agointel: Fix migration from sys_buffer in intel_bufferobj_buffer.
Chia-I Wu [Thu, 18 Jun 2009 05:42:22 +0000 (13:42 +0800)]
intel: Fix migration from sys_buffer in intel_bufferobj_buffer.

intel_bufferobj_subdata is called to migrate data from sys_buffer, and
it expects only one of buffer or sys_buffer is non-NULL.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
15 years agoradeon: make cubemap mipmap generation work
Roland Scheidegger [Fri, 19 Jun 2009 22:27:36 +0000 (00:27 +0200)]
radeon: make cubemap mipmap generation work

need to pass target parameter to radeon_teximage/radeon_subteximage functions
otherwise mipmap generation for cube maps can't work (assert/segfault in
_mesa_generate_mipmap)

15 years agodemos: make cubemap work without EXT_fbo support
Roland Scheidegger [Fri, 19 Jun 2009 22:24:03 +0000 (00:24 +0200)]
demos: make cubemap work without EXT_fbo support

use SGIS_generate_mipmap if EXT_fbo support (for manual mipmap generation)
is not available.

15 years agointel: Fixups for 'mesa: create/destroy buffer objects via driver functions'.
Michel Dänzer [Fri, 19 Jun 2009 21:55:55 +0000 (23:55 +0200)]
intel: Fixups for 'mesa: create/destroy buffer objects via driver functions'.

Initialize all driver function hooks before calling _mesa_initialize_context(),
and handle all buffer objects in intel_buffer_object().

Fixes assertion failure when running glxinfo.

15 years agoradeon: fix cube maps for non-mm path
Roland Scheidegger [Fri, 19 Jun 2009 20:55:34 +0000 (22:55 +0200)]
radeon: fix cube maps for non-mm path

drm cmd checker would refuse cube emits
also fix an issue in the cs path which would calculate the register
offset off by one dword.
Only same testing done as original code (none except compile tested).

15 years agost/mesa: restore some parameter checking buffer object functions
Brian Paul [Fri, 19 Jun 2009 20:42:37 +0000 (14:42 -0600)]
st/mesa: restore some parameter checking buffer object functions

These functions may be called from the VBO code (not just user GL calls)
so do some parameter sanity checking.

15 years agor200: fix cube maps for non-mm path
Roland Scheidegger [Fri, 19 Jun 2009 20:32:06 +0000 (22:32 +0200)]
r200: fix cube maps for non-mm path

drm cmd checker rightfully fell over any cube emit

15 years agoi965: initial code for loops in vertex programs
Brian Paul [Thu, 18 Jun 2009 15:26:18 +0000 (09:26 -0600)]
i965: initial code for loops in vertex programs

15 years agoi965: asst clean-ups, etc in brw_vs_emit()
Brian Paul [Thu, 18 Jun 2009 15:23:58 +0000 (09:23 -0600)]
i965: asst clean-ups, etc in brw_vs_emit()

15 years agoi965: asst clean-ups, var renaming in brw_wm_emit_glsl()
Brian Paul [Thu, 18 Jun 2009 15:20:55 +0000 (09:20 -0600)]
i965: asst clean-ups, var renaming in brw_wm_emit_glsl()

15 years agost/mesa: remove redundant st_buffer_object::size field and error checks
Brian Paul [Fri, 19 Jun 2009 18:19:15 +0000 (12:19 -0600)]
st/mesa: remove redundant st_buffer_object::size field and error checks

Just use the gl_buffer_object::Size field.  Remove unnecessary size/offset
error checks.  Core Mesa will have already done these checks before these
functions are called.

15 years agost/mesa: no longer special-case buffer object 0 in st_buffer_object() cast wrapper
Brian Paul [Fri, 19 Jun 2009 18:12:54 +0000 (12:12 -0600)]
st/mesa: no longer special-case buffer object 0 in st_buffer_object() cast wrapper

Since commit 6629a35559ff7e3b993966f697f7c7f68e5a38d9 "mesa: create/destroy
buffer objects via driver functions" this is no longer needed, and actually
was causing a crash during context tear-down.

15 years agoradeons: use dp4 for position invariant vertex programs
Roland Scheidegger [Fri, 19 Jun 2009 18:00:55 +0000 (20:00 +0200)]
radeons: use dp4 for position invariant vertex programs

Fixes #22181. R200 requires this since DP4 is used in hw tnl mode.
R300 prefers it (should be faster due to no instruction dependencies), but
both methods should be correct (when sw tcl is used though, MUL/MAD might
be faster). Probably doesn't make much difference for R100 since vertex progs
are executed in software anyway, but let's just keep it the same there too.

15 years agoradeons: use dp4 for position invariant vertex programs
Roland Scheidegger [Fri, 19 Jun 2009 18:00:55 +0000 (20:00 +0200)]
radeons: use dp4 for position invariant vertex programs

Fixes #22181. R200 requires this since DP4 is used in hw tnl mode.
R300 prefers it (should be faster due to no instruction dependencies), but
both methods should be correct (when sw tcl is used though, MUL/MAD might
be faster). Probably doesn't make much difference for R100 since vertex progs
are executed in software anyway, but let's just keep it the same there too.

15 years agomesa: make query-related driver fallback functions static
Brian Paul [Fri, 19 Jun 2009 16:05:08 +0000 (10:05 -0600)]
mesa: make query-related driver fallback functions static

Plug them in via _mesa_init_query_object_functions().

15 years agoAlso release direct rendering resources in glXDestroyGLXPixmap.
Michel Dänzer [Fri, 19 Jun 2009 09:19:07 +0000 (11:19 +0200)]
Also release direct rendering resources in glXDestroyGLXPixmap.

Fixes leak running compiz with direct rendering.

15 years agoAlways free image offsets memory when re-initializing texture image fields.
Michel Dänzer [Fri, 19 Jun 2009 09:19:08 +0000 (11:19 +0200)]
Always free image offsets memory when re-initializing texture image fields.

Fixes leak running compiz with direct rendering.

15 years agomesa: make buffer object-related driver fallback functions static
Brian Paul [Fri, 19 Jun 2009 16:00:03 +0000 (10:00 -0600)]
mesa: make buffer object-related driver fallback functions static

Plug them in via _mesa_init_buffer_object_functions().

15 years agomesa: create/destroy buffer objects via driver functions
Brian Paul [Fri, 19 Jun 2009 15:58:51 +0000 (09:58 -0600)]
mesa: create/destroy buffer objects via driver functions

15 years agoi965simple: use u_reduced_prim() function
Brian Paul [Fri, 19 Jun 2009 15:48:43 +0000 (09:48 -0600)]
i965simple: use u_reduced_prim() function

15 years agodraw: use u_reduced_prim() function
Brian Paul [Fri, 19 Jun 2009 15:45:23 +0000 (09:45 -0600)]
draw: use u_reduced_prim() function

15 years agosoftpipe: use u_reduced_prim()
Brian Paul [Fri, 19 Jun 2009 15:42:37 +0000 (09:42 -0600)]
softpipe: use u_reduced_prim()

15 years agogallium/util: s/boolean/unsigned/
Brian Paul [Fri, 19 Jun 2009 15:39:56 +0000 (09:39 -0600)]
gallium/util: s/boolean/unsigned/

15 years agosoftpipe: whitespace, reformatting
Brian Paul [Fri, 19 Jun 2009 15:38:12 +0000 (09:38 -0600)]
softpipe: whitespace, reformatting

15 years agoMerge branch 'ext-provoking-vertex'
Brian Paul [Fri, 19 Jun 2009 15:15:34 +0000 (09:15 -0600)]
Merge branch 'ext-provoking-vertex'

Conflicts:

docs/relnotes-7.6.html
progs/tests/Makefile
src/gallium/drivers/softpipe/sp_prim_vbuf.c
src/glx/x11/indirect.c
src/mesa/glapi/Makefile
src/mesa/glapi/dispatch.h
src/mesa/glapi/glapioffsets.h
src/mesa/glapi/glapitable.h
src/mesa/glapi/glapitemp.h
src/mesa/glapi/glprocs.h
src/mesa/main/dlist.c
src/mesa/main/enums.c
src/mesa/sparc/glapi_sparc.S
src/mesa/x86-64/glapi_x86-64.S
src/mesa/x86/glapi_x86.S

15 years agoscons: Output the friendly "Linking ..." message when creating DLLs with MinGW.
José Fonseca [Fri, 19 Jun 2009 14:39:59 +0000 (15:39 +0100)]
scons: Output the friendly "Linking ..." message when creating DLLs with MinGW.

15 years agosoftpipe: return alpha=1 in shadow_compare() function
Brian Paul [Fri, 19 Jun 2009 14:40:43 +0000 (08:40 -0600)]
softpipe: return alpha=1 in shadow_compare() function

The alpha value wasn't set at all before so we got unpredictable results.

Note that we don't currently obey GL_DEPTH_TEXTURE_MODE in the state
tracker.  For now, we return the result in the default mode (r,r,r,1).

15 years agodraw: use flatfirst variable
Brian Paul [Fri, 19 Jun 2009 05:00:37 +0000 (23:00 -0600)]
draw: use flatfirst variable

15 years agodraw: remove debug code
Brian Paul [Fri, 19 Jun 2009 04:51:41 +0000 (22:51 -0600)]
draw: remove debug code

15 years agodraw: fix first provoking vertex mode for quads, quad strips and polygons
Brian Paul [Fri, 19 Jun 2009 04:48:51 +0000 (22:48 -0600)]
draw: fix first provoking vertex mode for quads, quad strips and polygons

15 years agodraw: fix first provoking vertex mode for unfilled quads
Brian Paul [Fri, 19 Jun 2009 04:47:46 +0000 (22:47 -0600)]
draw: fix first provoking vertex mode for unfilled quads

15 years agomesa: fix first provoking vertex mode for unfilled tri strips
Brian Paul [Fri, 19 Jun 2009 04:45:57 +0000 (22:45 -0600)]
mesa: fix first provoking vertex mode for unfilled tri strips

15 years agodraw: clean up indentation
Brian Paul [Fri, 19 Jun 2009 00:33:29 +0000 (18:33 -0600)]
draw: clean up indentation

15 years agoutil: Add cast.
José Fonseca [Thu, 18 Jun 2009 13:47:30 +0000 (14:47 +0100)]
util: Add cast.

It is expected to loose precision here.

15 years agodraw: Replace pointer arithmetic with cast.
José Fonseca [Thu, 18 Jun 2009 13:46:45 +0000 (14:46 +0100)]
draw: Replace pointer arithmetic with cast.

Using uintptr_t as intermediate type for pointer -> integer conversions is
easier to understand and does not cause any size mismatch warnings.
uintptr_t is part of C99, and we already provide a suitable replacement
definition for all platforms we care about.

15 years agotrace: Use size_t consistently.
José Fonseca [Thu, 18 Jun 2009 11:52:10 +0000 (12:52 +0100)]
trace: Use size_t consistently.

15 years agopipebuffer: Use a type consistently for sizes/offsets.
José Fonseca [Thu, 18 Jun 2009 11:51:00 +0000 (12:51 +0100)]
pipebuffer: Use a type consistently for sizes/offsets.

Avoids warnings on 64bit builds.

Use regular unsigned since that's what gallium expects, but use a
typedef to facilitate possible changes in the future.

15 years agowgl: Fix window resizing in multithread applications.
José Fonseca [Wed, 17 Jun 2009 20:28:18 +0000 (21:28 +0100)]
wgl: Fix window resizing in multithread applications.

In multithreading stw_call_window_proc can be called by a thread other
than the thread where the context is bound.

15 years agowgl: Move all thread related code together.
José Fonseca [Wed, 17 Jun 2009 18:24:51 +0000 (19:24 +0100)]
wgl: Move all thread related code together.

Not only for cosmetic reasons, but also because we need to set the
SetWindowsHookEx hook for threads created before the DllMain is called
(threads for each we don't get the DLL_THREAD_ATTACH notification).

15 years agoglew: correct misspelling of glFramebufferTextureLayer
Keith Whitwell [Thu, 18 Jun 2009 09:13:55 +0000 (10:13 +0100)]
glew: correct misspelling of glFramebufferTextureLayer

This was misspelt as glFramebufferTexturLayer (missing e), causing
conflicts with the correctly spelt version in glext.h and extfuncs.h.

15 years agomesa: protect Elements against multiple definitions
Keith Whitwell [Thu, 11 Jun 2009 09:52:37 +0000 (10:52 +0100)]
mesa: protect Elements against multiple definitions

Mesa and gallium both have a definition of this macro

15 years agointel: remove extra \n from warning string
Brian Paul [Mon, 8 Jun 2009 20:41:54 +0000 (14:41 -0600)]
intel: remove extra \n from warning string
(cherry picked from commit 42e9bde0fa2276b8f5bb434328eea7665794b127)

15 years agoi965: fix 1D texture borders with GL_CLAMP_TO_BORDER
Robert Ellison [Thu, 14 May 2009 02:40:23 +0000 (20:40 -0600)]
i965: fix 1D texture borders with GL_CLAMP_TO_BORDER

With 1D textures, GL_TEXTURE_WRAP_T should be ignored (only
GL_TEXTURE_WRAP_S should be respected).  But the i965 hardware
seems to follow the value of GL_TEXTURE_WRAP_T even when sampling
1D textures.

This fix forces GL_TEXTURE_WRAP_T to be GL_REPEAT whenever 1D
textures are used; this allows the texture to be sampled
correctly, avoiding "imaginary" border elements in the T direction.

This bug was demonstrated in the Piglit tex1d-2dborder test.
With this fix, that test passes.
(cherry picked from commit ab6c4fa582972e25f8800c77b5dd5b3a83afc996)

15 years agoi965: send all warnings through _mesa_warning()
Robert Ellison [Thu, 14 May 2009 02:38:33 +0000 (20:38 -0600)]
i965: send all warnings through _mesa_warning()

One warning message:
   drm_i915_getparam: -22

was still being sent to fprintf().  This causes all Piglit tests to fail,
even with MESA_DEBUG=0.

Using _mesa_warning() to emit the message allows the general Mesa controls
for messages like this to be applied.
(cherry picked from commit bc3270e99f5c39544aaf831742db14796ab83a6a)

15 years agoi965: fix segfault on low memory conditions
Robert Ellison [Fri, 8 May 2009 20:40:38 +0000 (14:40 -0600)]
i965: fix segfault on low memory conditions

When out of memory (in at least one case, triggered by a longrunning
memory leak), this code will segfault and crash.  By checking for the
out-of-memory condition, the system can continue, and will report
the out-of-memory error later, a much preferable outcome.
(cherry picked from commit 44a4abfd4f8695809eaec07df8eeb191d6e017d7)

15 years agoFast path when rebinding the same texture in single context environment
Ian Romanick [Wed, 3 Jun 2009 16:49:05 +0000 (17:49 +0100)]
Fast path when rebinding the same texture in single context environment

If there is no shared context, there is no purpose in rebinding the same
texture.  In some artificial tests this improves performance 10% - 30%.
(cherry picked from commit 7f8000db8bd45bb95bda4a4f8535c49b8ef74254)

15 years agoi915: Don't put VBOs in graphics memory unless required for an operation.
Eric Anholt [Tue, 2 Jun 2009 13:53:40 +0000 (06:53 -0700)]
i915: Don't put VBOs in graphics memory unless required for an operation.

This saves doing swtnl from uncached memory, which is painful.  Improves
clutter test-text performance by 10% since it started using VBOs.
(cherry picked from commit a945e203d4fe254593bc0c5c5d6caca45e65f9f7)