mesa.git
13 years agomesa: Remove SWcontext::_FogMode, use gl_context::gl_fog_attrib::Mode everywhere
Ian Romanick [Fri, 22 Apr 2011 00:36:17 +0000 (17:36 -0700)]
mesa: Remove SWcontext::_FogMode, use gl_context::gl_fog_attrib::Mode everywhere

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoegl: Use the right extension name in #ifdef
Kristian Høgsberg [Mon, 25 Apr 2011 19:34:04 +0000 (15:34 -0400)]
egl: Use the right extension name in #ifdef

13 years agowayland: Fix prototypes for EGL_WL_bind_wayland_display extension
Kristian Høgsberg [Mon, 25 Apr 2011 19:06:41 +0000 (15:06 -0400)]
wayland: Fix prototypes for EGL_WL_bind_wayland_display extension

13 years agomain: remove duplicated includes
Nicolas Kaiser [Mon, 25 Apr 2011 16:37:08 +0000 (18:37 +0200)]
main: remove duplicated includes

Remove duplicated includes of guarded headers.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agowinsys/wayland: Fix typo in Makefile
Benjamin Franzke [Mon, 25 Apr 2011 16:16:35 +0000 (18:16 +0200)]
winsys/wayland: Fix typo in Makefile

Reported by dir1212 on irc.

13 years agost/egl: Add wayland shm softpipe support
Benjamin Franzke [Sat, 23 Apr 2011 12:21:05 +0000 (14:21 +0200)]
st/egl: Add wayland shm softpipe support

13 years agost/egl: Generalize wayland backend a bit
Benjamin Franzke [Sat, 23 Apr 2011 12:20:24 +0000 (14:20 +0200)]
st/egl: Generalize wayland backend a bit

13 years agowinsys: Add wayland shm sw winsys
Benjamin Franzke [Sat, 23 Apr 2011 12:14:29 +0000 (14:14 +0200)]
winsys: Add wayland shm sw winsys

13 years agor600g: Unify comment style somewhat.
Henri Verbeet [Mon, 25 Apr 2011 11:28:55 +0000 (13:28 +0200)]
r600g: Unify comment style somewhat.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Cleanup the big endian support a bit.
Henri Verbeet [Mon, 25 Apr 2011 11:28:55 +0000 (13:28 +0200)]
r600g: Cleanup the big endian support a bit.

In particular, make sure the code is at least compiled on little endian
systems.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Use EG constants in EG r600_colorformat_endian_swap().
Henri Verbeet [Mon, 25 Apr 2011 11:28:55 +0000 (13:28 +0200)]
r600g: Use EG constants in EG r600_colorformat_endian_swap().

This would actually fail to compile when PIPE_ARCH_BIG_ENDIAN is defined.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agoconfigure.ac: require LLVM for r300g on x86 and x86_64
Marek Olšák [Thu, 21 Apr 2011 11:33:29 +0000 (13:33 +0200)]
configure.ac: require LLVM for r300g on x86 and x86_64

13 years agoconfigure.ac: enable LLVM by default on x86 and x86_64
Marek Olšák [Thu, 21 Apr 2011 11:27:55 +0000 (13:27 +0200)]
configure.ac: enable LLVM by default on x86 and x86_64

13 years agomesa: add stricter checks for float formats in the texstore memcpy path
Marek Olšák [Fri, 22 Apr 2011 17:29:55 +0000 (19:29 +0200)]
mesa: add stricter checks for float formats in the texstore memcpy path

E.g. when the internal format was RGBA16F and the source was RG, it would use
memcpy.

13 years agomesa: implement generate-mipmap fallback for RGB10_A2
Marek Olšák [Fri, 22 Apr 2011 16:22:51 +0000 (18:22 +0200)]
mesa: implement generate-mipmap fallback for RGB10_A2

I hit this when testing RV350, which lacks RGB10_A2 render target
support. It had been missed when implementing the format and probably
unused by anything else too.

Not applicable to 7.10.

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agor600g: Remove r600_helper.c from SConscript.
Vinson Lee [Mon, 25 Apr 2011 06:58:39 +0000 (23:58 -0700)]
r600g: Remove r600_helper.c from SConscript.

This is a follow-up to commit d737857ed2ff4313fd6046dcd80018c6308a53c5.

13 years agodocs: update GL3 status
Marek Olšák [Sun, 24 Apr 2011 23:52:33 +0000 (01:52 +0200)]
docs: update GL3 status

13 years agor600g: remove some pointless and unused functions
Marek Olšák [Thu, 21 Apr 2011 15:24:50 +0000 (17:24 +0200)]
r600g: remove some pointless and unused functions

13 years agor600g: do not reset device to 0 when doing unrelated operations
Marek Olšák [Thu, 21 Apr 2011 15:20:27 +0000 (17:20 +0200)]
r600g: do not reset device to 0 when doing unrelated operations

Seems to be a copy-paste bug.

13 years agor600g: trivially implement LATC/3DC
Marek Olšák [Sun, 24 Apr 2011 12:00:55 +0000 (14:00 +0200)]
r600g: trivially implement LATC/3DC

Passes fbo-generatemipmap-formats.

13 years agor600g: drop r600_helper.c no point in it
Dave Airlie [Sun, 24 Apr 2011 23:05:08 +0000 (09:05 +1000)]
r600g: drop r600_helper.c no point in it

move the one function into state common

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: enable EXT_draw_buffers2
Dave Airlie [Sun, 24 Apr 2011 20:55:09 +0000 (06:55 +1000)]
r600g: enable EXT_draw_buffers2

Doesn't cause any piglit regression and passes the fbo-draw-buffers-blend
test.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agost/mesa: fix regression since a22aba4eae9b29db731487bce90e8292f7e82c72
Dave Airlie [Sun, 24 Apr 2011 07:35:45 +0000 (17:35 +1000)]
st/mesa: fix regression since a22aba4eae9b29db731487bce90e8292f7e82c72

"st/mesa: check image size before copy_image_data_to_texture()" caused
a regression in piglit fbo-generatemipmap-formats test on all gallium drivers.

Level 0 for NPOT textures will not match minified values, so don't do this
check for level 0.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fix glean clipflat test.
Dave Airlie [Sun, 24 Apr 2011 10:20:55 +0000 (20:20 +1000)]
r600g: fix glean clipflat test.

the provoking vertex doesn't apply to quad/strip/polygon.

This fixes clipFlat on r600g.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor300g: reorder caps
Marek Olšák [Sun, 24 Apr 2011 09:59:16 +0000 (11:59 +0200)]
r300g: reorder caps

13 years agor300g: fix exposing caps on r300-r400
Marek Olšák [Sun, 24 Apr 2011 09:48:46 +0000 (11:48 +0200)]
r300g: fix exposing caps on r300-r400

Broken with 72239d16cd08113e994ea3508f91193c682b0930.

13 years agoglsl: Fix typos in comments.
Bryan Cain [Sun, 24 Apr 2011 00:29:15 +0000 (19:29 -0500)]
glsl: Fix typos in comments.

13 years agor600g: fix glsl-fs-abs-neg
Dave Airlie [Sun, 24 Apr 2011 01:04:46 +0000 (11:04 +1000)]
r600g: fix glsl-fs-abs-neg

the hw does neg after abs, so don't neg the source in the ABS instruction case.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fix bank swizzle calcs for scalar only operations.
Dave Airlie [Sat, 23 Apr 2011 22:33:19 +0000 (08:33 +1000)]
r600g: fix bank swizzle calcs for scalar only operations.

In the initial code if we had nothing in the vector slots r would
never get reset to 0, so we'd fail to compile shaders, after the previous
commit this would happen for the LIT tests. When I fixed that we did a lot
of unnecessary loops through all the vector states when we had no vector
slots filled. So this patch optimises thing for the scalar only state.

This fixes the 3 LIT piglit tests on r600g.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: PV/PS have cycle restrictions in scalar operations
Dave Airlie [Sat, 23 Apr 2011 22:30:08 +0000 (08:30 +1000)]
r600g: PV/PS have cycle restrictions in scalar operations

In the R600 ISA document:
Section 4.7.5 Cycle restrictions for the ALU.trans states that
PV/PS have cycle restrictions wrt constants.

This is part of a fix for the LIT tests

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: Add some comments about FRAG_RESULT_COLOR vs FRAG_RESULT_DATAn.
Eric Anholt [Thu, 21 Apr 2011 00:55:54 +0000 (17:55 -0700)]
mesa: Add some comments about FRAG_RESULT_COLOR vs FRAG_RESULT_DATAn.

This came from reading what swrast does, and 965 now behaves the same
and gallium appears to as well.

13 years agomesa: Fix fragment.color (no index) writes with OPTION ARB_draw_buffers.
Eric Anholt [Wed, 20 Apr 2011 23:49:19 +0000 (16:49 -0700)]
mesa: Fix fragment.color (no index) writes with OPTION ARB_draw_buffers.

Fixes a bug in Trine where fragment.color would write
FRAG_RESULT_COLOR (which is interpreted by drivers as being the "write
this to all color buffers" option) instead of FRAG_RESULT_DATA0 (just
the first target).

Fixes piglit ATI_draw_buffers/arbfp-no-index.

13 years agoi965: Don't double-emit fragment.color writes for MRT with ARB_fp.
Eric Anholt [Wed, 20 Apr 2011 23:10:14 +0000 (16:10 -0700)]
i965: Don't double-emit fragment.color writes for MRT with ARB_fp.

13 years agoi965: Fill in the remaining fields of gen5+ sampler default color.
Eric Anholt [Wed, 20 Apr 2011 21:03:21 +0000 (14:03 -0700)]
i965: Fill in the remaining fields of gen5+ sampler default color.

Still doesn't fix texwrap.

13 years agoi965: Fix batch decode for the gen5+ sampler default color.
Eric Anholt [Wed, 20 Apr 2011 20:59:13 +0000 (13:59 -0700)]
i965: Fix batch decode for the gen5+ sampler default color.

13 years agointel: Add support for ARB_sampler_objects.
Eric Anholt [Wed, 20 Apr 2011 18:48:31 +0000 (11:48 -0700)]
intel: Add support for ARB_sampler_objects.

This extension support consists of replacing
"gl_texture_obj->Sampler." with "_mesa_get_samplerobj(ctx, unit)->".
One instance of referencing the texture's base sampler remains in the
initial miptree allocation, where I'm not sure we have a clear
association with any texture unit.

Tested with piglit ARB_sampler_objects/sampler-objects.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoi965: Add support for NV_conditional_render.
Eric Anholt [Wed, 20 Apr 2011 04:40:48 +0000 (21:40 -0700)]
i965: Add support for NV_conditional_render.

Since we lack hardware support for it, this is a simple matter of
checking _mesa_check_conditional_render at the entrypoints, and
suppressing it for the metaops where it doesn't apply.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoswrast: Disable glAccum drawing during conditional rendering.
Eric Anholt [Thu, 21 Apr 2011 23:52:21 +0000 (16:52 -0700)]
swrast: Disable glAccum drawing during conditional rendering.

13 years agometa: Don't do conditional rendering on GenerateMipmaps and BlitFramebuffer.
Eric Anholt [Wed, 20 Apr 2011 07:21:01 +0000 (00:21 -0700)]
meta: Don't do conditional rendering on GenerateMipmaps and BlitFramebuffer.

The NV_conditional_render spec calls out specific operations that
conditional rendering applies to, which doesn't include these.

Fixes NV_conditional_render/generatemipmap on swrast.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoi965: Add support for ARB_texture_compression_rgtc.
Eric Anholt [Mon, 18 Apr 2011 21:28:14 +0000 (14:28 -0700)]
i965: Add support for ARB_texture_compression_rgtc.

Tested with rgtc-teximage-0[12].
EXT_texture_compression_rgtc/fbo-generatemipmap-formats fails in NPOT
just like S3TC does.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Don't assert on the compressed convertformat for GenerateMipmaps.
Eric Anholt [Wed, 20 Apr 2011 16:33:59 +0000 (09:33 -0700)]
mesa: Don't assert on the compressed convertformat for GenerateMipmaps.

This assertion doesn't make any sense to me -- the convertFormat is
already something valid (tested above), and the BaseFormat dictated by
convertFormat doesn't matter to the function about to be called (it's
the datatype/comps that were pulled out of convertFormat).

Fixes assertion failure in
GL_EXT_texture_compression_rgtc/fbo-generatemipmap-formats

(still has a rendering failure in NPOT like S3TC does).

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Choose RGTC formats for GL_COMPRESSED_RED, GL_COMPRESSED_RG.
Eric Anholt [Wed, 20 Apr 2011 16:31:34 +0000 (09:31 -0700)]
mesa: Choose RGTC formats for GL_COMPRESSED_RED, GL_COMPRESSED_RG.

We were falling through to the default R8 and RG88 formats instead of
compressing when possible.  Noticed by swrast fbo-blending-formats
actually doing rendering.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa/gdi: Address compiler warnings.
José Fonseca [Sat, 23 Apr 2011 19:25:11 +0000 (20:25 +0100)]
mesa/gdi: Address compiler warnings.

In particular the function prototypes.

13 years agomesa/gdi: Remove InitCritSections.cpp.
José Fonseca [Sat, 23 Apr 2011 17:44:19 +0000 (18:44 +0100)]
mesa/gdi: Remove InitCritSections.cpp.

We are now able to declare global critical sections through other
mechanisms so this is useless code.

13 years agoDrop fx windows driver.
José Fonseca [Sat, 23 Apr 2011 12:21:41 +0000 (13:21 +0100)]
Drop fx windows driver.

Irrelevant now that glide driver was removed.

13 years agoglu: Fix linux build
Jakob Bornecrantz [Sat, 23 Apr 2011 15:01:19 +0000 (17:01 +0200)]
glu: Fix linux build

13 years agoglu: Clone the enviroment
Jakob Bornecrantz [Sat, 23 Apr 2011 14:57:28 +0000 (16:57 +0200)]
glu: Clone the enviroment

13 years agodocs: Remove MSVS project files.
José Fonseca [Sat, 23 Apr 2011 12:18:45 +0000 (13:18 +0100)]
docs: Remove MSVS project files.

They were totally broken for several releases.

scons now builds everything the project files built and more, and can be
kept up-to-date with little effort.

13 years agoscons: Build glu.
José Fonseca [Sat, 23 Apr 2011 12:16:03 +0000 (13:16 +0100)]
scons: Build glu.

13 years agoscons: Build classic mesa gdi driver.
José Fonseca [Sat, 23 Apr 2011 11:41:28 +0000 (12:41 +0100)]
scons: Build classic mesa gdi driver.

Build as

  scons platform=windows mesagdi

13 years agoosmesa: Fix Mingw build.
José Fonseca [Sat, 23 Apr 2011 11:23:42 +0000 (12:23 +0100)]
osmesa: Fix Mingw build.

Build as

  scons platform=windows osmesa

13 years agoscons: Build osmesa.
José Fonseca [Sat, 23 Apr 2011 11:22:59 +0000 (12:22 +0100)]
scons: Build osmesa.

Just type

  scons osmesa

13 years agomapi/glapi: Avoid warnings about visibility being unsupported on MinGW.
José Fonseca [Sat, 23 Apr 2011 11:14:39 +0000 (12:14 +0100)]
mapi/glapi: Avoid warnings about visibility being unsupported on MinGW.

13 years agomesa/vf: Remove.
José Fonseca [Sat, 23 Apr 2011 10:49:41 +0000 (11:49 +0100)]
mesa/vf: Remove.

Unused.  Probably replaced by translate module.

13 years agograw: Replace dead symlinks to delete python statetracker shaders with their contents.
José Fonseca [Sat, 23 Apr 2011 09:44:43 +0000 (10:44 +0100)]
graw: Replace dead symlinks to delete python statetracker shaders with their contents.

13 years agodraw: fix point/line/tri flushing bug in vbuf code
Brian Paul [Fri, 22 Apr 2011 19:37:10 +0000 (13:37 -0600)]
draw: fix point/line/tri flushing bug in vbuf code

Need to reset the point/line/tri functions to point to the "first"
versions whenever we flush vertices.  Fixes unfilled polygon rendering
errors seen in demos/samples/logo.c.  See comments for more info.

NOTE: This is a candidate for the 7.10 branch.

13 years agor300g: do not advertise color_buffer_float on r300 and r400
Marek Olšák [Fri, 22 Apr 2011 18:19:38 +0000 (20:19 +0200)]
r300g: do not advertise color_buffer_float on r300 and r400

It seems they can't do unclamped vertex colors. Tested on RV350.

13 years agor300/compiler: fix up error message
Marek Olšák [Fri, 22 Apr 2011 16:54:02 +0000 (18:54 +0200)]
r300/compiler: fix up error message

13 years agoegl/wayland: Follow buffer.attach removal
Benjamin Franzke [Mon, 7 Mar 2011 14:10:01 +0000 (15:10 +0100)]
egl/wayland: Follow buffer.attach removal

13 years agoegl/wayland: Update to buffer.damage addition
Benjamin Franzke [Mon, 7 Mar 2011 14:06:31 +0000 (15:06 +0100)]
egl/wayland: Update to buffer.damage addition

13 years agoconfigure.ac: fix up the help text for --enable-gallium-r300
Marek Olšák [Fri, 22 Apr 2011 14:55:54 +0000 (16:55 +0200)]
configure.ac: fix up the help text for --enable-gallium-r300

13 years agor300g: disallow A16F,L16F,LA16F,I16F texture formats on DRM<2.8.0
Marek Olšák [Fri, 22 Apr 2011 14:17:18 +0000 (16:17 +0200)]
r300g: disallow A16F,L16F,LA16F,I16F texture formats on DRM<2.8.0

13 years agost/egl: Update to wayland protocol,egl changes
Benjamin Franzke [Thu, 21 Apr 2011 08:51:44 +0000 (10:51 +0200)]
st/egl: Update to wayland protocol,egl changes

13 years agoegl_dri2: Create wl_buffers for pixmap surfaces
Benjamin Franzke [Thu, 21 Apr 2011 08:51:14 +0000 (10:51 +0200)]
egl_dri2: Create wl_buffers for pixmap surfaces

Needed since wayland-egl doesnt do this anymore.

13 years agoegl/wayland: Add new version parameter for post_drm
Benjamin Franzke [Thu, 21 Apr 2011 09:14:02 +0000 (11:14 +0200)]
egl/wayland: Add new version parameter for post_drm

13 years agoegl/wayland: Fix prefixes for interface names
Benjamin Franzke [Thu, 21 Apr 2011 07:39:25 +0000 (09:39 +0200)]
egl/wayland: Fix prefixes for interface names

13 years agoswrast: fix readpix clamping
Marek Olšák [Wed, 20 Apr 2011 10:40:40 +0000 (12:40 +0200)]
swrast: fix readpix clamping

Broken with e5c6a92a12b5cd7db205d72039f58d302b0be9d5. (ARB_color_buffer_float)

Clamping should occur if type != float, otherwise the MSBs of the resulting
pixels are killed off. For example, reading back LUMINANCE = R+G+B can be
greater than 0xff, but the result is naturally masked by 0xff
for UNSIGNED_BYTE, leading to bogus results.

The following bug report seems to want clamping to occur if type == half_float
too. Not sure what's correct.

Bug: [bisected pineview] oglc case pxconv-read failed
https://bugs.freedesktop.org/show_bug.cgi?id=35852

Tested by: Fang Xun <xunx.fang@intel.com>
Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoWL_bind_wayland_display: clarify that context must be NULL
Kristian Høgsberg [Fri, 22 Apr 2011 03:47:36 +0000 (23:47 -0400)]
WL_bind_wayland_display: clarify that context must be NULL

13 years agoi915: Gut all remaining bits of hardware fog
Ian Romanick [Sat, 16 Apr 2011 05:20:09 +0000 (22:20 -0700)]
i915: Gut all remaining bits of hardware fog

None of this ever gets used.  Fog is always calculated by a fragment
program.  Even though the fixed-function fog unit is never used, state
updates are still sent to the hardware.  Removing those spurious state
updates can't hurt performance.

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoi915: i915_context::vertex_fog is always I915_FOG_NONE, so kill it
Ian Romanick [Sat, 16 Apr 2011 02:25:59 +0000 (19:25 -0700)]
i915: i915_context::vertex_fog is always I915_FOG_NONE, so kill it

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoi915: There's always a fragment program
Ian Romanick [Sat, 16 Apr 2011 02:23:13 +0000 (19:23 -0700)]
i915: There's always a fragment program

Fragment programs are generated by core Mesa for fixed-function.
Because of this, there's no reason to handle cases where there is no
fragment program for fog.

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoi915: Delete disabled try_pixel_fog paths
Ian Romanick [Sat, 16 Apr 2011 02:14:36 +0000 (19:14 -0700)]
i915: Delete disabled try_pixel_fog paths

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agomesa: Kill gl_fragment_program::FogOption with fire
Ian Romanick [Sat, 16 Apr 2011 02:04:57 +0000 (19:04 -0700)]
mesa: Kill gl_fragment_program::FogOption with fire

All drivers expect this to always be GL_NONE.  Don't let there be any
opportunity for a bad value to leak out and infect some unsuspecting
driver.  If any driver for hardware that had fixed-function
per-fragment fog (i915 and perhaps some r300-ish) was ever going to
add support, it would have done it by now.

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoi915: gl_fragment_program::FogOption is always GL_NONE so don't check it
Ian Romanick [Sat, 16 Apr 2011 01:46:57 +0000 (18:46 -0700)]
i915: gl_fragment_program::FogOption is always GL_NONE so don't check it

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoi965: gl_fragment_program::FogOption is always GL_NONE so don't check it
Ian Romanick [Sat, 16 Apr 2011 01:46:43 +0000 (18:46 -0700)]
i965: gl_fragment_program::FogOption is always GL_NONE so don't check it

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agomesa: gl_fragment_program::FogOption is always GL_NONE so don't check it
Ian Romanick [Sat, 16 Apr 2011 01:45:06 +0000 (18:45 -0700)]
mesa: gl_fragment_program::FogOption is always GL_NONE so don't check it

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agomesa: Fix bugs in ff fragment shader fog handling
Ian Romanick [Sat, 16 Apr 2011 01:38:54 +0000 (18:38 -0700)]
mesa: Fix bugs in ff fragment shader fog handling

This patch fixes two bugs related to fog in the fixed-function
fragment shader generation code.

Fog was only lowered to instructions if MRTs were used.  The fragment
shader assembler always lowers "fog option" code to instructions, and
many drivers (e.g., r300) expect this.

When fog lowering did happen, it was after the instruction count was
checked against implementation limits.  Since fog lowering may add up
to 5 instructions, a program that was below the limits before lowering
may exceed the limits after lowering.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
13 years agost/mesa: check image size before copy_image_data_to_texture()
Brian Paul [Thu, 21 Apr 2011 18:59:16 +0000 (12:59 -0600)]
st/mesa: check image size before copy_image_data_to_texture()

We should only copy images into the dest texture if the size is correct.
This fixes a failed assertion when finalizing a texture with mis-defined
mipmap levels such as:
level 0: 32x32
level 1: 8x8

Also, fix incorrect mipmap level used in assertion at the top of
copy_image_data_to_texture().

NOTE: This is a candidate for the 7.10 branch.

13 years agogalahad,util: warn on resource target mismatch in copy_region
Marek Olšák [Thu, 21 Apr 2011 13:13:34 +0000 (15:13 +0200)]
galahad,util: warn on resource target mismatch in copy_region

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agost/mesa: implement CopyBufferSubData using resource_copy_region
Marek Olšák [Thu, 21 Apr 2011 10:54:56 +0000 (12:54 +0200)]
st/mesa: implement CopyBufferSubData using resource_copy_region

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agogallium: add fallback for copying buffers to all drivers
Marek Olšák [Thu, 21 Apr 2011 10:53:16 +0000 (12:53 +0200)]
gallium: add fallback for copying buffers to all drivers

Just to keep drivers working.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agoutil: add a simple memcpy path for copying buffers in util_resource_copy_region
Marek Olšák [Thu, 21 Apr 2011 10:50:00 +0000 (12:50 +0200)]
util: add a simple memcpy path for copying buffers in util_resource_copy_region

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agoglsl/ast_to_hir: Only use the local 'type' variable as a temporary.
Kenneth Graunke [Fri, 15 Apr 2011 00:21:59 +0000 (17:21 -0700)]
glsl/ast_to_hir: Only use the local 'type' variable as a temporary.

Lots of code (deleted by this patch) tried to make type == result->type,
but not all cases did.  Don't pretend; just use result->type.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agoi965: Remove dead vertex buffer structs.
Kenneth Graunke [Tue, 19 Apr 2011 22:33:15 +0000 (15:33 -0700)]
i965: Remove dead vertex buffer structs.

We do this OUT_BATCH-style in brw_draw_upload.c.

13 years agowayland-egl: Update to wayland-egl.h changes, drop struct wl_egl_display
Kristian Høgsberg [Thu, 14 Apr 2011 14:42:41 +0000 (10:42 -0400)]
wayland-egl: Update to wayland-egl.h changes, drop struct wl_egl_display

13 years agomesa: fix void pointer arithmetic warning
Brian Paul [Wed, 20 Apr 2011 18:04:25 +0000 (12:04 -0600)]
mesa: fix void pointer arithmetic warning

13 years agodocs: Mention that GLSL 1.30 is started.
Eric Anholt [Mon, 18 Apr 2011 20:45:00 +0000 (13:45 -0700)]
docs: Mention that GLSL 1.30 is started.

Things definitely remaining todo: switch statements, clip distances.
On 965, we also need real integers in the VS, and implementations of
some things like isinf/isnan.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agodocs: Update for Intel ARB_texture_float and ARB_color_buffer_float.
Eric Anholt [Mon, 18 Apr 2011 20:44:35 +0000 (13:44 -0700)]
docs: Update for Intel ARB_texture_float and ARB_color_buffer_float.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agointel: Add support for ARB_color_buffer_float.
Eric Anholt [Fri, 15 Apr 2011 21:40:09 +0000 (14:40 -0700)]
intel: Add support for ARB_color_buffer_float.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agometa: Add support for ARB_color_buffer_float to _mesa_meta_Clear().
Eric Anholt [Fri, 15 Apr 2011 21:39:47 +0000 (14:39 -0700)]
meta: Add support for ARB_color_buffer_float to _mesa_meta_Clear().

Tested with piglit arb_color_buffer_float-clear.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agometa: Add support for ARB_color_buffer_float to _mesa_meta_DrawPixels.
Eric Anholt [Fri, 15 Apr 2011 22:48:32 +0000 (15:48 -0700)]
meta: Add support for ARB_color_buffer_float to _mesa_meta_DrawPixels.

Tested with piglit arb_color_buffer_float-drawpixels.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agointel: Add support for ARB_texture_float.
Eric Anholt [Fri, 15 Apr 2011 18:00:00 +0000 (11:00 -0700)]
intel: Add support for ARB_texture_float.

For 1 and 2-channel formats the hardware only supports rendering to R
and RG.  To do I and L render targets we just call them R and
everything works out.  For A, we would need to rewrite the CC to do
the alpha channel's blending on color instead, and send the fragment
alpha down the red channel.  For LA, there doesn't seem to be any
hope, because we can't do independent color/alpha blending while
treating the LA surface as RG.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agointel: Add support for blit copies of >32bpp formats.
Eric Anholt [Sat, 16 Apr 2011 01:15:59 +0000 (18:15 -0700)]
intel: Add support for blit copies of >32bpp formats.

The blitter only does up 32bpp at a time, so we handle it by mangling
coordinates and calling the surface 32bpp.

Fixes ARB_texture_rg/fbo-generatemipmap-formats-float with ARB_texture_float.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Add renderbuffer accessors for A, I, L, FLOAT32.
Eric Anholt [Mon, 18 Apr 2011 17:53:06 +0000 (10:53 -0700)]
mesa: Add renderbuffer accessors for A, I, L, FLOAT32.

Of these, intel will be using I and L initially, and A once we rewrite
fragment shaders and the CC for rendering to it as R.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Add renderbuffer accessors for MESA_FORMAT_R_FLOAT32, RG_FLOAT32.
Eric Anholt [Mon, 18 Apr 2011 16:17:00 +0000 (09:17 -0700)]
mesa: Add renderbuffer accessors for MESA_FORMAT_R_FLOAT32, RG_FLOAT32.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Add ChooseTexFormat fallbacks for floating point textures.
Eric Anholt [Fri, 15 Apr 2011 21:18:43 +0000 (14:18 -0700)]
mesa: Add ChooseTexFormat fallbacks for floating point textures.

This covers X_FLOAT16 -> X_FLOAT32, and X -> RGBA_FLOAT32.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Add renderbuffer accessors for MESA_FORMAT_RGBA_FLOAT32.
Eric Anholt [Fri, 15 Apr 2011 20:36:40 +0000 (13:36 -0700)]
mesa: Add renderbuffer accessors for MESA_FORMAT_RGBA_FLOAT32.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoswrast: Add LUMINANCE, INTENSITY, LUMINANCE_ALPHA to span asserts.
Eric Anholt [Mon, 18 Apr 2011 16:32:06 +0000 (09:32 -0700)]
swrast: Add LUMINANCE, INTENSITY, LUMINANCE_ALPHA to span asserts.

Fixes ARB_texture_float/fbo-alphatest-formats.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agor600g: fix userspace fences again
Alex Deucher [Wed, 20 Apr 2011 17:09:09 +0000 (13:09 -0400)]
r600g: fix userspace fences again

reinstate b7617346dcff50a66a10c61b95c33682cf629c9e after the
rework in 6067a2a67f9a7aab2aee051469bea8af03747a95.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600g: don't flush the dest caches on every draw
Fredrik Höglund [Tue, 19 Apr 2011 22:21:42 +0000 (00:21 +0200)]
r600g: don't flush the dest caches on every draw

Keep track of when the caches are dirty, and only flush them when
the framebuffer state is set and when the context is flushed.

Signed-off-by: Dave Airlie <airlied@redhat.com>