mesa.git
14 years agoutil: Set DISCARD & UNSYNCHRONIZED when uploading vertices sequentially.
José Fonseca [Thu, 21 Jan 2010 17:38:47 +0000 (09:38 -0800)]
util: Set DISCARD & UNSYNCHRONIZED when uploading vertices sequentially.

14 years agoutil: Use pipe_buffer_write_nooverlap in blits / mipmap generation.
José Fonseca [Thu, 21 Jan 2010 17:32:17 +0000 (09:32 -0800)]
util: Use pipe_buffer_write_nooverlap in blits / mipmap generation.

14 years agogallium: New inline to write buffers which avoids synchronization.
José Fonseca [Thu, 21 Jan 2010 17:30:22 +0000 (09:30 -0800)]
gallium: New inline to write buffers which avoids synchronization.

14 years agogallium: Set PIPE_BUFFER_USAGE_DISCARD flag in pipe_buffer_write.
José Fonseca [Thu, 21 Jan 2010 17:19:25 +0000 (09:19 -0800)]
gallium: Set PIPE_BUFFER_USAGE_DISCARD flag in pipe_buffer_write.

14 years agogallium: Remove temporary hack for the absence of a discard flag.
José Fonseca [Thu, 21 Jan 2010 17:13:15 +0000 (09:13 -0800)]
gallium: Remove temporary hack for the absence of a discard flag.

PIPE_BUFFER_USAGE_DISCARD flag now exists.

14 years agosvga: Follow buffer usage semantics properly.
José Fonseca [Thu, 21 Jan 2010 20:12:33 +0000 (12:12 -0800)]
svga: Follow buffer usage semantics properly.

It's necessary to download buffers from the host always, except if the
buffer is undefined, because:
- just PIPE_BUFFER_USAGE_CPU_WRITE doesn't guarantee all data is written
  -- old contents may still pierce through
- PIPE_BUFFER_USAGE_DISCARD refers to a range, not the whole buffer, so
  unless we track which parts have been modified and not we still need
  to download the data.

14 years agost/xorg: Remove unnecessary headers.
Vinson Lee [Thu, 21 Jan 2010 23:05:21 +0000 (15:05 -0800)]
st/xorg: Remove unnecessary headers.

14 years agor200: fix CS section size mismatch
Roland Scheidegger [Thu, 21 Jan 2010 22:30:16 +0000 (17:30 -0500)]
r200: fix CS section size mismatch

Partial fix for fdo bug 25544

The tex handling will still need CS drm changes,
see bug 25544 for more.

14 years agollvmpipe: Remove unnecessary headers.
Vinson Lee [Thu, 21 Jan 2010 22:31:15 +0000 (14:31 -0800)]
llvmpipe: Remove unnecessary headers.

14 years agosvga: Remove unnecessary headers.
Vinson Lee [Thu, 21 Jan 2010 20:12:11 +0000 (12:12 -0800)]
svga: Remove unnecessary headers.

14 years agomach64: Remove unnecessary headers.
Vinson Lee [Thu, 21 Jan 2010 06:52:49 +0000 (22:52 -0800)]
mach64: Remove unnecessary headers.

14 years agoi810: Remove unnecessary headers.
Vinson Lee [Thu, 21 Jan 2010 06:02:51 +0000 (22:02 -0800)]
i810: Remove unnecessary headers.

14 years agoffb: Remove unnecessary headers.
Vinson Lee [Thu, 21 Jan 2010 00:27:44 +0000 (16:27 -0800)]
ffb: Remove unnecessary headers.

14 years agoxlib/softpipe: fix buffer memory leak
Brian Paul [Wed, 20 Jan 2010 17:32:13 +0000 (10:32 -0700)]
xlib/softpipe: fix buffer memory leak

Fixes leak caused by window resize.

14 years agost/mesa: fix format logic in compatible_src_dst_formats()
Brian Paul [Wed, 20 Jan 2010 15:03:46 +0000 (08:03 -0700)]
st/mesa: fix format logic in compatible_src_dst_formats()

We need to consider the user-requested formats, not the actual device-
chosen formats.  See code comments for more details.

14 years agodocs: updated Mesa mailing list info
Brian Paul [Tue, 19 Jan 2010 23:42:43 +0000 (16:42 -0700)]
docs: updated Mesa mailing list info

14 years agost/xorg: Fic bug and close drm_api at proper place
Jakob Bornecrantz [Wed, 20 Jan 2010 14:53:38 +0000 (14:53 +0000)]
st/xorg: Fic bug and close drm_api at proper place

14 years agosoftpipe: Remove unnecessary headers.
Vinson Lee [Wed, 20 Jan 2010 08:08:54 +0000 (00:08 -0800)]
softpipe: Remove unnecessary headers.

14 years agoi915g: Remove unnecessary headers.
Vinson Lee [Wed, 20 Jan 2010 06:47:03 +0000 (22:47 -0800)]
i915g: Remove unnecessary headers.

14 years agosvga: Do a more propper creation of textures from handles
Jakob Bornecrantz [Tue, 19 Jan 2010 21:26:01 +0000 (22:26 +0100)]
svga: Do a more propper creation of textures from handles

14 years agost/xorg: Don't leak BusID buffer
Jakob Bornecrantz [Tue, 19 Jan 2010 22:29:56 +0000 (23:29 +0100)]
st/xorg: Don't leak BusID buffer

14 years agost/xorg: Pass kernel driver name to drmOpen
Jakob Bornecrantz [Tue, 19 Jan 2010 17:14:19 +0000 (17:14 +0000)]
st/xorg: Pass kernel driver name to drmOpen

14 years agost/drm: Expose kernel driver name
Jakob Bornecrantz [Tue, 19 Jan 2010 16:46:28 +0000 (16:46 +0000)]
st/drm: Expose kernel driver name

Based on patch by Chia-I Wu <olvaffe@gmail.com>

Expose the name of the kernel driver as accepted by drmOpenByName.

14 years agost/dri: update dri2 drawables when viewport is changed
Ben Skeggs [Mon, 11 Jan 2010 01:41:47 +0000 (11:41 +1000)]
st/dri: update dri2 drawables when viewport is changed

Fixes gnome-shell on nouveau, as well as window resize with various
other applications.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agoglx: Set GL context to null in __glXSetCurrentContextNull
Luca Barbieri [Sun, 17 Jan 2010 07:19:19 +0000 (23:19 -0800)]
glx: Set GL context to null in __glXSetCurrentContextNull

__glXSetCurrentContextNull currently does not set the GL context to null
in the direct rendering case.

This can result in a segfault trying to flush an invalid old context
in glXMakeCurrent.

This fixes a crash starting the Unigine demos (they still don't work due
to missing extensions though).

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agowgl: Check for PIPE_TEXTURE_USAGE_DISPLAY_TARGET support in exported color pixel...
José Fonseca [Tue, 19 Jan 2010 14:13:44 +0000 (06:13 -0800)]
wgl: Check for PIPE_TEXTURE_USAGE_DISPLAY_TARGET support in exported color pixel formats.

Since all formats we export have PFD_DRAW_TO_WINDOW flag.

14 years agowgl: Don't export pure-stencil pixel formats.
José Fonseca [Tue, 19 Jan 2010 14:12:10 +0000 (06:12 -0800)]
wgl: Don't export pure-stencil pixel formats.

They cause DCT's conform to always fail.

14 years agosoftpipe: Fix vertex buffer memory leak.
José Fonseca [Tue, 19 Jan 2010 13:39:18 +0000 (05:39 -0800)]
softpipe: Fix vertex buffer memory leak.

14 years agounichrome: Remove unnecessary headers.
Vinson Lee [Tue, 19 Jan 2010 08:45:16 +0000 (00:45 -0800)]
unichrome: Remove unnecessary headers.

14 years agomesa: Remove unnecessary header from attrib.c.
Vinson Lee [Tue, 19 Jan 2010 06:50:08 +0000 (22:50 -0800)]
mesa: Remove unnecessary header from attrib.c.

14 years agomesa: Remove unnecessary header from blend.c.
Vinson Lee [Tue, 19 Jan 2010 06:45:23 +0000 (22:45 -0800)]
mesa: Remove unnecessary header from blend.c.

14 years agomesa: Remove unnecessary headers from buffers.c.
Vinson Lee [Tue, 19 Jan 2010 06:17:03 +0000 (22:17 -0800)]
mesa: Remove unnecessary headers from buffers.c.

14 years agomesa: Remove unnecessary header from convolve.c.
Vinson Lee [Tue, 19 Jan 2010 05:56:58 +0000 (21:56 -0800)]
mesa: Remove unnecessary header from convolve.c.

14 years agomesa: Fix typo of 'unknown' in debug.c.
Vinson Lee [Tue, 19 Jan 2010 05:41:31 +0000 (21:41 -0800)]
mesa: Fix typo of 'unknown' in debug.c.

14 years agomesa: Remove unnecessary headers from debug.c.
Vinson Lee [Tue, 19 Jan 2010 05:37:18 +0000 (21:37 -0800)]
mesa: Remove unnecessary headers from debug.c.

14 years agomesa: Remove unnecessary header from depthstencil.c.
Vinson Lee [Tue, 19 Jan 2010 05:34:25 +0000 (21:34 -0800)]
mesa: Remove unnecessary header from depthstencil.c.

14 years agomesa: Remove unnecessary headers from dlist.c.
Vinson Lee [Tue, 19 Jan 2010 05:31:02 +0000 (21:31 -0800)]
mesa: Remove unnecessary headers from dlist.c.

14 years agomesa: Remove unnecessary header from drawpix.c.
Vinson Lee [Tue, 19 Jan 2010 05:22:47 +0000 (21:22 -0800)]
mesa: Remove unnecessary header from drawpix.c.

14 years agomesa: Remove unnecessary header from enable.c.
Vinson Lee [Tue, 19 Jan 2010 05:17:45 +0000 (21:17 -0800)]
mesa: Remove unnecessary header from enable.c.

14 years agomesa: Remove unnecessary headers from fbobject.c.
Vinson Lee [Tue, 19 Jan 2010 05:14:04 +0000 (21:14 -0800)]
mesa: Remove unnecessary headers from fbobject.c.

14 years agomesa: Remove unnecessary header from formats.c.
Vinson Lee [Tue, 19 Jan 2010 05:07:53 +0000 (21:07 -0800)]
mesa: Remove unnecessary header from formats.c.

14 years agomesa: Remove unnecessary header from image.c.
Vinson Lee [Tue, 19 Jan 2010 05:02:19 +0000 (21:02 -0800)]
mesa: Remove unnecessary header from image.c.

14 years agosoftpipe: Skip depth testing for PIPE_S8_UNORM.
José Fonseca [Tue, 19 Jan 2010 03:33:13 +0000 (19:33 -0800)]
softpipe: Skip depth testing for PIPE_S8_UNORM.

14 years agomesa: Handle PIPE_FORMAT_B8G8R8X8_UNORM.
José Fonseca [Tue, 19 Jan 2010 03:32:36 +0000 (19:32 -0800)]
mesa: Handle PIPE_FORMAT_B8G8R8X8_UNORM.

14 years agopipebuffer: Ensure buffer size/alignment is not zero.
José Fonseca [Thu, 14 Jan 2010 15:07:20 +0000 (15:07 +0000)]
pipebuffer: Ensure buffer size/alignment is not zero.

14 years agosvga: Ensure buffer size/alignment is not zero.
José Fonseca [Thu, 14 Jan 2010 15:06:48 +0000 (15:06 +0000)]
svga: Ensure buffer size/alignment is not zero.

14 years agomesa: Remove unnecessary headers from lines.c.
Vinson Lee [Tue, 19 Jan 2010 03:32:51 +0000 (19:32 -0800)]
mesa: Remove unnecessary headers from lines.c.

14 years agomesa: Remove unnecessary header from mipmap.c.
Vinson Lee [Tue, 19 Jan 2010 03:23:47 +0000 (19:23 -0800)]
mesa: Remove unnecessary header from mipmap.c.

14 years agomesa: Remove unnecessary header from pixel.c.
Vinson Lee [Tue, 19 Jan 2010 03:20:56 +0000 (19:20 -0800)]
mesa: Remove unnecessary header from pixel.c.

14 years agomesa: Remove unnecessary headers from pixelstore.c.
Vinson Lee [Tue, 19 Jan 2010 03:14:23 +0000 (19:14 -0800)]
mesa: Remove unnecessary headers from pixelstore.c.

14 years agomesa: Remove unnecessary header from points.c.
Vinson Lee [Tue, 19 Jan 2010 03:10:05 +0000 (19:10 -0800)]
mesa: Remove unnecessary header from points.c.

14 years agomesa: Remove unnecessary header from polygon.c.
Vinson Lee [Tue, 19 Jan 2010 03:03:54 +0000 (19:03 -0800)]
mesa: Remove unnecessary header from polygon.c.

14 years agomesa: Remove unnecessary header from state.c.
Vinson Lee [Tue, 19 Jan 2010 02:54:54 +0000 (18:54 -0800)]
mesa: Remove unnecessary header from state.c.

14 years agomesa: Remove unnecessary headers from texcompress.c.
Vinson Lee [Tue, 19 Jan 2010 02:52:24 +0000 (18:52 -0800)]
mesa: Remove unnecessary headers from texcompress.c.

14 years agost/dri: Add comment for intentional fallthrough in case statement.
Vinson Lee [Tue, 19 Jan 2010 02:14:03 +0000 (18:14 -0800)]
st/dri: Add comment for intentional fallthrough in case statement.

14 years agost/mesa: change instruction count assertion to > 0
Brian Paul [Mon, 18 Jan 2010 18:26:55 +0000 (11:26 -0700)]
st/mesa: change instruction count assertion to > 0

Shaders should at least have an END instruction.

14 years agost/dri: fix optionCache memory leaks
Marcin Slusarz [Mon, 18 Jan 2010 17:48:06 +0000 (10:48 -0700)]
st/dri: fix optionCache memory leaks

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agoglxgears: unbind current context before "destroying" it
Marcin Slusarz [Sun, 17 Jan 2010 22:49:34 +0000 (14:49 -0800)]
glxgears: unbind current context before "destroying" it

glXDestroyContext does not destroy the context if it's still
connected to some window. Unbind context from window to test it.

Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agost/xorg: If dri2 version is 2 support version 1 as well
Jakob Bornecrantz [Fri, 15 Jan 2010 01:29:13 +0000 (01:29 +0000)]
st/xorg: If dri2 version is 2 support version 1 as well

Thanks to X server commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca
it is possible to be ABI compatible in version 2 with version 1 of
the DRI2 interface.

14 years agost/xorg: Set enforce version to 1 if not defined
Jakob Bornecrantz [Fri, 15 Jan 2010 01:14:55 +0000 (01:14 +0000)]
st/xorg: Set enforce version to 1 if not defined

14 years agows/vmware: Check DRM version also when bootstrapping in dri2 mode.
Thomas Hellstrom [Mon, 18 Jan 2010 14:55:17 +0000 (15:55 +0100)]
ws/vmware: Check DRM version also when bootstrapping in dri2 mode.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agost/dri: Don't request a fake front if the server adds one automatically.
Thomas Hellstrom [Mon, 18 Jan 2010 12:33:08 +0000 (13:33 +0100)]
st/dri: Don't request a fake front if the server adds one automatically.

We use the presence of the getBuffersWithFormat extension function to
detect whether the server automatically adds a front.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
14 years agomesa: Remove unnecessary headers from texformat.c.
Vinson Lee [Mon, 18 Jan 2010 08:47:56 +0000 (00:47 -0800)]
mesa: Remove unnecessary headers from texformat.c.

14 years agomesa: Remove unnecessary headers from texgetimage.c.
Vinson Lee [Mon, 18 Jan 2010 08:14:51 +0000 (00:14 -0800)]
mesa: Remove unnecessary headers from texgetimage.c.

14 years agomesa: Remove unnecessary header from teximage.c.
Vinson Lee [Mon, 18 Jan 2010 06:31:53 +0000 (22:31 -0800)]
mesa: Remove unnecessary header from teximage.c.

14 years agomesa: Remove unnecessary header from texobj.c.
Vinson Lee [Mon, 18 Jan 2010 04:50:15 +0000 (20:50 -0800)]
mesa: Remove unnecessary header from texobj.c.

14 years agomesa: Remove unnecessary header from texparam.c.
Vinson Lee [Mon, 18 Jan 2010 00:21:11 +0000 (16:21 -0800)]
mesa: Remove unnecessary header from texparam.c.

14 years agomesa: Remove unnecessary headers from texstate.c.
Vinson Lee [Mon, 18 Jan 2010 00:08:59 +0000 (16:08 -0800)]
mesa: Remove unnecessary headers from texstate.c.

14 years agomesa: Use preprocessor to comment out code.
Vinson Lee [Sun, 17 Jan 2010 23:48:39 +0000 (15:48 -0800)]
mesa: Use preprocessor to comment out code.

14 years agomesa: Remove unnecessary headers from vtxfmt.c.
Vinson Lee [Sun, 17 Jan 2010 09:49:16 +0000 (01:49 -0800)]
mesa: Remove unnecessary headers from vtxfmt.c.

14 years agomesa: Remove unnecessary headers from arbprogparse.c.
Vinson Lee [Sun, 17 Jan 2010 07:41:05 +0000 (23:41 -0800)]
mesa: Remove unnecessary headers from arbprogparse.c.

14 years agomesa: Remove unnecessary header from nvvertparse.c.
Vinson Lee [Sun, 17 Jan 2010 00:15:37 +0000 (16:15 -0800)]
mesa: Remove unnecessary header from nvvertparse.c.

14 years agoglsl: Remove unnecessary header from prog_execute.c.
Vinson Lee [Sun, 17 Jan 2010 00:06:58 +0000 (16:06 -0800)]
glsl: Remove unnecessary header from prog_execute.c.

14 years agoglsl: Remove unnecessary header from prog_statevars.c.
Vinson Lee [Sat, 16 Jan 2010 23:51:52 +0000 (15:51 -0800)]
glsl: Remove unnecessary header from prog_statevars.c.

14 years agoglsl: Remove unnecessary headers from shader_api.c.
Vinson Lee [Sat, 16 Jan 2010 23:35:56 +0000 (15:35 -0800)]
glsl: Remove unnecessary headers from shader_api.c.

14 years agoglsl: Remove unnecessary header from slang_emit.c.
Vinson Lee [Sat, 16 Jan 2010 23:00:29 +0000 (15:00 -0800)]
glsl: Remove unnecessary header from slang_emit.c.

14 years agost/mesa: Remove unnecessary header from st_cb_drawpixels.c.
Vinson Lee [Sat, 16 Jan 2010 21:29:15 +0000 (13:29 -0800)]
st/mesa: Remove unnecessary header from st_cb_drawpixels.c.

14 years agoglsl: Remove unnecessary header from slang_builtin.c.
Vinson Lee [Sat, 16 Jan 2010 10:20:51 +0000 (02:20 -0800)]
glsl: Remove unnecessary header from slang_builtin.c.

14 years agoglsl: Remove unnecessary headers from slang_compile.c.
Vinson Lee [Sat, 16 Jan 2010 10:16:24 +0000 (02:16 -0800)]
glsl: Remove unnecessary headers from slang_compile.c.

14 years agoglsl: Remove unnecessary header from slang_link.c.
Vinson Lee [Sat, 16 Jan 2010 10:02:49 +0000 (02:02 -0800)]
glsl: Remove unnecessary header from slang_link.c.

14 years agoglsl: Remove unnecessary header from slang_log.c.
Vinson Lee [Sat, 16 Jan 2010 09:50:08 +0000 (01:50 -0800)]
glsl: Remove unnecessary header from slang_log.c.

14 years agost/mesa: Remove unnecessary header from st_atom_framebuffer.c.
Vinson Lee [Sat, 16 Jan 2010 09:39:04 +0000 (01:39 -0800)]
st/mesa: Remove unnecessary header from st_atom_framebuffer.c.

14 years agost/mesa: Remove unnecessary header from st_atom_pixeltransfer.c.
Vinson Lee [Sat, 16 Jan 2010 08:52:34 +0000 (00:52 -0800)]
st/mesa: Remove unnecessary header from st_atom_pixeltransfer.c.

14 years agost/mesa: Remove unnecessary header from st_atom_sampler.c.
Vinson Lee [Sat, 16 Jan 2010 08:45:36 +0000 (00:45 -0800)]
st/mesa: Remove unnecessary header from st_atom_sampler.c.

14 years agost/mesa: Remove unnecessary header from st_atom_shader.c.
Vinson Lee [Sat, 16 Jan 2010 08:36:31 +0000 (00:36 -0800)]
st/mesa: Remove unnecessary header from st_atom_shader.c.

14 years agost/mesa: Remove unnecessary headers from st_cb_accum.c.
Vinson Lee [Sat, 16 Jan 2010 08:30:25 +0000 (00:30 -0800)]
st/mesa: Remove unnecessary headers from st_cb_accum.c.

14 years agost/mesa: Remove unnecessary headers from st_cb_bitmap.c.
Vinson Lee [Sat, 16 Jan 2010 08:08:54 +0000 (00:08 -0800)]
st/mesa: Remove unnecessary headers from st_cb_bitmap.c.

14 years agost/mesa: Remove unnecessary headers from st_cb_blit.c.
Vinson Lee [Sat, 16 Jan 2010 07:17:00 +0000 (23:17 -0800)]
st/mesa: Remove unnecessary headers from st_cb_blit.c.

14 years agost/mesa: Remove unnecessary headers from st_cb_clear.c.
Vinson Lee [Sat, 16 Jan 2010 07:02:07 +0000 (23:02 -0800)]
st/mesa: Remove unnecessary headers from st_cb_clear.c.

14 years agost/mesa: Remove unnecessary headers from st_cb_drawpixels.c.
Vinson Lee [Sat, 16 Jan 2010 06:55:47 +0000 (22:55 -0800)]
st/mesa: Remove unnecessary headers from st_cb_drawpixels.c.

14 years agor600: fill in some missing XRGB tex formats
Alex Deucher [Sat, 16 Jan 2010 03:23:40 +0000 (22:23 -0500)]
r600: fill in some missing XRGB tex formats

14 years agor600: set tiling correctly for texturing from depth buffer
Alex Deucher [Sat, 16 Jan 2010 01:54:12 +0000 (20:54 -0500)]
r600: set tiling correctly for texturing from depth buffer

14 years agor600: fix typo in SQ setup
Alex Deucher [Sat, 16 Jan 2010 01:53:53 +0000 (20:53 -0500)]
r600: fix typo in SQ setup

14 years agost/mesa: Remove unnecessary header from st_cb_fbo.c.
Vinson Lee [Sat, 16 Jan 2010 02:24:12 +0000 (18:24 -0800)]
st/mesa: Remove unnecessary header from st_cb_fbo.c.

14 years agost/mesa: Remove unnecessary headers from st_cb_feedback.c.
Vinson Lee [Sat, 16 Jan 2010 02:20:56 +0000 (18:20 -0800)]
st/mesa: Remove unnecessary headers from st_cb_feedback.c.

14 years agost/mesa: Remove unnecessary header from st_cb_program.c.
Vinson Lee [Sat, 16 Jan 2010 00:28:56 +0000 (16:28 -0800)]
st/mesa: Remove unnecessary header from st_cb_program.c.

14 years agost/mesa: Remove unnecessary header from st_cb_queryobj.c.
Vinson Lee [Sat, 16 Jan 2010 00:27:28 +0000 (16:27 -0800)]
st/mesa: Remove unnecessary header from st_cb_queryobj.c.

14 years agotgsi: fix detection of front-facing attribute
Brian Paul [Fri, 15 Jan 2010 21:57:55 +0000 (14:57 -0700)]
tgsi: fix detection of front-facing attribute

This code was not updated when we added TGSI_SEMANTIC_FACE a while ago.

14 years agoswrast: add missing call to _swrast_depth_bounds_test()
Brian Paul [Fri, 15 Jan 2010 21:25:30 +0000 (14:25 -0700)]
swrast: add missing call to _swrast_depth_bounds_test()

We were calling this from the CI span function, but not the RGBA
span function.

I don't know of a test program for the GL_EXT_depth_bounds_test
extension...

14 years agoswrast: fix broken _swrast_depth_clamp_span()
Brian Paul [Fri, 15 Jan 2010 21:19:23 +0000 (14:19 -0700)]
swrast: fix broken _swrast_depth_clamp_span()

The integer Z clamping range depends on the number of bits
in the Z buffer because that's the scale factor used when we
transform NDC coords by the viewport/depth range.

Fixes fd.o bug #25972 but only for Z buffers up to a depth
of 30 bits.  Beyond that we get into messy integer overflow
issues and things fall apart.