summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-11r600g: fix two issues in compressed msaa reading codegallium-texture-multisampleDave Airlie1-2/+2
I've no idea when sample_chan would ever be 4 here, but 4 is most definitely wrong, array textures have it as 3 as well. Also the cayman code though unused is obviously wrong. Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-11r600g: add get_sample_position support (v3)Dave Airlie2-122/+240
v2: I rewrote this to use the sample positions properly. v3: rewrite properly to use bitfield to cast back to signed ints Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-11st/mesa: add support for ARB_texture_multisample (v3)Dave Airlie12-20/+96
This adds support to the mesa state tracker for ARB_texture_multisample. hardware doesn't seem to use a different texture instructions, so I don't think we need to create one for TGSI at this time. Thanks to Marek for fixes to sample number picking. v2: idr pointed out a bug in how we picked the max sample counts, use new internal format chooser interface to pick proper answers. v3: use st_choose_format directly, it was okay, fix anding of masks. Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-11st/mesa: add support for get sample positionDave Airlie4-0/+96
This just calls into the gallium interface. Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-11gallium: add get_sample_position interfaceDave Airlie1-0/+13
This is to be used to implement glGet GL_SAMPLE_POSITION. Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-10egl/x11: Fix initialisation of swap_intervalRalf Jung1-2/+2
The EGLConfig attributes EGL_MIN/MAX_SWAP_INTERVAL were incorrectly set to 0 and 0. This prevented clients from setting the swap interval to a reasonable value, like 1 or 2. Swap interval worked correctly in Mesa 9.0. The commit below introduced the bug. commit 7e9bd2b2ed35a440a96362417100a7e43715d606 Author: Eric Anholt <eric@anholt.net> Date: Tue Sep 25 14:05:30 2012 -0700 egl: Add support for driconf control of swapinterval. Note: This is a candidate for the 9.1 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63078 [chadv: Wrote commit message] Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-10intel: Fall back to X-tiling when larger than estimated aperture size.Kenneth Graunke1-2/+26
If a region is larger than the estimated aperture size, we map/unmap it by copying with the BLT engine. Which means we can't use Y-tiling. Fixes Piglit max-texture-size and tex3d-maxsize, which regressed in my recent change to use Y-tiling by default on Gen6+. This was due to a botched merge conflict resolution. v2: Return a mask of valid tilings from intel_miptree_select_tiling. This allows us to avoid the X-tiling fallback if Y-tiling is actually mandatory. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-10intel: Refactor code in intel_miptree_choose_tiling().Kenneth Graunke1-4/+6
This reduces the nesting level slightly, and in my opinion, makes it a bit easier to follow. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-10intel: Move the max_gtt_map_object_size estimation to intel_context.Kenneth Graunke3-18/+20
We need know this in order to decide what tiling mode to use. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-11r600g: Add support for GL_ARB_texture_buffer_rangeFredrik Höglund3-5/+11
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-04-10i965/blorp: Remove unnecessary test in gen7_blorp_emit_depth_stencil_config.Paul Berry1-7/+5
gen7_blorp_emit_depth_stencil_config() is only called when params->depth.mt is non-null. Therefore, it's not necessary to do an "if (params->depth.mt)" test inside it. The presence of this if test was misleading static analysis tools (and briefly, me) into thinking that gen7_blorp_emit_depth_stencil_config() might sometimes access uninitialized data and dereference a null pointer. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-04-10r600g: fix valgrind warning on CaymanMarek Olšák1-1/+1
Warning: "Conditional jump or move depends on uninitialised value(s)".
2013-04-10gallivm/tgsi: handle untyped movesZack Rusin2-0/+10
both mov and ucmp can be used to move variables of any type. correctly note that about ucmp in the tgsi_info and make sure gallivm can handle that by correctly casting the untyped moves. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-10gallivm: fix loops and conditionals within GSZack Rusin2-19/+105
We were using simple temporaries, without using alloca or phi nodes which meant that on every iteration of the loop our temporaries, which were holding the number of vertices and primitives which were emitted, were being reset to zero. Now we're using alloca to allocate those variables to preserve them across conditionals. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-10llvmpipe: implement PIPE_QUERY_SO_STATISTICSZack Rusin2-0/+21
We were missing the implementation of PIPE_QUERY_SO_STATISTICS query, this change implements it on top of the existing facilities. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-10gallivm: fix unsigned divide and remainder opcodesZack Rusin1-4/+33
We want to both make sure we never divide by zero to not generate sigfpe and that divide by zero is guaranteed to return 0xffffffff. Based on José idea. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-10gallivm: fix breakcZack Rusin1-12/+14
we break when the mask values are 0 not, 1, plus it's bit comparison not a floating point comparison. This fixes both. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-10intel/hsw: Enable hiz (v2)Chad Versace2-2/+51
Enable hiz by setting intel_context::has_hiz. However, to work around a hardware bug, we selectively enable hiz for only nicely aligned miptree slices. No Piglit regressions on Haswell 0x0d26 rev07 when based atop mesa-master-4ad3601. Improves the performance of GLB27_TRex_C24Z16_FixedTimeStep by 18.52% (hsw-0x0d26-rev07; kernel-3.9.0-rc1; GLBenchmark 2.7.0 Release a68901; samples=3). v2: Replace the check for IS_HASWELL(devid) in intel_miptree_slice_has_hiz() with a conditional set of has_hiz. [for anholt] Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10i965: Remove brw_context::depthstencil::hiz_mtChad Versace2-3/+0
After recent refactorings, the field is written but no longer read. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10intel: Replace checks for hiz_mt with intel_has*hiz()Chad Versace8-40/+36
When appropriate, replace each check `hiz_mt != NULL` with either a call to intel_miptree_slice_has_hiz() or intel_renderbuffer_has_hiz(). No behavioral change. This prepares for selectively enabling hiz on individual miptree slices for Haswell. This refactoring had several side effects. 1. To prevent new warnings about discarding the const qualifier, I removed 'const' from some variable declarations in intel_validate_framebuffer(). The alternative was to add const qualifiers to multiple function signatures in the intel_renderbuffer_has_hiz call graph. Since the dominant convention in the Intel code is to not qualify function parameters as const, I chose to remove rather than add const qualifiers. 2. I changed the signature of brw_emit_depth_stencil_hiz() by replacing `struct intel_mipmap_tree *hiz_mt` with `bool hiz`. The function used hiz_mt mostly as a boolean indicator of the presence of hiz, so the signature change is consistent with the patch's goal. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10i965: Change signature of brw_get_depthstencil_tile_masks()Chad Versace4-3/+16
Add new parameters `depth_level` and `depth_layer`, which specify depth miptree's slice of interest. A following patch will pass the new parameters through to intel_miptree_slice_has_hiz(). Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10i965/blorp: Add fields brw_blorp_mip_info::level,layerChad Versace2-0/+15
The new fields define the 2D miptree slice to be used. A following patch will pass the new fields through to intel_miptree_slice_has_hiz(). Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10intel: Add field intel_mipmap_slice::has_hizChad Versace4-2/+44
On Haswell, HiZ will selectively be enabled on individual miptree slices to workaround a hardware bug. The new field 'has_hiz' indicates if HiZ is enabled for a given slice. Also add two new accessor functions for this field. intel_miptree_slice_has_hiz intel_renderbuffer_has_hiz The new field and accessor functions are not yet used. Also, this patch introduces no behavioral change because, in this patch, intel_miptree_alloc_hiz() sets has_hiz for all slices. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10i965/blorp: Align rectangle primitive for hiz opsChad Versace1-0/+29
The hardware docs and the simulator require that the rectangle primitive emitted during fast depth clears and hiz resolves must be aligned to 8x4 pixels. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-04-10i965/vs: Use GRFs for pull constant offsets on gen7.Eric Anholt6-22/+56
This allows the computation of the offset to get written directly into the message source. shader-db results: total instructions in shared programs: 3308390 -> 3283025 (-0.77%) instructions in affected programs: 442998 -> 417633 (-5.73%) No difference in GLB2.7 low res (n=9). Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-04-10i965/vs: When asked to make a dst_reg for a src.xxxx, just write to src.x.Eric Anholt1-1/+8
We have several places in our pull constant handling where we make a temporary src_reg for an int, and then turn it into a dst. In doing so, we were writing to the dst.xyzw, so we never register coalesced it with a later mov from dst.x to real_dst.x. These extra channels written would be removed if we had channel-wise DCE in the backend, but we don't. Fix it for now by just not writing these extra channels that won't get used. Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-04-10i965/gen6: Reduce updates of transform feedback offsets with HW contexts.Eric Anholt1-1/+1
The software-tracked transform feedback offsets (svbi_0_starting_index) are incorrect in the presence of primitive restart, so we were actually updating it with a bogus value if the batch wrapped and we emitted the packet again during a single transform feedback. By reducing state emission, we avoid the bug. Fixes piglit OpenGL 3.1/primitive-restart-xfb flush Reviewed-by: Paul Berry <stereotype441@gmail.com> NOTE: This is a candidate for the 9.1 branch.
2013-04-10i965/gen7: Skip resetting SOL offsets at batch start with HW contexts.Eric Anholt2-6/+21
The software-tracked transform feedback offsets (svbi_0_starting_index) are incorrect in the presence of primitive restart, so we can't reliably compute offsets for our buffer pointers after a batch flush. Thanks to HW contexts, our transform feedback offsets are now saved, so we can just keep using the ones from before the batch wrap. Fixes piglit OpenGL 3.1/primitive-restart-xfb flush Reviewed-by: Paul Berry <stereotype441@gmail.com> NOTE: This is a candidate for the 9.1 branch.
2013-04-10radeonsi: remove sampler writemask v3Christian König2-13/+8
v2: fix instrinsic name as well v3: LLVM revision incremented as well Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-04-10pipe-loader: Fix out of source buildNiels Ole Salscheider1-2/+2
Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
2013-04-09st/mesa: remove #if FEATURE_GL/ES testsBrian Paul1-7/+0
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-09mesa: remove old comment about FEATURE_GLBrian Paul1-2/+1
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-09mesa: remove #ifdef FEATURE_ES2, add some comments insteadBrian Paul1-2/+9
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-09st/mesa: remove #include mfeatures.hBrian Paul24-24/+0
None of these were needed. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-09docs: initial 9.2 release notes fileBrian Paul2-0/+66
2013-04-09st/osmesa: re-use buffers in OSMesaMakeCurrent()Brian Paul1-7/+54
Rather than creating a new buffer each time. Fixes problems found with vtk. Tested-by: Kevin H. Hobbs <hobbsk@ohio.edu>
2013-04-10mesa: update derived framebuffer state in GetMultisamplefvMarek Olšák1-0/+5
This makes sure that ctx->DrawBuffer->Visual.samples is up-to-date. Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-10mesa: fix glGet queries depending on derived framebuffer state (v2)Marek Olšák2-7/+26
"ctx->DrawBuffer->Visual" might be invalid if (NewState &_NEW_BUFFERS) != 0. v2: also fix: - RGBA_INTEGER_MODE_EXT - RGBA_FLOAT_MODE_ARB (also check API support) - FRAMEBUFFER_SRGB_CAPABLE_EXT NOTE: This is a candidate for stable branches. Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-09i965/gen7.5: Allow HW primitive restart for all primitive types.Paul Berry1-7/+6
Gen7.5 (Haswell) hardware supports primitive restart for all primitive types. It also handles all possible primitive restart indices. Rather than specialize both can_cut_index_handle_restart_index() and the switch statement in can_cut_index_handle_prims() for Haswell, just return early if the hardware is Haswell because we know it can handle everything. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-09i965: Only use brw_draw.c's trim() function when necessary.Paul Berry1-2/+14
brw_draw.c contains a trim() function which modifies the vertex count for quads and quad strips in order to discard dangling vertices. In principle this shouldn't be necessary, since hardware since Gen4 is capable of discarding dangling vertices by itself. However, it's necessary because as a hack to speed up rendering on Gen 4-5, we sometimes convert quads to trifans and quad strips to tristrips. The trim() function isn't necessary on Gen6 and up. This patch documents why and when the trim() function is necessary, and avoids calling it when it's not needed. This will avoid creating problems when we enable hardware support for primitive restart of quads and quad strips on Haswell. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-04-09i965/vs: Fix DEBUG_SHADER_TIME when VS terminates with 2 URB writes.Paul Berry1-4/+2
The call to emit_shader_time_end() before the second URB write was conditioned with "if (eot)", but eot is always false in this code path, so emit_shader_time_end() was never being called for vertex shaders that performed 2 URB writes. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-04-09st/vdpau: fix subtitle related bug v2Christian König1-0/+4
Drawing subtitles didn't increased the dirty area of the surface. Reported and tested by freeedrich on irc. v2: don't clear the surface Signed-off-by: Christian König <christian.koenig@amd.com>
2013-04-09glsl/linker: Reduce scope of non-flat integer varying fix.Paul Berry1-4/+3
In the mailing list discussion of "glsl/linker: fix varying packing for non-flat integer varyings." (commit 7862bde), we concluded that since the bug only applies to integral variables, it is safer to just apply the bug fix to integer varyings. I forgot to make the change before pushing the patch upstream. (Note: we aren't aware of any bugs in commit 7862bde; it just seems wise to be on the safe side). This patch makes the change. Assuming commit 7862bde gets cherry-picked back to 9.1, this commit should be cherry-picked too. NOTE: This is a candidate for the 9.1 release branch.
2013-04-09glsl/linker: Adapt flat varying handling in preparation for geometry shaders.Paul Berry1-10/+20
When a varying is consumed by transform feedback, but is not used by the fragment shader, assign_varying_locations() sets its interpolation type to "flat" in order to ensure that lower_packed_varyings never has to deal with non-flat integral varyings (the GLSL spec doesn't require integral vertex outputs to be flat if they aren't consumed by the fragment shader). A similar situation will arise when geometry shader support is added, since the GLSL spec only requires integral vertex shader outputs to be flat when they are consumed by the fragment shader. This patch modifies the linker to handle this situation too. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-09glsl: Document lower_packed_varyings' "flat" requirement with an assert.Paul Berry1-0/+8
To minimize the variety of type conversions that lower_packed_varyings needs to perform, it assumes that integral varyings are always qualified as "flat". link_varyings.cpp takes care of ensuring that this is the case (even in the circumstances where GLSL doesn't require it). This patch documents the assumption with an assertion, for ease in future debugging. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-09glsl/linker: fix varying packing for non-flat integer varyings.Paul Berry1-0/+19
Commit dfb57e7 (glsl: Fix error checking on "flat" keyword to match GLSL ES 3.00, GLSL 1.50) relaxed the rules for integral varyings: they only need to be declared as "flat" if they are a fragment shader inputs. This allowed for the possibility of a vertex shader output being a non-flat integer, provided that it was not matched to a fragment shader input. A non-contrived situation where this might arise is if a vertex shader generates some integral outputs which are consumed by tranform feedback, but not by the fragment shader. Unfortunately, lower_packed_varyings assumes that *all* integral varyings are flat, regardless of whether they are consumed by the fragment shader. As a result, attempting to create a non-flat integral vertex output of a size that required packing (i.e. a size other than ivec4 or uvec4) would cause an assertion failure in lower_packed_varyings. This patch prevents the assertion failure by forcing vertex shader outputs to be "flat" whenever they are not consumed by the fragment shader. This should have no effect on rendering since the "flat" keyword only affects the behaviour of fragment shader inputs. Fixes piglit test "spec/EXT_transform_feedback/nonflat-integral". NOTE: This is a candidate for the 9.1 release branch. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-09glsl: Check the size of ir_print_visitor's mode[] array with STATIC_ASSERT.Paul Berry2-1/+3
ir_print_visitor::visit(ir_variable *)'s mode[] array needs to match the declaration of the enum ir_variable_mode. It's hard to verify that at compile time, but at least we can use a STATIC_ASSERT to make sure it's the right size. This required adding ir_var_mode_count to the enum.
2013-04-09glsl: Fix ir_print_visitor's handling of interpolation qualifiers.Paul Berry2-2/+5
This patch updates the interp[] array to match the enum glsl_interp_qualifier. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> v2: Add a STATIC_ASSERT to make sure the array is the correct size. This required adding INTERP_QUALIFIER_COUNT to the enum.
2013-04-09autotools: Better describe which cases OProfileJIT is required.Johannes Obermayr1-2/+6
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2013-04-09softpipe: misc updates to image dumping in softpipe_flush()Brian Paul1-3/+4