Vinson Lee [Mon, 31 Dec 2012 23:19:43 +0000 (15:19 -0800)]
configure.ac: Remove space after indent -T flag.
Fixes this build error on platforms not using GNU indent.
indent: Command line: ``-T'' requires a parameter
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Ian Romanick [Fri, 30 Nov 2012 22:29:49 +0000 (14:29 -0800)]
intel: Fix copy-and-paste bug setting gl_constants::MaxSamples
gl_constants::MaxSamples is an integer, so setting it to 1.0 is just
silly.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Mon, 3 Dec 2012 19:55:12 +0000 (11:55 -0800)]
mesa: Disallow R, RG, or RGB integer and unsigned formats in OpenGL ES 3.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Tue, 4 Dec 2012 18:36:10 +0000 (10:36 -0800)]
mesa: Disallow SNORM formats for renderbuffers in OpenGL ES
v2: Move {RED,RG,RGB,RGBA}_SNORM changes from the previous commit to
this commit. Based on suggestions from Ken.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Sat, 1 Dec 2012 19:06:48 +0000 (11:06 -0800)]
mesa: Disallow deprecated SNORM formats for renderbuffers
The OpenGL 3.2 core profile spec says:
"The following base internal formats from table 3.11 are
color-renderable: RED, RG, RGB, and RGBA. The sized internal formats
from table 3.12 that have a color-renderable base internal format
are also color-renderable. No other formats, including compressed
internal formats, are color-renderable."
The OpenGL 3.2 compatibility profile spec says (only ALPHA is added):
"The following base internal formats from table 3.16 are
color-renderable: ALPHA, RED, RG, RGB, and RGBA. The sized internal formats
from table 3.17 that have a color-renderable base internal format
are also color-renderable. No other formats, including compressed
internal formats, are color-renderable."
Table 3.12 in the core profile spec and table 3.17 in the compatibility
profile spec list SNORM formats as having a base internal format of RED,
RG, RGB, or RGBA. From this we infer that they should also be color
renderable.
The OpenGL ES 3.0 spec says:
"An internal format is color-renderable if it is one of the formats
from table 3.12 noted as color-renderable or if it is unsized format
RGBA or RGB. No other formats, including compressed internal
formats, are color-renderable."
In the OpenGL ES 3.0 spec, none of the SNORM formats have "color-
renderable" marked in table 3.12. The RGB I and UI formats also are not
color-renderable in ES3, but we'll save that change for another patch.
Both NVIDIA's closed-source driver (version 304.64) and AMD's
closed-source driver (Catalyst 12.6 on HD 3650) reject *all* SNORM
formats for renderbuffers in OpenGL 3.3 compatibility profiles.
v2: Move {RED,RG,RGB,RGBA}_SNORM changes from the this commit to the
next commit. Based on suggestions from Ken.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Thu, 3 Jan 2013 15:04:50 +0000 (08:04 -0700)]
util: fix addressing bug in pipe_put_tile_z() for PIPE_FORMAT_Z32_FLOAT
The Z32 pixel is 4 bytes so multiply x by 4, not 2.
Note: This is a candidate for the stable branches.
Brian Paul [Thu, 3 Jan 2013 15:02:57 +0000 (08:02 -0700)]
util: add get/put_tile_z() support for PIPE_FORMAT_Z32_FLOAT_S8X24_UINT
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58972
Note: This is a candidate for the stable branches.
Brian Paul [Wed, 2 Jan 2013 20:46:20 +0000 (13:46 -0700)]
gallivm: support more immediates in lp_build_tgsi_info()
Bump limit from 32 to 128.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=58545
Brian Paul [Fri, 4 Jan 2013 00:31:22 +0000 (17:31 -0700)]
xlib: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values
Fixes piglit glx-dont-care-mask test.
Note: This is a candidate for the stable branches.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Brian Paul [Fri, 4 Jan 2013 00:30:34 +0000 (17:30 -0700)]
st/glx: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values
Fixes piglit glx-dont-care-mask test.
Note: This is a candidate for the stable branches.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Tom Stellard [Fri, 4 Jan 2013 15:38:37 +0000 (15:38 +0000)]
radeon/llvm: Remove backend code from Mesa
This code now lives in an external tree.
For the next Mesa release fetch the code from the master branch
of this LLVM repo:
http://cgit.freedesktop.org/~tstellar/llvm/
For all subsequent Mesa releases, fetch the code from the official LLVM
project:
www.llvm.org
Johannes Obermayr [Thu, 20 Dec 2012 19:56:17 +0000 (20:56 +0100)]
Support LLVM >= 3.2 on radeonsi and opencl.
Tom Stellard:
- Backend now has same name for all LLVM versions
- Add missing LLVM_VERSION_INT definition
Tom Stellard [Fri, 4 Jan 2013 15:47:53 +0000 (15:47 +0000)]
clover: Fix build after the addition of enum pipe_flush_flags
Broken since commit
598cc1f74d7ae924e84dee801b456ab7b0b22f84
Marek Olšák [Wed, 2 Jan 2013 19:28:10 +0000 (20:28 +0100)]
r300g: don't check for vertex and index buffer bind flags
Marek Olšák [Fri, 4 Jan 2013 19:07:06 +0000 (20:07 +0100)]
r300g/swtcl: use memcpy to emit indices
Marek Olšák [Fri, 4 Jan 2013 17:00:46 +0000 (18:00 +0100)]
r300g/swtcl: simplify vertex uploading
- skip the vertex buffer reallocation in flush and just use
the unsynchronized flag to get new memory.
- remove the cruft needed to get around the issues with the vertex buffer
reallocation in flush
- use pb_buffer instead of pipe_resource
Marek Olšák [Fri, 4 Jan 2013 17:27:21 +0000 (18:27 +0100)]
r300g/swtcl: fix crash when setting vertex buffers
Broken by
e73bf3b805de78299f1a652668ba4e6eab9bac94.
Marek Olšák [Wed, 2 Jan 2013 19:23:57 +0000 (20:23 +0100)]
r300g: don't set PIPE_BIND flags for internal textures
Paul Berry [Sat, 29 Dec 2012 19:31:37 +0000 (11:31 -0800)]
i965: Fix glCompressedTexSubImage2D offsets for ETC textures.
This patch fixes intel_miptree_unmap_etc() (which decompresses ETC
textures to linear) to pay attention to map->x and map->y when writing
to the destination image. Previously these values were ignored,
causing the xoffset and yoffset parameters passed to
glCompressedTexSubImage2D() to be ignored.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kristian Høgsberg [Fri, 14 Dec 2012 04:32:51 +0000 (23:32 -0500)]
egl/wayland: Remove kooky flush code
We used to have to jump through hoops to call glFlush at swap buffer time,
but the flush extension made that unnecessary a long time ago.
Kristian Høgsberg [Fri, 14 Dec 2012 04:21:46 +0000 (23:21 -0500)]
egl/wayland: Remove confusing comment about front buffer rendering
Kristian Høgsberg [Fri, 14 Dec 2012 04:20:16 +0000 (23:20 -0500)]
egl_dri2: Remove unused struct dri2_egl_buffer from header file
Kristian Høgsberg [Thu, 13 Dec 2012 20:59:24 +0000 (15:59 -0500)]
egl: Add extension infrastructure for EGL_EXT_buffer_age
Kristian Høgsberg [Fri, 14 Dec 2012 04:44:09 +0000 (23:44 -0500)]
egl: Update to revision 19987 of eglext.h
This pulls in EGL_EXT_buffer_age.
Brian Paul [Fri, 4 Jan 2013 15:21:12 +0000 (08:21 -0700)]
util: move var declaration before loop to fix MSVC error
Marek Olšák [Thu, 20 Dec 2012 02:45:49 +0000 (03:45 +0100)]
r600g: implement 3D transfers
That means we can map and read multiple slices with one transfer_map call.
Marek Olšák [Thu, 20 Dec 2012 16:00:06 +0000 (17:00 +0100)]
st/mesa: fix assertion failures with
2101010 vertex formats
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 15:40:33 +0000 (16:40 +0100)]
st/mesa: accelerate CopyTexSubImage for 1D array textures
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 14:15:15 +0000 (15:15 +0100)]
st/mesa: fix CopyTexSubImage fallback for 1D array textures
- We should use a 3D transfer of size Width x 1 x NumLayers.
- We should use layer_stride instead of stride.
(even though they are likely to be equal with 1D array textures)
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 02:54:33 +0000 (03:54 +0100)]
st/mesa: fix GetTexImage for compressed 2D array textures
This uses a 3D blit to decompress the texture and then a 3D transfer
to read it.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 01:33:45 +0000 (02:33 +0100)]
gallium/util: remove unused helper util_create_rgba_texture
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 01:09:56 +0000 (02:09 +0100)]
st/mesa: try to find the format matching format+type in decompressed_with_blit
There was the fast path based on _mesa_format_matches_format_and_type
for GetTexImage, but it never worked, because the Mesa format we were testing
there was always compressed. Further testing showed that the fast path
had been completely broken.
In this commit, the somewhat limited helper util_create_rgba_texture is
no longer used and instead, custom code for the texture creation is added,
which tries to find the best matching RGBA8 format, so that we can hit
the fast path *always* if the read format is a variant of RGBA8 and supported
by the driver.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 00:41:57 +0000 (01:41 +0100)]
st/mesa: fix GetTexImage for compressed cubemaps
I'll deal with 2D arrays later.
NOTE: This is a candidate for the stable branches.
Marek Olšák [Thu, 20 Dec 2012 02:43:57 +0000 (03:43 +0100)]
gallium/u_blitter: implement 3D blitting
Scaling and flipping in the Z direction isn't allowed yet.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 12:08:00 +0000 (13:08 +0100)]
gallium/u_blitter: fix blitting TEXTURE_CUBE_ARRAY with a non-zero cube index
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 02:42:11 +0000 (03:42 +0100)]
gallium/u_blitter: minor simplification
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Wed, 19 Dec 2012 22:06:51 +0000 (23:06 +0100)]
gallium/u_blitter: unify some parameters into a dstbox parameter in blit_generic
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Wed, 19 Dec 2012 21:25:22 +0000 (22:25 +0100)]
gallium/u_blitter: remove useless parameter from blitter_default_dst_texture
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 14:07:35 +0000 (15:07 +0100)]
gallium/util: complete implementation of util_dump_transfer
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 20 Dec 2012 02:57:39 +0000 (03:57 +0100)]
mesa: allow TEXTURE_CUBE_MAP_ARRAY in GetTexImage
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Fri, 21 Dec 2012 16:15:56 +0000 (17:15 +0100)]
gallium/radeon: send the END_OF_FRAME flag to the DRM
Marek Olšák [Fri, 21 Dec 2012 16:03:22 +0000 (17:03 +0100)]
gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flag
Usage with pipe_context:
pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME);
Usage with st_context_iface:
st->flush(st, ST_FLUSH_END_OF_FRAME, NULL);
The flag is only a hint for drivers. Radeon will use it for buffer eviction
heuristics in the kernel (e.g. for queries like how many frames have passed
since a buffer was used).
The flag is currently only generated by st/dri on SwapBuffers.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Marek Olšák [Fri, 4 Jan 2013 11:40:33 +0000 (12:40 +0100)]
radeonsi: fix int->bool conversion in fence_signalled
Marek Olšák [Fri, 4 Jan 2013 11:40:04 +0000 (12:40 +0100)]
r600g: fix int->bool conversion in fence_signalled
NOTE: This is a candidate for the stable branches.
Paul Berry [Thu, 3 Jan 2013 19:51:38 +0000 (11:51 -0800)]
Add new .gitignore entries for Automake 1.13 tests
Automake 1.13 creates a bunch of new build artefacts:
- bin/test-driver, a script for running tests.
- *.trs files for every "make check" test result.
- *.log files containing the output of every test run by "make check".
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Fri, 28 Dec 2012 20:45:14 +0000 (12:45 -0800)]
i965: Replace structs with bit-shifting for Gen7 SURFACE_STATE entries.
Every generation except Gen7 creates SURFACE_STATE entries via a
uint32_t array. Only Gen7 uses the older bitfield structure, which we
moved away from because it was less efficient. Convert it for
consistency.
This reduces the compiled size of gen7_wm_surface_state.o by 2.86% in a
release build.
v2: Fix accidental use of BRW_SURFACE_WIDTH/HEIGHT in brw_state_dump.c;
switch back to gen7_set_surface_mcs_info setting surf[6] directly
(both per Eric's review comments).
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
smoki [Thu, 3 Jan 2013 17:57:40 +0000 (18:57 +0100)]
radeon/r200: Fix tcl culling
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=57842
Jonas Ådahl [Tue, 25 Dec 2012 12:01:08 +0000 (13:01 +0100)]
wayland: Don't cancel a roundtrip when any event is received
Since wl_display_dispatch_queue() returns the number of processed events
or -1 on error, only cancel the roundtrip if an -1 is returned.
This also fixes a potential memory corruption bug happening when the
roundtrip does an early return and the callback later writes to the then
out of scope stack allocated `done' parameter.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Vinson Lee [Wed, 2 Jan 2013 01:02:38 +0000 (17:02 -0800)]
i965: Add break statement at end of BRW_OPCODE_CONTINUE case.
Fixes missing break in switch defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chad Versace [Thu, 20 Dec 2012 22:16:50 +0000 (14:16 -0800)]
egl/android: Fix build for Jelly Bean (v2)
In Jelly Bean, the interface to ANativeWindow changed. The change included
adding a new parameter the queueBuffer and dequeueBuffer methods,
removing the lockBuffer method, and requiring libsync.
v2:
- s/fence_fd == -1/fence_fd != -1/
- Fix leak. Close the fence_fd.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Chad Versace [Thu, 20 Dec 2012 22:14:51 +0000 (14:14 -0800)]
android: Define Make variables for Android version
Define the following Make variables:
MESA_ANDROID_MAJOR_VERSION
MESA_ANDROID_MINOR_VERSION
MESA_ANDROID_VERSION
These variable will allow us to make version-dependent decisions on
library dependencies. In particular, building Mesa against JellyBean will
require libsync.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Matt Turner [Mon, 31 Dec 2012 21:41:57 +0000 (13:41 -0800)]
mesa: Add missing ASSERT_OUTSIDE_BEGIN_END to GetSamplerParameter*
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Mon, 31 Dec 2012 21:10:32 +0000 (13:10 -0800)]
mesa: Add missing ASSERT_OUTSIDE_BEGIN_END to SamplerParameter*
Commit
f22d49de added the SamplerParamter* functions but only used
ASSERT_OUTSIDE_BEGIN_END inside the -f and -fv versions.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Mon, 31 Dec 2012 20:58:08 +0000 (12:58 -0800)]
mesa: Mark _mesa_{init,delete}_sampler_object as static
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Adam Jackson [Wed, 2 Jan 2013 19:09:22 +0000 (14:09 -0500)]
glcpp: Typo fix.
Note: this is a candidate for the 9.0 stable branch.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Adam Jackson [Wed, 2 Jan 2013 19:04:18 +0000 (14:04 -0500)]
r300g: Fix visibility CFLAGS in automake
Note: this is a candidate for the 9.0 stable branch.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Adam Jackson [Wed, 2 Jan 2013 19:02:59 +0000 (14:02 -0500)]
galahad, noop: Fix visibility CFLAGS in automake
Note: this is a candidate for the 9.0 stable branch.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Adam Jackson [Wed, 2 Jan 2013 19:02:00 +0000 (14:02 -0500)]
glcpp: Fix visibility CFLAGS in automake
Note: this is a candidate for the 9.0 stable branch.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Paul Berry [Fri, 28 Dec 2012 19:26:06 +0000 (11:26 -0800)]
mesa: Implement compressed 2D array textures.
This patch adds functionality to Mesa to upload compressed
2-dimensional array textures, using the glCompressedTexImage3D and
glCompressedTexSubImage3D calls.
Fixes piglit tests "EXT_texture_array/compressed *" and "!OpenGL ES
3.0/ext_texture_array-compressed_gles3 *". Also partially fixes GLES3
conformance test "CoverageES30.test".
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Paul Berry [Mon, 31 Dec 2012 17:00:41 +0000 (09:00 -0800)]
mesa: Fix error reporting in _mesa_invalidate_pbo_{compressed_,}teximage.
The old error reporting was completely bogus, passing _mesa_error() a
format string that didn't even match the remaining arguments. Also,
in many cases the number of dimensions in the TexImage call was not
preserved in the error message (e.g. an error in glTexImage2D was
reported simply as an error in glTexImage).
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Brian Paul [Wed, 2 Jan 2013 16:00:36 +0000 (09:00 -0700)]
mesa: fix signed/unsignd mix-up in fetch_signed_l_latc1()
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58844
Brian Paul [Tue, 1 Jan 2013 15:47:04 +0000 (08:47 -0700)]
glsl: add cast to silence signed/unsigned comparision warning
Brian Paul [Wed, 26 Dec 2012 23:26:58 +0000 (16:26 -0700)]
xlib: handle _mesa_initialize_visual()'s return value
If the call fails, we should return NULL from XMesaCreateVisual().
This was found when Waffle tried to create a visual with depth/stencil
bits = -1. That's an illegal value for glXChooseFBConfig() and we should
return NULL in that situation.
Note: This is a candidate for the stable branches.
Kenneth Graunke [Wed, 26 Dec 2012 04:55:38 +0000 (20:55 -0800)]
i965: Fail to blit rather than assert on invalid pitch requirements.
Dungeon Defenders hits TexImage()'s try_pbo_upload() path where
image->Width == 2, which doesn't meet intelEmitCopyBlit's requirement
that the pitch needs to be a multiple of 4.
Since intelEmitCopyBlit can already fail for a myriad of other reasons,
and it's not clear that other callers are immune to this failure mode,
simply make it return false rather than assert.
Fixes Dungeon Defenders on i965/Ivybridge. Now playable (aside from
having to work around the EXT_bindable_uniform issue).
NOTE: This is probably a candidate for the 9.0 branch.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Eric Anholt [Thu, 20 Dec 2012 22:09:32 +0000 (14:09 -0800)]
intel: Skip texture validation logic when nothing has changed.
Improves GLBenchmark 2.1 offscreen performance by 3.2% +/- 1.5% (n=52).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Thu, 20 Dec 2012 21:52:30 +0000 (13:52 -0800)]
intel: Turn a test in miptree_match_image into an assert.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 22:33:52 +0000 (14:33 -0800)]
i965: Stop making a copy of non-builtin uniforms in ParameterValues[].
We don't need them now that our set of parameter pointers points at the
GL core storage for them. This should save memory/bandwidth/overhead in
uniform updates.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 22:30:55 +0000 (14:30 -0800)]
i965: Consistently use nr_pull_params instead of NumParameters.
NumParameters used to be an upper bound on the number of vec4s to be
uploaded, which was basically safe (unless your buffer was bound near
the top of address space *and* you array indexed outside the buffer, in
which case I think you might GPU hang). As I migrate the driver away
from ParameterValues[], this is no longer true.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 03:18:45 +0000 (19:18 -0800)]
i965/vs: Reference the core GL uniform storage for non-builtin uniforms.
Like in the FS, there's no reason to use an external copy if the
ParameterValues[] relayout of it isn't the layout we need.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 01:43:31 +0000 (17:43 -0800)]
i965/fs: Reference the core GL uniform storage for non-builtin uniforms.
There's no reason to use an external copy if the relayout in the
external copy isn't serving us.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 02:53:34 +0000 (18:53 -0800)]
glsl: Add a note about a surprising feature of gl_uniform_storage->type.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 00:26:22 +0000 (16:26 -0800)]
i965/fs: Remove the param_index/param_offset indirection.
Now that ParameterValues doesn't change across the visitor, we don't
need to go through this.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 21:11:32 +0000 (13:11 -0800)]
i965: Add asserts to check that we don't realloc ParameterValues.
Things are even more restrictive than they used to be, so I've made
mistakes in this area.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 21:23:36 +0000 (13:23 -0800)]
i965: Add texrect scale parameters before pointers to ParameterValues.
If adding scale parameters during program compile caused a realloc of
ParameterValues, then the driver uniform storage set up by
_mesa_associate_uniform_storage() would point to potentially freed
memory.
Note that this uses TexturesUsed, which may change at runtime for GLSL
when sampler uniforms change. This is a flaw in our handling of texrect
in general, and not one I'm fixing currently.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 21 Nov 2012 21:57:58 +0000 (13:57 -0800)]
i965: Fix a typo in a comment.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 20 Nov 2012 22:28:48 +0000 (14:28 -0800)]
i965: Add a note about a bug from the no-recompile-on-sampler-updates change.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Brian Paul [Fri, 21 Dec 2012 20:41:23 +0000 (13:41 -0700)]
mesa: add missing texel fetch code for sRGB DXT formats
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=58548
Eric Anholt [Thu, 20 Dec 2012 23:45:11 +0000 (15:45 -0800)]
i965: Fix border color handling for deprecated SNORM formats.
We don't have native hardware support for these, so they get promoted to
RGBA, in which case we don't have hardware dealing with the channel
swizzling for us.
Fixes piglit EXT_texture_snorm/texwrap formats bordercolor (-swizzled).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 19 Dec 2012 00:05:24 +0000 (16:05 -0800)]
i965: Start using HIZ for Z16 textures.
I had left this out for a long time because it regressed some
depthstencil-render-miplevels cases when it was enabled. Now that the
bugs causing those are fixed, there's nothing stopping us.
Improves glbenchmark 2.1 offscreen performance by 7.3% +/- 2.8% (n=10).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Thu, 20 Dec 2012 19:36:38 +0000 (11:36 -0800)]
intel: Use the parent miptree's format for setting up HiZ miptrees.
This worked out before because the parent was always 4 bytes so it
didn't affect the layout, but now we want to support Z16 too.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 18 Dec 2012 22:12:50 +0000 (14:12 -0800)]
intel: Remove a couple of dead function prototypes.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Tue, 18 Dec 2012 21:45:14 +0000 (13:45 -0800)]
i965: Add perf debug for depth/stencil alignment workaround.
Fixing these rendering bugs has been implicated in performance
regressions (which may be unfixable), but at least knowing that it's
happening should help diagnose those regressions.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Tue, 18 Dec 2012 19:55:16 +0000 (11:55 -0800)]
i965: Assert that relayout laid out something that won't need it again.
The ETC1 changes failed at this, so let's make sure it will be caught in
testing next time.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Tue, 18 Dec 2012 21:10:29 +0000 (13:10 -0800)]
i965: Also fix validation of Z32F_S8 textures.
This was caught by the assertion in the next commit. It fixes the
remaining piglit depthstencil-render-miplevels cases, probably by
avoiding broken stencil copies in the validation path.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Tue, 18 Dec 2012 20:03:49 +0000 (12:03 -0800)]
i965: Fix validation of ETC miptrees.
When comparing to the teximage's format, we have to look at the
format-the-mt-was-created-for not the format-actually-stored-in-the-mt.
Improves glbenchmark 2.1 offscreen test performance 159% +/- 17% (n=3).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54582
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Eric Anholt [Tue, 18 Dec 2012 19:47:25 +0000 (11:47 -0800)]
qi965: Add perf debug for texture relayout.
Relayout is expensive, so it's something developers (both us and others)
should know about when it happens.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Tue, 18 Dec 2012 22:25:42 +0000 (14:25 -0800)]
i965: Fix hiz resolves getting stomped by depth offset validation.
Fixes all the remaining non-Z32F_S8 depthstencil-render-miplevels tests
in piglit.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Marek Olšák [Sat, 22 Dec 2012 18:05:37 +0000 (19:05 +0100)]
r600g: rename GPU_FLUSH -> INVAL_READ_CACHES
because that's what it does.
Marek Olšák [Sat, 22 Dec 2012 01:54:52 +0000 (02:54 +0100)]
r600g: remove redundant parameter alloc_bo from r600_texture_create_object
alloc_bo == !buf
Matt Turner [Thu, 20 Dec 2012 04:20:34 +0000 (20:20 -0800)]
Make IsVertexArray() return false before BindVertexArray()
Rename existing _Used flag to EverBound.
The GL 4.3 and ES 3.0 specs say
These names are marked as used, for the purposes of GenVertexArrays
only, but they do not acquire array state until they are first bound.
This also affects Apple VAOs, which is fine since the
APPLE_vertex_array_object spec says
A vertex array object is created by binding an unused name. This
binding is accomplished by calling BindVertexArrayAPPLE with id set
to the name of the new vertex array object.
Fixes arb_vertex_array_object_isvertexarray.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Wed, 19 Dec 2012 21:43:31 +0000 (13:43 -0800)]
Make IsTransformFeedback() return false before BindTransformFeedback()
The GL 4.3 an ES 3.0 specs say
A transform feedback object is created by binding a name returned by
GenTransformFeedbacks with the command
void BindTransformFeedback( enum target, uint id );
Fixes arb_transform_feedback2-istransformfeedback and part of
es3conform's CoverageES30.test.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dave Airlie [Sat, 22 Dec 2012 03:12:30 +0000 (13:12 +1000)]
nouveau: deal with tbo cap for now.
This fixes the printk running apps against master.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Marek Olšák [Fri, 21 Dec 2012 19:34:52 +0000 (20:34 +0100)]
r600g: always use a tiled resource as the destination of MSAA resolve
i.e. we have to allocate a temporary tiled resource if dst isn't tiled.
This fixes hardlocks on r6xx-r7xx, though using a linear resource is forbidden
on later asics as well.
NOTE: This is a candidate for the stable branches.
Marek Olšák [Fri, 21 Dec 2012 18:15:20 +0000 (19:15 +0100)]
winsys/radeon: the env var RADEON_NOOP can be used to skip CS ioctls
Marek Olšák [Fri, 21 Dec 2012 18:15:02 +0000 (19:15 +0100)]
r600g: remove a false comment
Marek Olšák [Fri, 21 Dec 2012 15:29:19 +0000 (16:29 +0100)]
r600g: don't suspend TIME_ELAPSED queries during flushing
According to the GL spec, the result should be equivalent to comparing
two timestamps.
Marek Olšák [Fri, 21 Dec 2012 15:56:41 +0000 (16:56 +0100)]
gallium/tests: fix build breakage after pipe_surface::usage removal
Frank Henigman [Fri, 14 Dec 2012 20:52:17 +0000 (15:52 -0500)]
mesa: add bounds checking for uniform array access
No piglit regressions and now passes glsl-uniform-out-of-bounds-2.
validate_uniform_parameters now checks that the array index is
valid. This means if an index is out of bounds, glGetUniform* now
fails with GL_INVALID_OPERATION, as it should.
_mesa_uniform and _mesa_uniform_matrix also call
validate_uniform_parameters so the bounds checks there became
redundant and were removed.
The test in glGetUniformLocation is modified to check array bounds
so it now returns GL_INVALID_INDEX (-1) if you ask for the location
of a non-existent array element, as it should.
Signed-off-by: Frank Henigman <fjhenigman@google.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
José Fonseca [Thu, 20 Dec 2012 12:03:45 +0000 (12:03 +0000)]
util/u_format: Round when converting depth values from float to z16_unorm.
This makes the z16_unorm -> float -> z16_unorm conversion lossless.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Jerome Glisse [Wed, 19 Dec 2012 17:23:50 +0000 (12:23 -0500)]
r600g: add cs tracing infrastructure for lockup pin pointing
It's a build time option you need to set R600_TRACE_CS to 1 and it
will print to stderr all cs along as cs trace point value which
gave last offset into a cs process by the GPU.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>