platform/upstream/mesa.git
13 years agorgtc: fixup mipmap generation
Dave Airlie [Tue, 1 Mar 2011 23:48:40 +0000 (09:48 +1000)]
rgtc: fixup mipmap generation

this allows swrast to pass mipmap generation for these formats.

13 years agoswrast/rgtc: fix rendering issues introduced when fix constants
Dave Airlie [Tue, 1 Mar 2011 23:41:38 +0000 (09:41 +1000)]
swrast/rgtc: fix rendering issues introduced when fix constants

The max value was wrong and this showed up in the piglit tests.

13 years agor600g: change the cross over point for 2d->1d
Dave Airlie [Tue, 1 Mar 2011 23:14:01 +0000 (09:14 +1000)]
r600g: change the cross over point for 2d->1d

this fixes some rendering in the fbo-generatemipmap-formats test on
my rv610.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: Fix build breakage caused by c73e6ce
Ian Romanick [Tue, 1 Mar 2011 23:22:43 +0000 (15:22 -0800)]
mesa: Fix build breakage caused by c73e6ce

13 years agoegl: Add EGL_WL_bind_wayland_display
Benjamin Franzke [Mon, 21 Feb 2011 15:22:34 +0000 (16:22 +0100)]
egl: Add EGL_WL_bind_wayland_display

13 years agoGenerate lexer and parser files for tarball creation process
Ian Romanick [Sat, 12 Feb 2011 00:44:11 +0000 (16:44 -0800)]
Generate lexer and parser files for tarball creation process

13 years agoAdd generated parser / lexer files to gitignore lists
Ian Romanick [Sat, 12 Feb 2011 00:37:05 +0000 (16:37 -0800)]
Add generated parser / lexer files to gitignore lists

13 years agomesa: Fix some quirkiness of make tarballs
Ian Romanick [Sat, 12 Feb 2011 00:27:22 +0000 (16:27 -0800)]
mesa: Fix some quirkiness of make tarballs

Among other benefits, parallel makes now work.  Since many people have
parallel builds by default (via MAKEFLAGS environment variable), this
sames some irritation at release time...when there's usually not any
other irritation already.

13 years agomesa: Remove nonexistent files from distribution list
Ian Romanick [Sat, 12 Feb 2011 00:26:31 +0000 (16:26 -0800)]
mesa: Remove nonexistent files from distribution list

13 years agomesa: Remove files generated by flex and bison from GIT
Ian Romanick [Mon, 31 Jan 2011 23:42:46 +0000 (15:42 -0800)]
mesa: Remove files generated by flex and bison from GIT

These files were for the ARB_vertex_program / ARB_fragement_program assembler.

13 years agoglcpp: Remove files generated by flex and bison from GIT
Ian Romanick [Mon, 31 Jan 2011 23:41:39 +0000 (15:41 -0800)]
glcpp: Remove files generated by flex and bison from GIT

13 years agoglsl: Remove files generated by flex and bison from GIT
Ian Romanick [Mon, 31 Jan 2011 23:41:12 +0000 (15:41 -0800)]
glsl: Remove files generated by flex and bison from GIT

13 years agoi915g: kill relocs accouting
Daniel Vetter [Sat, 26 Feb 2011 20:40:52 +0000 (21:40 +0100)]
i915g: kill relocs accouting

No one ever cared. libdrm does dynamic resizing of its reloc-table,
anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: switch to the exact batch space reservation code
Daniel Vetter [Sat, 26 Feb 2011 16:14:17 +0000 (17:14 +0100)]
i915g: switch to the exact batch space reservation code

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: split up hw state emission into small atoms
Daniel Vetter [Tue, 1 Mar 2011 21:14:50 +0000 (22:14 +0100)]
i915g: split up hw state emission into small atoms

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agost/mesa: probably handle instanced drawing
Christian König [Tue, 1 Mar 2011 00:14:12 +0000 (01:14 +0100)]
st/mesa: probably handle instanced drawing

Remove the previous workaround for instanced drawing and implement it correctly.

13 years agoi915g: fix i915_winsys_batchbuffer_write
Daniel Vetter [Tue, 1 Mar 2011 19:36:12 +0000 (20:36 +0100)]
i915g: fix i915_winsys_batchbuffer_write

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agointel: Support glCopyTexImage() from ARGB8888 to XRGB8888.
Kenneth Graunke [Tue, 1 Mar 2011 19:15:34 +0000 (11:15 -0800)]
intel: Support glCopyTexImage() from ARGB8888 to XRGB8888.

Nexuiz was hitting a software fallback.

13 years agoconfigure: Bump libdrm requirements
Chris Wilson [Tue, 1 Mar 2011 18:39:15 +0000 (18:39 +0000)]
configure: Bump libdrm requirements

In my last commit I introduced a build dependency upon a new libdrm.
Add the associated autoconf checks. As the headers are part of the core
libdrm, we need to bump that version and so may as well bump the chipset
specific versions simultaneously.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agor300g: initialize some r500 PS3 regs
Marek Olšák [Tue, 1 Mar 2011 18:02:29 +0000 (19:02 +0100)]
r300g: initialize some r500 PS3 regs

13 years agor300g: document some more DRM 2.8.0 features
Marek Olšák [Tue, 1 Mar 2011 17:42:44 +0000 (18:42 +0100)]
r300g: document some more DRM 2.8.0 features

13 years agoi965: Use negative relocation deltas to minimse vertex uploads
Chris Wilson [Tue, 1 Mar 2011 14:46:50 +0000 (14:46 +0000)]
i965: Use negative relocation deltas to minimse vertex uploads

With relaxed relocation checking in the kernel, we can specify a
negative delta (i.e. pointing outside of the target bo) in order to fake
a range in a large buffer. We only then need to upload the elements used
and adjust the buffer offset such that they correspond with the indices
used in the DrawArrays.

(Depends on libdrm 0209428b3918c4336018da9293cdcbf7f8fedfb6)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi965: Undo 'continuation of vb packets'
Chris Wilson [Tue, 1 Mar 2011 15:57:42 +0000 (15:57 +0000)]
i965: Undo 'continuation of vb packets'

This breaks nexuiz for unknown reason; disable until a true fix can be
found.

13 years agoi965: Fix uploading of shortened vertex packets
Chris Wilson [Tue, 1 Mar 2011 14:12:22 +0000 (14:12 +0000)]
i965: Fix uploading of shortened vertex packets

... handle all cases and not just the interleaved upload.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi965: Upload all vertices used
Chris Wilson [Thu, 24 Feb 2011 14:06:55 +0000 (14:06 +0000)]
i965: Upload all vertices used

... and take advantage of start_vertex_bias to trim to [min_index,
max_index] where possible (i.e. when we need to upload all arrays).

Fixes half_float_vertex(misc.fillmode.wireframe)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34595
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agost/egl: Implement swapbuffer throttling
Thomas Hellstrom [Fri, 25 Feb 2011 12:05:31 +0000 (13:05 +0100)]
st/egl: Implement swapbuffer throttling

When doing copy swapbuffers using drm, throttle on outstanding copy operations.
Introduces a new environment variable, EGL_THROTTLE_FENCES that the
user can use to indicate the desired number of outstanding swapbuffers, or
disable throttling using EGL_THROTTLE_FENCES=0.

This can and perhaps should be extended to the pageflip case as well, since
with some hardware pageflips can be pipelined. In case the pageflip syncs, the
throttle operation will be a no-op anyway.

Update copyright notices.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agost/egl/drm: Rework swapbuffers
Thomas Hellstrom [Thu, 24 Feb 2011 14:09:45 +0000 (15:09 +0100)]
st/egl/drm: Rework swapbuffers

Use the pageflip ioctl when available.
Otherwise, or when the backbuffer contents need to be preserved,
fall back to a copy operation.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agost/egl: Add a helper to perform a copy swap on a resource surface
Thomas Hellstrom [Thu, 24 Feb 2011 12:03:07 +0000 (13:03 +0100)]
st/egl: Add a helper to perform a copy swap on a resource surface

The copy swap can be used when we need to preserve the contents of
the back buffer or when there is no way to do native page-flipping.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agost/egl: Move the copy context to the native display structure
Thomas Hellstrom [Thu, 24 Feb 2011 11:59:41 +0000 (12:59 +0100)]
st/egl: Move the copy context to the native display structure

This makes it usable also for native helpers.
Also add inline functions to access the context and to
uninit the native display structure.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoRevert "i965/fs: Correctly set up gl_FragCoord.w on Sandybridge."
Kenneth Graunke [Tue, 1 Mar 2011 09:07:19 +0000 (01:07 -0800)]
Revert "i965/fs: Correctly set up gl_FragCoord.w on Sandybridge."

This reverts commit 4a3b28113c3d23ba21bb8b8f5ebab7c567083a6d, as it
caused a regression on Ironlake (bug #34646).

13 years agost/dri: one more missing array size
Dave Airlie [Tue, 1 Mar 2011 08:32:33 +0000 (18:32 +1000)]
st/dri: one more missing array size

whats one more between friends.

again bnf on irc.

13 years agost/dri: fix missing array size init.
Dave Airlie [Tue, 1 Mar 2011 08:29:24 +0000 (18:29 +1000)]
st/dri: fix missing array size init.

Init array size to 1,

reported by bnf on irc.

13 years agoegl/st: add array size initialisor
Dave Airlie [Tue, 1 Mar 2011 08:24:15 +0000 (18:24 +1000)]
egl/st: add array size initialisor

reported by bnf on irc.

13 years agor600g: add NV_conditional_render support.
Dave Airlie [Mon, 28 Feb 2011 06:19:58 +0000 (16:19 +1000)]
r600g: add NV_conditional_render support.

This is reliant on a drm patch that I posted on the list + a version bump.

These will appear in drm-next today.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: start using drm minor version to enable things.
Dave Airlie [Tue, 1 Mar 2011 04:55:35 +0000 (14:55 +1000)]
r600g: start using drm minor version to enable things.

If the drm minor version is > 9 (i.e. whats in drm-next),
we enable s3tc + texture tiling by default now.

this changes R600_FORCE_TILING to R600_TILING which can
be set to false to disable tiling on working drm.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor300g: fix RGTC2_SNORM
Marek Olšák [Tue, 1 Mar 2011 04:16:34 +0000 (05:16 +0100)]
r300g: fix RGTC2_SNORM

ATI engineers have probably chosen those sign bits by a dice roll.

13 years agor300g: reorder parts of translate_texformat
Marek Olšák [Tue, 1 Mar 2011 04:14:27 +0000 (05:14 +0100)]
r300g: reorder parts of translate_texformat

13 years agor600g: truncate point sampled texture coordinates
Alex Deucher [Tue, 1 Mar 2011 02:52:19 +0000 (21:52 -0500)]
r600g: truncate point sampled texture coordinates

By default the hardware rounds texcoords.  However,
for point sampled textures, the expected behavior is
to truncate.  When we have point sampled textures,
set the truncate bit in the sampler.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=25871

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoi965: bump VS thread number to 60 on SNB
Zou Nan hai [Tue, 1 Mar 2011 02:39:35 +0000 (10:39 +0800)]
i965: bump VS thread number to 60 on SNB

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
13 years agor300g: fix RGTC1_UNORM and RGTC2_UNORM
Marek Olšák [Tue, 1 Mar 2011 02:21:23 +0000 (03:21 +0100)]
r300g: fix RGTC1_UNORM and RGTC2_UNORM

Signs don't work the way I'd like...

13 years agorgtc: shared the compressor code between signed/unsigned
Dave Airlie [Tue, 1 Mar 2011 01:57:51 +0000 (11:57 +1000)]
rgtc: shared the compressor code between signed/unsigned

No idea why I didn't do it like this the first time, but share
the code like other portions of mesa do using _tmp.h suffix
and some #defines for the types.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agovbo: silence unused var warning
Brian Paul [Tue, 1 Mar 2011 01:34:06 +0000 (18:34 -0700)]
vbo: silence unused var warning

13 years agosoftpipe: remove redundant draw_flush() call
Brian Paul [Tue, 1 Mar 2011 01:25:41 +0000 (18:25 -0700)]
softpipe: remove redundant draw_flush() call

We'll flush after the same-shader comparison.

13 years agodraw: setup pipe's draw pointer for the aapoint stage
Brian Paul [Tue, 1 Mar 2011 01:25:37 +0000 (18:25 -0700)]
draw: setup pipe's draw pointer for the aapoint stage

The other draw stages like aaline and pstipple were already doing this.
If the driver used the aapoint stage but not the others it would crash
because of a null pipe->draw pointer.

13 years agomesa: move PBO-related functions into a new file
Brian Paul [Tue, 1 Mar 2011 01:24:35 +0000 (18:24 -0700)]
mesa: move PBO-related functions into a new file

13 years agomesa: always generate error in glColorTableParameter[fi]v()
Brian Paul [Tue, 1 Mar 2011 01:24:30 +0000 (18:24 -0700)]
mesa: always generate error in glColorTableParameter[fi]v()

These were only used by GL_SGI_texture_color_table, which is gone now.

13 years agomesa: remove GL_SGI_texture_color_table support
Brian Paul [Tue, 1 Mar 2011 01:24:30 +0000 (18:24 -0700)]
mesa: remove GL_SGI_texture_color_table support

It was only implemented in the swrast driver and probably not used by
any applications.  A modern app would use a dependent/chained texture
lookup in the fragment shader.

13 years agosvga: add assertions in svga_shader_type()
Brian Paul [Tue, 1 Mar 2011 01:24:30 +0000 (18:24 -0700)]
svga: add assertions in svga_shader_type()

13 years agomesa: consolidate framebuffer target lookup code
Brian Paul [Tue, 1 Mar 2011 01:24:25 +0000 (18:24 -0700)]
mesa: consolidate framebuffer target lookup code

13 years agomesa: remove some old do-nothing code
Brian Paul [Tue, 1 Mar 2011 01:24:25 +0000 (18:24 -0700)]
mesa: remove some old do-nothing code

13 years agomesa: reduce calls to _mesa_test_framebuffer_completeness()
Brian Paul [Tue, 1 Mar 2011 01:24:25 +0000 (18:24 -0700)]
mesa: reduce calls to _mesa_test_framebuffer_completeness()

when updating/validating framebuffer state.  The _Status field is set
to zero when we need to recompute _Status.  Otherwise, it's up to date.

13 years agomesa: reduce calls to _mesa_test_framebuffer_completeness()
Brian Paul [Tue, 1 Mar 2011 01:24:20 +0000 (18:24 -0700)]
mesa: reduce calls to _mesa_test_framebuffer_completeness()

when doing glCopyTex[Sub]Image() and checking the source buffer's
completeness.
We only need to determine FBO completeness when the status is indeterminate.

13 years agomesa: s/mesaFormat/attFormat/
Brian Paul [Tue, 1 Mar 2011 01:23:23 +0000 (18:23 -0700)]
mesa: s/mesaFormat/attFormat/

13 years agor300g: set the correct HiZ clear value
Marek Olšák [Tue, 1 Mar 2011 00:46:10 +0000 (01:46 +0100)]
r300g: set the correct HiZ clear value

13 years agor300g: update derived state before uploading vertex buffers
Marek Olšák [Mon, 28 Feb 2011 23:12:23 +0000 (00:12 +0100)]
r300g: update derived state before uploading vertex buffers

The function may invoke blitter, which invalidates vertex buffers.

13 years agou_vbuf_mgr: compute user buffer size for instance data from instance_count
Marek Olšák [Mon, 28 Feb 2011 22:54:47 +0000 (23:54 +0100)]
u_vbuf_mgr: compute user buffer size for instance data from instance_count

13 years agor300g: fix printing whether Z compression is enabled
Marek Olšák [Mon, 28 Feb 2011 21:57:50 +0000 (22:57 +0100)]
r300g: fix printing whether Z compression is enabled

13 years agor300g: disable HiZ permanently if the the depth function is inverted
Marek Olšák [Mon, 28 Feb 2011 21:10:04 +0000 (22:10 +0100)]
r300g: disable HiZ permanently if the the depth function is inverted

Instead of temporarily.

The HiZ function (something like a depth function) is a property
of a HiZ buffer and can only be changed during HiZ clears.

13 years agor300g: fix HiZ memory size computation and deciding when to use HiZ
Marek Olšák [Mon, 28 Feb 2011 12:38:01 +0000 (13:38 +0100)]
r300g: fix HiZ memory size computation and deciding when to use HiZ

I removed the HiZ memory management, because the HiZ RAM is too small
and I also did it in hope that HiZ will be enabled more often.

This also sets aligned strides to HIZ_PITCH and ZMASK_PITCH.

13 years agor600g: add missing evergreen INT_TO_FLT to r600_bc_get_num_operands
Alex Deucher [Mon, 28 Feb 2011 22:21:26 +0000 (17:21 -0500)]
r600g: add missing evergreen INT_TO_FLT to r600_bc_get_num_operands

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agorgtc: fix void pointer arith.
Dave Airlie [Mon, 28 Feb 2011 20:47:00 +0000 (06:47 +1000)]
rgtc: fix void pointer arith.

should fix scons build.

13 years agoglsl: Enable GL_OES_texture_3D extension for ES2.
Kenneth Graunke [Sat, 26 Feb 2011 07:11:20 +0000 (23:11 -0800)]
glsl: Enable GL_OES_texture_3D extension for ES2.

13 years agoglsl: Use reralloc instead of plain realloc.
Kenneth Graunke [Sun, 27 Feb 2011 09:17:29 +0000 (01:17 -0800)]
glsl: Use reralloc instead of plain realloc.

Plugs a memory leak when compiling shaders with user defined structures.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

13 years agor600g: indentation fixes
Jerome Glisse [Mon, 28 Feb 2011 18:33:13 +0000 (13:33 -0500)]
r600g: indentation fixes

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
13 years agor300g: initialize SC_SCREENDOOR
Marek Olšák [Mon, 28 Feb 2011 11:43:26 +0000 (12:43 +0100)]
r300g: initialize SC_SCREENDOOR

13 years agor300g: disable hyper-z on rs6xx+
Marek Olšák [Mon, 28 Feb 2011 11:27:22 +0000 (12:27 +0100)]
r300g: disable hyper-z on rs6xx+

It doesn't work.

13 years agomesa: Add texcompress_rgtc.c to SConscript.
Vinson Lee [Mon, 28 Feb 2011 07:17:49 +0000 (23:17 -0800)]
mesa: Add texcompress_rgtc.c to SConscript.

13 years agorgtc: update docs
Dave Airlie [Mon, 28 Feb 2011 03:43:32 +0000 (13:43 +1000)]
rgtc: update docs

13 years agomesa/st: add RGTC format support.
Dave Airlie [Thu, 24 Feb 2011 23:24:15 +0000 (09:24 +1000)]
mesa/st: add RGTC format support.

this just adds a format check + format conversion.

13 years agoswrast: add RGTC support
Dave Airlie [Thu, 24 Feb 2011 04:27:18 +0000 (14:27 +1000)]
swrast: add RGTC support

13 years agomesa: Add RGTC texture store/fetch support.
Dave Airlie [Tue, 22 Feb 2011 00:35:15 +0000 (10:35 +1000)]
mesa: Add RGTC texture store/fetch support.

This adds support for the RGTC unsigned and signed
texture storage and fetch methods.

the code is a port of the DXT5 alpha compression code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: make_float_temp_image non-static
Dave Airlie [Thu, 24 Feb 2011 23:12:40 +0000 (09:12 +1000)]
mesa: make_float_temp_image non-static

We need this to do signed stuff for RGTC.

13 years agorgtc: llvmpipe/softpipe refuse RGTC until u_format has support.
Dave Airlie [Mon, 28 Feb 2011 03:33:17 +0000 (13:33 +1000)]
rgtc: llvmpipe/softpipe refuse RGTC until u_format has support.

So far I haven't implemented the u_format code for these.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor300g: force swizzles for RGTC
Dave Airlie [Sun, 27 Feb 2011 07:00:50 +0000 (17:00 +1000)]
r300g: force swizzles for RGTC

still can't get signed to work

13 years agor600g: implement instanced drawing support
Christian König [Mon, 28 Feb 2011 01:00:01 +0000 (02:00 +0100)]
r600g: implement instanced drawing support

13 years agost/mesa & v_bug_mgr: two small instanced drawing fixes
Christian König [Mon, 28 Feb 2011 00:54:36 +0000 (01:54 +0100)]
st/mesa & v_bug_mgr: two small instanced drawing fixes

13 years agoRevert "r600g: Don't negate result of ABS instruction"
Dave Airlie [Mon, 28 Feb 2011 01:10:10 +0000 (11:10 +1000)]
Revert "r600g: Don't negate result of ABS instruction"

This reverts commit b6d40213935da702570eca2c0861bd4b1d7f5254.

This actually breaks gears here on my rv670.

13 years agor600g: Process TRUNC with tgis_op2
Fabian Bieler [Sun, 27 Feb 2011 15:10:55 +0000 (16:10 +0100)]
r600g: Process TRUNC with tgis_op2

TRUNC is neither a scalar instruction nor exclusive to the Trans unit.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: Don't negate result of ABS instruction
Fabian Bieler [Fri, 25 Feb 2011 09:11:37 +0000 (10:11 +0100)]
r600g: Don't negate result of ABS instruction

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoi915g: implement cache flushing
Daniel Vetter [Fri, 25 Feb 2011 22:40:27 +0000 (23:40 +0100)]
i915g: implement cache flushing

With an extremely dumb strategy. But it's the same i915c employs.

Also improve the hw_atom code slightly by statically specifying the
required batch space. For extremely variably stuff (shaders, constants)
it would probably be better to add a new parameter to the hw_atom->validate
function.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: buffer validation for blitter
Daniel Vetter [Fri, 25 Feb 2011 21:51:03 +0000 (22:51 +0100)]
i915g: buffer validation for blitter

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: buffer validation for render state
Daniel Vetter [Sun, 27 Feb 2011 20:57:31 +0000 (21:57 +0100)]
i915g: buffer validation for render state

Also contains the first few bits for hw state atoms.

v2: Implement suggestion by Jakob Bornecrantz.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g/winsys: buffer validation support
Daniel Vetter [Sun, 27 Feb 2011 16:51:48 +0000 (17:51 +0100)]
i915g/winsys: buffer validation support

v2: Add the batch bo to the libdrm validation lost, for otherwise
libdrm won't take previously used buffers into account.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: add raw batchbuffer dumping in drm winsys
Daniel Vetter [Sun, 27 Feb 2011 15:32:38 +0000 (16:32 +0100)]
i915g: add raw batchbuffer dumping in drm winsys

These files can be decoded with intel_dump_decode from the intel-gpu-tools
available at:

http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: cleanup static state calculation, part 2
Daniel Vetter [Sat, 26 Feb 2011 14:53:01 +0000 (15:53 +0100)]
i915g: cleanup static state calculation, part 2

Now also for the DRAW_RECT command

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: cleanup static state calculation, part 1
Daniel Vetter [Sat, 26 Feb 2011 14:24:51 +0000 (15:24 +0100)]
i915g: cleanup static state calculation, part 1

Move it to i915_state_static.c This way i915_emit_state.c only emits
state and doesn't (re)calculate it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoglsl/builtins: Fix return type for textureSize sampler2DArray variants.
Kenneth Graunke [Sat, 26 Feb 2011 00:33:40 +0000 (16:33 -0800)]
glsl/builtins: Fix return type for textureSize sampler2DArray variants.

A copy and paste error.

13 years agoglx: Adjust the MESA_multithread_makecurrent spec to match implementation.
Eric Anholt [Thu, 24 Feb 2011 23:25:59 +0000 (15:25 -0800)]
glx: Adjust the MESA_multithread_makecurrent spec to match implementation.

This came out of discussion at the office today, and we agreed that
solving this for indirect wasn't really interesting, though the
server-side change would be of a similar level of difficulty.

13 years agointel: Use the current context rather than last bound context for a drawable.
Eric Anholt [Tue, 15 Feb 2011 02:57:49 +0000 (18:57 -0800)]
intel: Use the current context rather than last bound context for a drawable.

If another thread bound a context to the drawable then unbound it, the
driContextPriv would end up NULL.

With the previous two fixes, this fixes glx-multithread-makecurrent-2,
despite the issue not being about the multithreaded makecurrent.

13 years agodri2: Don't call the dri2 flush hook for swapbuffers unless we have a context.
Eric Anholt [Tue, 15 Feb 2011 03:03:37 +0000 (19:03 -0800)]
dri2: Don't call the dri2 flush hook for swapbuffers unless we have a context.

The driver only has one reasonable place to look for its context to
flush anything, which is the current context.  Don't bother it with
having to check.

13 years agoglx: Don't do the implicit glFlush in SwapBuffers if it's the wrong drawable.
Eric Anholt [Tue, 15 Feb 2011 02:38:33 +0000 (18:38 -0800)]
glx: Don't do the implicit glFlush in SwapBuffers if it's the wrong drawable.

The GLX Spec says you only implicitly glFlush if the drawable being
swapped is the current context's drawable.

13 years agomesa: Add new MESA_multithread_makecurrent extension.
Eric Anholt [Fri, 4 Feb 2011 01:26:02 +0000 (17:26 -0800)]
mesa: Add new MESA_multithread_makecurrent extension.

This extension allows a client to bind one context in multiple threads
simultaneously.  It is then up to the client to manage synchronization of
access to the GL, just as normal multithreaded GL from multiple contexts
requires synchronization management to shared objects.

13 years agoi915g: make dynamic state emission actually lazy
Daniel Vetter [Sat, 26 Feb 2011 18:11:32 +0000 (19:11 +0100)]
i915g: make dynamic state emission actually lazy

Premature semicolon.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agogallivm: Initialize stack values
Jakob Bornecrantz [Sat, 26 Feb 2011 19:12:27 +0000 (20:12 +0100)]
gallivm: Initialize stack values

valgrind gives me a warning with llvmpipe with profile builds but
not debug builds, this seems to fix the issue at least.

13 years agoglsl/Makefile: Remove builtin_function.cpp if generation fails.
Arkadiusz Miskiewicz [Sat, 26 Feb 2011 18:26:09 +0000 (10:26 -0800)]
glsl/Makefile: Remove builtin_function.cpp if generation fails.

Fixes bug #34346.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi915g: Handle null constants properly
Jakob Bornecrantz [Sat, 26 Feb 2011 14:45:13 +0000 (15:45 +0100)]
i915g: Handle null constants properly

13 years agoi915g: fix null deref in draw_rect emission
Daniel Vetter [Fri, 25 Feb 2011 22:32:48 +0000 (23:32 +0100)]
i915g: fix null deref in draw_rect emission

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: simplify math in constants emission
Daniel Vetter [Fri, 25 Feb 2011 17:03:16 +0000 (18:03 +0100)]
i915g: simplify math in constants emission

The old code even falls apart for nr == 0 (which is caught earlier, but)!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: Use the same debug env vars in drm and sw winsys
Jakob Bornecrantz [Sat, 26 Feb 2011 14:24:13 +0000 (15:24 +0100)]
i915g: Use the same debug env vars in drm and sw winsys

13 years agoi915g: Use unchecked writes in sw winsys batchbuffer
Jakob Bornecrantz [Sat, 26 Feb 2011 00:42:19 +0000 (01:42 +0100)]
i915g: Use unchecked writes in sw winsys batchbuffer