Christoph Bumiller [Mon, 7 Jan 2013 14:46:31 +0000 (15:46 +0100)]
nvc0: catch too high GENERIC indices to prevent GRAPH traps
Christoph Bumiller [Mon, 7 Jan 2013 21:12:28 +0000 (22:12 +0100)]
nvc0: use correct resource target to select blit shader
Christoph Bumiller [Mon, 7 Jan 2013 19:18:06 +0000 (20:18 +0100)]
nvc0: add missing call to map edge flag in push_vbo
Note: this is a candidate for the 9.0 stable branch.
Christoph Bumiller [Mon, 7 Jan 2013 14:50:19 +0000 (15:50 +0100)]
nv50/ir: wrap assertion using typeid in #ifndef NDEBUG
Note: this is a candidate for the 9.0 stable branch.
Christoph Bumiller [Tue, 8 Jan 2013 12:46:24 +0000 (13:46 +0100)]
nvc0: fix out of bounds writes for unaligned sizes in push_data
Christoph Bumiller [Tue, 8 Jan 2013 11:35:25 +0000 (12:35 +0100)]
nouveau: increase max order of suballocated buffers by 1
This is really a hack to make TF2 (considerably, up to 20 -> 70 fps
at low res) faster.
Christoph Bumiller [Tue, 8 Jan 2013 15:13:11 +0000 (16:13 +0100)]
nouveau: improve buffer transfers
Save double memcpy on uploads to VRAM in most cases.
Properly handle FLUSH_EXPLICIT.
Reallocate on DISCARD_WHOLE_RESOURCE to avoid sync.
Marek Olšák [Tue, 8 Jan 2013 13:32:41 +0000 (14:32 +0100)]
r300g: fix assertion failure in emit_dsa_state
Broken by
8ed6b1400bc8a78f46340f41aaf2e88b24c23267.
Kenneth Graunke [Fri, 4 Jan 2013 15:53:12 +0000 (07:53 -0800)]
i965: Support GL_FIXED and packed vertex formats natively on Haswell+.
Haswell and later support the GL_FIXED and 2_10_10_10_rev vertex formats
natively, and don't need shader workarounds.
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Fri, 4 Jan 2013 15:53:11 +0000 (07:53 -0800)]
i965: Add #defines for GL_FIXED vertex formats.
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Fri, 4 Jan 2013 15:53:10 +0000 (07:53 -0800)]
i965: Add remaining #defines for packed vertex formats.
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Fri, 4 Jan 2013 15:53:09 +0000 (07:53 -0800)]
i965: Use Haswell's sample_d_c for textureGrad with shadow samplers.
The new hardware actually just supports this now.
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 7 Jan 2013 07:35:22 +0000 (23:35 -0800)]
i965/fs: Remove dead code from generate_uniform_pull_constant_load_gen7.
generate_uniform_pull_constant_load_gen7() is only called on Gen7+, so
the gen < 6 code is dead.
Reviewed-by: Eric Anholt <eric@anholt.net>
Alexander von Gluck IV [Sun, 6 Jan 2013 22:09:35 +0000 (16:09 -0600)]
mesa: Drop mmx optimizations on Haiku
* Prevents compatibility problems. As Haiku
doesn't use rtasm anymore, it's kind of
pointless.
Alexander von Gluck IV [Sun, 6 Jan 2013 22:06:37 +0000 (16:06 -0600)]
mesa: Don't use rtasm for Haiku swrast
* We have a symbol conflict as rtasm in
Mesa collides with rtasm in gallium.
* As us linking gallium and mesa together
is an edge case, lets just omit the rtasm
code from Mesa as we should be going
llvmpipe soon :)
Alex Deucher [Mon, 7 Jan 2013 20:21:46 +0000 (15:21 -0500)]
r600g: set the virtual address for the htile buffer
Fixes cayman and TN with htile enabled. Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=59089
https://bugs.freedesktop.org/show_bug.cgi?id=58667
Possibly others.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jerome Glisse [Fri, 4 Jan 2013 21:34:52 +0000 (16:34 -0500)]
radeon/winsys: move radeon family/class identification to winsys
Upcoming async dma support rely on winsys knowing about GPU families.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Jerome Glisse [Fri, 4 Jan 2013 16:46:13 +0000 (11:46 -0500)]
r600g/radeon/winsys: indentation cleanup
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Marek Olšák [Sun, 6 Jan 2013 19:28:03 +0000 (20:28 +0100)]
r600g: flush FMASK and CMASK at the end of CS
Marek Olšák [Sat, 5 Jan 2013 05:21:49 +0000 (06:21 +0100)]
r300g: implement MSAA
This is not as optimized as r600g - the MSAA compression is missing,
so r300g needs a lot of bandwidth (more than r600g to do the same thing).
However, if the bandwidth is not an issue for you, you can enjoy this
unoptimized MSAA support.
The only other missing optimization for MSAA is the fast color clear.
MSAA is enabled on r500 only, because that's the only GPU family I tested.
That said, MSAA should work on r300 and r400 as well (but you must set
RADEON_MSAA=1 to allow it, then turn MSAA on in your app or set GALLIUM_MSAA=n,
n >= 2, n <= 6)
I will enable the support by default on r300-r400 once someone (other than me)
tests those chipsets with piglit.
The supported modes are 2x, 4x, 6x.
The supported MSAA formats are RGBA8, BGRA8, and RGBA16F (r500 only).
Those 3 formats are used for all GL internal formats.
Tested with piglit. (I have ported all MSAA tests to GL2.1)
Marek Olšák [Sun, 6 Jan 2013 00:47:24 +0000 (01:47 +0100)]
r300g: simplify DSA state, add ability to patch FG_ALPHA_FUNC while emitting
Preparation for MSAA and alpha-to-coverage.
Marek Olšák [Sat, 5 Jan 2013 23:31:55 +0000 (00:31 +0100)]
r300g/compiler: add shader emulation for the alpha_to_one state
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>