- Jan 12, 2015
-
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com>
-
- Jan 07, 2015
-
-
Cc: 10.2 10.3 10.4 <mesa-stable@lists.freedesktop.org> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit eaae92a3)
-
From GL 4.4 Core profile: If both PRIMITIVE_RESTART and PRIMITIVE_RESTART_FIXED_INDEX are enabled, the index value determined by PRIMITIVE_RESTART_FIXED_INDEX is used. If PRIMITIVE_RESTART_FIXED_INDEX is enabled, primitive restart is not performed for array elements transferred by any drawing command not taking a type parameter, including all of the *Draw* commands other than *DrawEle- ments*. Cc: 10.2 10.3 10.4 <mesa-stable@lists.freedesktop.org> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 8f5d3095)
-
- Jan 06, 2015
-
-
assert's get compiled out in release builds, so they can't be relied upon to perform logic. Reported-by:
Pierre Moreau <pierre.morrow@free.fr> Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Tested-by:
Roy Spliet <rspliet@eclipso.eu> Cc: "10.2 10.3 10.4" <mesa-stable@lists.freedesktop.org> (cherry picked from commit fb1afd1e)
-
- Jan 04, 2015
-
-
This patch reduces the likelihood of pointer arithmetic overflow bugs in gather_oa_results(), like the one fixed by b69c7c5d. I haven't yet encountered any overflow bugs in the wild along this patch's codepath. But I get nervous when I see code patterns like this: (void*) + (int) * (int) I smell 32-bit overflow all over this code. This patch retypes 'snapshot_size' to 'ptrdiff_t', which should fix any potential overflow. Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> Signed-off-by:
Chad Versace <chad.versace@linux.intel.com> (cherry picked from commit 414be86c)
-
This patch reduces the likelihood of pointer arithmetic overflow bugs in intel_texsubimage_tiled_memcpy() , like the one fixed by b69c7c5d. I haven't yet encountered any overflow bugs in the wild along this patch's codepath. But I recently solved, in commit b69c7c5d, an overflow bug in a line of code that looks very similar to pointer arithmetic in this function. This patch conceptually applies the same fix as in b69c7c5d. Instead of retyping the variables, though, this patch adds some casts. (I tried to retype the variables as ptrdiff_t, but it quickly got very messy. The casts are cleaner). Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> Signed-off-by:
Chad Versace <chad.versace@linux.intel.com> (cherry picked from commit 225a0979)
-
This fixes the new piglit test: arb_uniform_buffer_object/2-buffers-bug Cc: 10.2 10.3 10.4 <mesa-stable@lists.freedesktop.org> Reviewed-by:
Brian Paul <brianp@vmware.com> (cherry picked from commit 48094d0e)
-
This is a partial revert of c8930698. It split the {start,base}_vertex_location handling into several steps: 1. Set brw->draw.start_vertex_location = prim[i].start and brw->draw.base_vertex_location = prim[i].basevertex. (This happened once per _mesa_prim, in the main drawing loop.) 2. Add brw->vb.start_vertex_bias and brw->ib.start_vertex_offset appropriately. (This happened in brw_prepare_shader_draw_parameters, which was called just after brw_prepare_vertices, as part of state upload, and only happened when BRW_NEW_VERTICES was flagged.) 3. Use those values when emitting 3DPRIMITIVE (once per _mesa_prim). If we drew multiple _mesa_prims, but didn't flag BRW_NEW_VERTICES on the second (or later) primitives, we would do step #1, but not #2. The first _mesa_prim would get correct values, but subsequent ones would only get the first half of the summation. The reason I originally did this was because I needed the value of gl_BaseVertexARB to exist in a buffer object prior to uploading 3DSTATE_VERTEX_BUFFERS. I believed I wanted to upload the value of 3DPRIMITIVE's "Base Vertex Location" field, which was computed as: (prims[i].indexed ? prims[i].start : prims[i].basevertex) + brw->vb.start_vertex_bias. The latter value wasn't available until after brw_prepare_vertices, and the former weren't available in the state upload code at all. Hence the awkward split. However, I believe that including brw->vb.start_vertex_bias was a mistake. It's an extra bias we apply when uploading vertex data into VBOs, to move [min_index, max_index] to [0, max_index - min_index]. >From the GL_ARB_shader_draw_parameters specification: "<gl_BaseVertexARB> holds the integer value passed to the <baseVertex> parameter to the command that resulted in the current shader invocation. In the case where the command has no <baseVertex> parameter, the value of <gl_BaseVertexARB> is zero." I conclude that gl_BaseVertexARB should only include the baseVertex parameter from glDraw*Elements*, not any internal biases we add for optimization purposes. With that in mind, gl_BaseVertexARB only needs prim[i].start or prim[i].basevertex. We can simply store that, and go back to computing start_vertex_location and base_vertex_location in brw_emit_prim(), like we used to. This is much simpler, and should actually fix two bugs. Fixes missing geometry in Unvanquished. Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85529 Signed-off-by:
Kenneth Graunke <kenneth@whitecape.org> Acked-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Chris Forbes <chrisf@ijw.co.nz> (cherry picked from commit c633528c)
-
Fixes the piglits which check that gl_VertexID includes the base vertex offset: arb_draw_indirect-vertexid elements gl-3.2-basevertex-vertexid Note that this leaves out the original G80, for which this will continue to fail. It could be fixed by passing a driver constbuf value in, but that's beyond the scope of this change. Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> (cherry picked from commit be0311c9)
-
E.g. this could happen on older kernels which don't support the RADEON_INFO_SI_BACKEND_ENABLED_MASK query yet. The code in si_write_harvested_raster_configs() doesn't deal with this correctly and would probably mangle the value badly. Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> (cherry picked from commit b3057f80)
-
This was probably missed when moving from a fixed binding table layout to a dynamic one that changes based on the shader. Fixes newly proposed Piglit test fbo-mrt-new-bind. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87619 Signed-off-by:
Kenneth Graunke <kenneth@whitecape.org> Reviewed-by:
Chris Forbes <chrisf@ijw.co.nz> Reviewed-by:
Mike Stroyan <mike@LunarG.com> Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 4616b2ef)
-
- Dec 30, 2014
-
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
This reverts commit d332e504. May not be the correct fix. Discussion is ongoing. http://lists.freedesktop.org/archives/mesa-dev/2014-December/072969.html
-
- Dec 21, 2014
-
-
Previously only geometry shader outputs would be assigned locations if the geometry shader was the only stage in the linked program. Signed-off-by:
Ian Romanick <ian.d.romanick@intel.com> Cc: pavol@klacansky.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585 Reviewed-by:
Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit a909b995) Nominated-by:
Ian Romanick <ian.d.romanick@intel.com>
-
producer_var could be NULL if consumer_var is not NULL and consumer_is_fs is false. This will occur when the producer is NULL and the consumer is the geometry shader for a program that contains only a geometry shader. This will occur starting with the next patch. Signed-off-by:
Ian Romanick <ian.d.romanick@intel.com> Cc: pavol@klacansky.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585 Reviewed-by:
Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit 5eca78a0) Nominated-by:
Ian Romanick <ian.d.romanick@intel.com>
-
It seems to have been forgotten during viewports array implementation time. Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit 19e05d68)
-
We were assuming, when constructing a new brw_reg struct, that the negate and abs register modifiers would not be present by default in the new register. Now, we force explicitly setting these values when constructing a new register. This will avoid problems like forgetting to properly set them when we are using a previous register to generate this new register, as it was happening in the dFdx and dFdy generation functions. Fixes piglit test shaders/glsl-deriv-varyings Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82991 Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit 8517e665)
-
- Dec 14, 2014
-
-
glXSwapBuffersMscOML() with target_msc=divisor=remainder=0 gets translated into target_msc=divisor=0 but remainder=1 by the mesa api. This is done for server DRI2 where there needs to be a way to tell the server-side DRI2ScheduleSwap implementation if a call to glXSwapBuffers() or glXSwapBuffersMscOML(dpy,window,0,0,0) was done. remainder = 1 was (ab)used as a flag to tell the server to select proper semantic. The DRI3/Present backend ignored this signalling, treated any target_msc=0 as glXSwapBuffers() request, and called xcb_present_pixmap with invalid divisor=0, remainder=1 combo. The present extension responded kindly to this with a BadValue error and dropped the request, but mesa's DRI3/Present backend doesn't check for error codes. From there on stuff went downhill quickly for the calling OpenGL client... This patch fixes the problem. v2: Change comments to be more clear, with reference to relevant spec, as suggested by Eric Anholt. Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Signed-off-by:
Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by:
Axel Davy <axel.davy@ens.fr> Reviewed-by:
Eric Anholt <eric@anholt.net> (cherry picked from commit 0d7f4c86)
-
Restores proper immediate tearing swap behaviour for OpenGL bufferswap under DRI3/Present. Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> v2: Add Frank Binns signed off by for his original earlier patch from April 2014, which is identical to this one, and Chris Wilsons reviewed tag from May 2014 for that patch, ergo also for this one. v3: Incorporate comment about triple buffering as suggested by Axel Davy, and reference to relevant spec provided by Eric Anholt. Signed-off-by:
Frank Binns <frank.binns@imgtec.com> Signed-off-by:
Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by:
Axel Davy <axel.davy@ens.fr> Reviewed-by:
Eric Anholt <eric@anholt.net> (cherry picked from commit 455d3036)
-
Prevent calls to glXGetSyncValuesOML() and glXWaitForMscOML() from overwriting the (ust,msc) values of the last successfull swapbuffers call (PresentPixmapCompleteNotify event), as glXWaitForSbcOML() relies on those values corresponding to the most recent completed swap, not to whatever was last returned from the server. Problematic call sequence without this patch would have been, e.g., glXSwapBuffers() ... wait ... swap completes -> PresentPixmapComplete event -> (ust,msc) updated to reflect swap completion time and count. ... wait for at least 1 video refresh cycle/vblank increment. glXGetSyncValuesOML() -> PresentNotifyMsc event overwrites (ust,msc) of swap completion with (ust,msc) of most recent vblank glXWaitForSbcOML() -> Returns sbc of last completed swap but (ust,msc) of last completed vblank, not of last completed swap. -> Client is confused. Do this by tracking a separate set of (ust, msc) for the dri3_wait_for_msc() call than for the dri3_wait_for_sbc() call. This makes the glXWaitForSbcOML() call robust again and restores consistent behaviour with the DRI2 implementation. Fixes applications originally written and tested against DRI2 which also rely on this not regressing under DRI3/Present, e.g., Neuro-Science software like Psychtoolbox-3. This patch fixes the problem. v2: Rename vblank_msc/ust to notify_msc/ust as suggested by Axel Davy for better clarity. Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Signed-off-by:
Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by:
Axel Davy <axel.davy@ens.fr> (cherry picked from commit ad8b0e8b) Conflicts: src/glx/dri3_glx.c
-
targetSBC == 0 is a special case, which asks the function to block until all pending OpenGL bufferswap requests have completed. Currently the function just falls through for targetSBC == 0, returning bogus results. This breaks applications originally written and tested against DRI2 which also rely on this not regressing under DRI3/Present, e.g., Neuro-Science software like Psychtoolbox-3. This patch fixes the problem. v2: Simplify as suggested by Axel Davy. Add comments proposed by Eric Anholt. Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Signed-off-by:
Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by:
Axel Davy <axel.davy@ens.fr> Reviewed-by:
Eric Anholt <eric@anholt.net> (cherry picked from commit 8cab54de)
-
- Dec 11, 2014
-
-
Matches what u_vbuf_get_minmax_index() does. Reviewed-by:
Ilia Mirkin <imirkin@alum.mit.edu> (cherry picked from commit f9098f09)
-
Cc: 10.2.10.3 10.4 <mesa-stable@lists.freedesktop.org> (cherry picked from commit ac319d94) Conflicts: docs/relnotes/10.4.html
-
On evergreen there are 4 regs, on r600/700 there is only one. Don't initialise regs and trash someone elses state. Not sure this fixes anything, but hey one less stupid. Reviewed-By:
Glenn Kennard <glenn.kennard@gmail.com> Cc: "10.3 10.4" mesa-stable@lists.freedesktop.org Signed-off-by:
Dave Airlie <airlied@redhat.com> (cherry picked from commit 7f21cf71)
-
Harvested GPUs have some of their render backends disabled, so in order to prevent the hardware from trying to render things with these disabled backends we need to correctly program the PA_SC_RASTER_CONFIG register. v2: - Write RASTER_CONFIG for all SEs. v3: - Set GRBM_GFX_INDEX.INSTANCE_BROADCAST_WRITES bit. - Set GRBM_GFX_INFEX.SH_BROADCAST_WRITES bit when done setting PA_SC_RASTER_CONFIG. - Get num_se and num_sh_per_se from kernel. v4: - Get correct value for num_se - Remove loop for setting PA_SC_RASTER_CONFIG - Only compute raster config when a backend has been disabled. v5: Michel Dänzer - Fix computation for chips with multiple SEs https://bugs.freedesktop.org/show_bug.cgi?id=60879 CC: "10.4 10.3" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 67dcbcd9)
-
The GS has an interesting use for mul. Because the GS can emit multiple vertices per input vertex, and it also has a unique count at the top of the URB payload, the GS unit needs to be able to dynamically specify URB write offsets (relative to the global offset). The documentation in the function has a very good explanation from Paul on the mechanics. This fixes around 2000 piglit tests on BSW. v2: Reworded commit message (Ben) no mention of CHV (Matt) Change SHRT_MAX to USHRT_MAX (Ken, and Matt) Update comment in code to reflect the use of UW (Ben) Add Gen7+ assertion for the relevant GS code, since it won't work on Gen6- (Ken) Drop the bogus hunk in emit_control_data_bits() (Ken) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84777 (with many dupes) Cc: "10.4 10.3 10.2" <mesa-stable@lists.freedesktop.org> Signed-off-by:
Ben Widawsky <ben@bwidawsk.net> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit f13870db)
-
Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Brian Paul <brianp@vmware.com> Reviewed-by:
Rob Clark <robclark@freedesktop.org> (cherry picked from commit c3bed136)
-
Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Brian Paul <brianp@vmware.com> Reviewed-by:
Rob Clark <robclark@freedesktop.org> (cherry picked from commit fb434e67)
-
The index_bias (aka base_vertex) applies to the downstream draw just as much, since the actual index values are never modified. Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Brian Paul <brianp@vmware.com> Reviewed-by:
Rob Clark <robclark@freedesktop.org> (cherry picked from commit 1dfa0391)
-
- Dec 05, 2014
-
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com>
-
- Dec 03, 2014
-
-
height=0 is legal for 1D array textures (as depth=0 is legal for 2D arrays). Fixes new piglit ext_texture_array-errors test. Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Reviewed-by:
José Fonseca <jfonseca@vmware.com> (cherry picked from commit 4e6244e8)
-
We need parenthesis around the expression which computes the number of blocks per row. Reviewed-by:
Matt Turner <mattst88@gmail.com> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 991d5cf8)
-
Looks like none of the mad variants do u16 * u16 + u32, so just add in the extra value "by hand". Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> (cherry picked from commit de83ef67)
-
This fixes arb_color_buffer_float-render GL_RGBA16F. Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Rob Clark <robclark@freedesktop.org> (cherry picked from commit 3de9fa8f)
-
- Nov 28, 2014
-
-
madsh.m16 can't handle a const in src1, make sure to unconst it Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by:
Rob Clark <robdclark@gmail.com> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 37fe3475)
-