- Aug 22, 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>
-
Emil Velikov authored
This reverts commit 20bb0a77. Requested-by: Alex Deucher <alexdeucher@gmail.com>
-
- Aug 19, 2015
-
-
This is done by returning an rvalue of type void in the ast_function_expression::hir function instead of a void expression. This produces (in the case of the ternary) an hir with a call to the void returning function and an assignment of a void variable which will be optimized out (the assignment) during the optimization pass. This fix results in having a valid subexpression in the many different cases where the subexpressions are functions whose return values are void. Thus preventing to dereference NULL in the following cases: * binary operator * unary operators * ternary operator * comparison operators (except equal and nequal operator) Equal and nequal had to be handled as a special case because instead of segfaulting on a forbidden syntax it was now accepting expressions with a void return value on either (or both) side of the expression. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85252 Signed-off-by: Renaud Gaubert <renaud@lse.epita.fr> Reviewed-by: Gabriel Laskar <gabriel@lse.epita.fr> Reviewed-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> (cherry picked from commit 7b9ebf87) Nominated-by: Mark Janes <mark.a.janes@intel.com>
-
When gl_VertexID or gl_InstanceID is used a 3DSTATE_VF_SGVS instruction is sent to create a sort of element to store the generated values. The last instruction in this chunk of code looks like it was trying to set the instancing state for the element using the 3DSTATE_VF_INSTANCING instruction. However it was sending brw->vb.nr_buffers instead of the element index. This instruction is supposed to take an element index and that is how it is used further down in the function so the previous code looks wrong. Perhaps previously the number of buffers coincidentally matched the number of enabled elements so the value was generally correct anyway. In a subsequent patch I want to change a bit how it chooses the SGVS element index so this needs to be fixed. v2 [by Ben] Remove stable 10.5 stable tag (it's too late now) Commit update as follows: The number of vertex buffers emitted is always <= the number of vertex elements. To maximize reuse (actually, to minimize relocations - according to the code comments), a vertex buffer is only emitted once, even when we setup multiple components (3DSTATE_VERTEX_ELEMENT) from that buffer. This meant that the previous code would use the wrong indexed element for these reuse cases. This patch by itself prevents hangs on BSW in the linked bug. It doesn't make the test pass, the remaining patches are needed for that. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91610 Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Tested-by: Mark Janes <mark.a.janes@intel.com> Cc: <mesa-stable@lists.freedesktop.org> (cherry picked from commit c03247ba)
-
In the DRI2 path this event is magically synthesized from the corresponding DRI2 event, but with Present, the server sends us the event itself. The DRI2 path fills in the serial number, send_event, and display fields of the XEvent struct that the app sees, but the Present path did not. This is likely related to a class of crashes seen in gtk/clutter apps: https://bugzilla.redhat.com/attachment.cgi?id=1032631 Note that the crashing instruction is looking up the lock_fns slot in the Display *, and %rdi (holding the Display *) is 0x1. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 8f7ebcb6)
-
This fixes arb_get_texture_sub_image-get, and any situation where the 2d engine was being used for multi-layer blits to a non-0 level. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.6" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 2514c78f)
-
Fixes fs-simple-texture-size.shader_test Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.6" <mesa-stable@lists.freedesktop.org> (cherry picked from commit b346a84e)
-
This enables the second RB on asics that support it which should boost performance. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 649975e7)
-
When calling either eglCreateWindowSurface or eglCreatePixmapSurface it was possible for an application to be aborted as a result of it failing to create a DRI2 drawable on the server. This could happen due to an application passing in an invalid native drawable handle, for example. v2: Handle the case where an error has been set on the connection Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 9a4eae61)
-
We were ignoring them. This is both hilarious and sad. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Edward O'Callaghan <eocallaghan at alterapraxis.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 8c0b943e)
-
The value was copied from r300g, which uses 1/12 subpixels, but this hw uses 1/16 subpixels. Should fix piglit: gl-1.4-polygon-offset (formerly a glean test) (untested, ported from radeonsi) Reviewed-by: Edward O'Callaghan <eocallaghan at alterapraxis.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit d335aad1)
-
The value was copied from r300g, which uses 1/12 subpixels, but this hw uses 1/16 subpixels. Fixes piglit: gl-1.4-polygon-offset (formerly a glean test) Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit bfac8ba9)
-
Because we build here an array format, we don't need to swap the bytes for big endian. If it isn't an array format, the bytes will be swapped in _mesa_format_convert. v2: remove temp variable Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 5f1d5b1c)
-
Before, if we encountered an array format of 0 on a BE system, we would flip all the channels even though it's an invalid format. This would result in a mostly invalid format with a swizzle of yyyy or wwww. Instead, we should just return 0 if the array format stashed in the format info is invalid. Cc: "10.6 10.5" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e3eb91af)
-
The swizzle defines where in the format you should look for any given channel. When we flip the format around for BE targets, we need to change the destinations of the swizzles, not the sources. For example, say the format is an RGBX format with a swizzle of xyz1 on LE. Then it should be wzy1 on BE; however, the code as it was before, would have made it 1zyx on BE which is clearly wrong. Reviewed-by: Iago Toral <itoral@igalia.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Cc: "10.6 10.5" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 28d1a506)
-
Reviewed-by: Iago Toral <itoral@igalia.com> Cc: "10.6 10.5" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 39415391)
-
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 87cea61b)
-
A TNL state update now requires a DrawBuffer to be set, which it isn't early on in context creation. Since we init swtnl from context init, this caused crashes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91570 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.6" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 3fa1ca34)
-
This patch fixes a bug in big-endian treatment, where the previous swizzle info wasn't cleared before a new swizzle info was inserted into the format field using a bitwise-OR operation. v2: use MESA_ARRAY_FORMAT_SWIZZLE_*_MASK instead of numeric constants v3: align according to coding style Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> CC: "10.5 10.6" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> (cherry picked from commit 2ac171a7)
-
Emil Velikov authored
Cc: 10.6 <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 75ce7919)
-
The meta CopyImageSubData path uses BlitFramebuffers to do the actual copy. The only thing that can affect BlitFramebuffers other than the currently bound framebuffers is the scissor so we need to save that off and reset it. If we don't do this, applications that use a scissor together with CopyImageSubData will get accidentally scissored copies. Tested-by: Markus Wick <markus at selfnet.de> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> (cherry picked from commit 736c6f3c)
-
- Aug 11, 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>
-
Emil Velikov authored
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-
- Aug 06, 2015
-
-
Otherwise it would crash on Gen8 with scalar VS. The issue can easily be reproduced with the following patch, but I don't see any reason why it wouldn't be possible to end up with an ATTR argument here even without it. CC: mesa-stable@lists.freedesktop.org Reviewed-by: Connor Abbott <connor.w.abbott@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit 42a18ca7)
-
Page 161 of the OpenGL-ES 3.1 (PDF) spec, and page 207 of the OpenGL 4.5 (PDF), both on section '8.6. ALTERNATE TEXTURE IMAGE SPECIFICATION COMMANDS', states: "An INVALID_ENUM error is generated if an invalid value is specified for internalformat". It is currently returning INVALID_OPERATION error because _mesa_get_read_renderbuffer_for_format() is called before the internalformat argument has been validated. To fix this, we move this call down the validation process, after _mesa_base_tex_format() has been called. _mesa_base_tex_format() effectively serves as a validator for the internal format. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.texture.copyteximage2d_invalid_format Fixes 1 piglit test: * spec@oes_compressed_etc1_rgb8_texture@basic Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: 10.6 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 4b07e9a0)
-
Currently, glTexSubImageXD attempt to resolve the texture object (by calling _mesa_get_current_tex_object()) before validating the given target. However, that method explicitly states that target must have been validated before calling it, so it never returns a user error. The target validation occurs later when texsubimage_error_check() is called. This patch reorganizes target validation, taking it out from the error check function and into a point before the texture object is resolved. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: 10.6 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 5d64cae8) [Emil Velikov: s/_mesa_enum_to_string/_mesa_lookup_enum_by_nr/] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Conflicts: src/mesa/main/teximage.c
-
Page 68, section 7.2 'Shader Binaries" of the of the OpenGL ES 3.1, and page 88 of the OpenGL 4.5 specs state: "An INVALID_VALUE error is generated if count or length is negative. An INVALID_ENUM error is generated if binaryformat is not a supported format returned in SHADER_BINARY_FORMATS." Currently, an INVALID_OPERATION error is returned for all cases. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.shader.shader_binary Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: 10.6 <mesa-stable@lists.freedesktop.org> (cherry picked from commit b38a50f1)
-
Calling eglQuerySurface on a window or pixmap with the EGL_LARGEST_PBUFFER attribute resulted in the contents of the 'value' parameter being modified. This is the wrong behaviour according to the EGL spec, which states: "Querying EGL_LARGEST_PBUFFER for a pbuffer surface returns the same attribute value specified when the surface was created with eglCreatePbufferSurface. For a window or pixmap surface, the contents of value are not modified." Avoid this from happening by checking that the surface type is EGL_PBUFFER_BIT before modifying the contents of the parameter. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit b2c5986e)
-
Update the DRI image interface error codes to reflect the needs of the EGL_EXT_image_dma_buf_import extension. This means updating the existing error code documentation and adding a new __DRI_IMAGE_ERROR_BAD_ACCESS error code so that drivers can correctly reject unsupported pitches and offsets. Hook the new error code up in EGL to return EGL_BAD_ACCESS. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit cfc3200a)
-
This fixes the single-sample fast clear hang. Cc: 10.6 <mesa-stable@lists.freedesktop.org> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit d4ad4c20)
-
- Aug 01, 2015
-
-
For 10.6: This fixes graphical corruption occuring on most Southern Islands Radeon GPUs. This will allow closing a lot of bugs in the bugzilla. The patch has a better explanation. Just a summary here: - The CPU always uploads a whole descriptor array to previously-unused memory. - CP DMA isn't used. - No caches need to be flushed. - All descriptors are always up-to-date in memory even after a hang, because CP DMA doesn't serve as a middle man to update them. This should bring: - better hang recovery (descriptors are always up-to-date) - better GPU performance (no KCACHE and TC flushes) - worse CPU performance for partial updates (only whole arrays are uploaded) - less used IB space (no CP_DMA and WRITE_DATA packets) - simpler code - corruption issues are fixed on SI cards Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit b0528118)
-
For 10.6: This is a prerequisite for the next fix. The below comment is from the original commit. This is mainly needed for tessellation where a VS can be bound as VS, ES, or LS, and TES (tess. evaluationshader) can be bound as VS or ES or neither. Therefore we need the ability to move pointers to descriptors between shaders arbitrarily. The idea is that the context has a mapping from PIPE_SHADER_x to SPI_SHADER_USER_DATA_x. After a shader is enabled or disabled, si_shader_change_notify should be called to update this mapping accordingly. There is a dirty flag for each shader pointer, but only one emit function for all pointers in the whole context, whose code and logic is separated from descriptors. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 3ce91c72)
-
We must have versioned library in mesa.icd, because ICD loader would fail if the mesa-devel package wasn't installed. Cc: "10.6" <mesa-stable@lists.freedesktop.org> Reported-by: Fabian Deutsch <fabian.deutsch@gmx.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73512 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 4d7e0fa8)
-
Emil Velikov authored
v2: Use change sed/sort based on Ilia's suggestion. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit c505064b)
-
Before validating vertex arrays we need to check if a VBO is present. Checking if vb->buffer is not NULL fixes the issue. Fixes the following piglit test: gl-3.1-vao-broken-attrib Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> (cherry picked from commit adc816a1)
-
Emil Velikov authored
Earlier commit added an extra dup(fd) to fix a ZaphodHeads issue. Although it did not consider the (very unlikely) case where we might end up with the valid fd == 0. Fixes: 28dda47a(winsys/radeon: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads.) Cc: 10.6 <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com> (cherry picked from commit 1307be51)
-
Emil Velikov authored
Prompt at configure time if it's missing otherwise we'll fail later on in the build. Remove ambiguous HAVE_LIBDRM guard. Cc: 10.6 <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit fa109d02)
-
This patch adjusts the SKL values to the best known values we have. v2: Remove HS/DS/CS fields. Adding this makes most sense to add to the GEN9_FEATURES macro, however, doing that would require updating BXT values, and Jordan requested I not do that. Conveniently, this request makes a lot of sense wrt to stable backport as HS, and DS do not even exist there. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit 7eaacc16) [Emil Velikov: .supports_simd16_3src is missing in 10.6] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Conflicts: src/mesa/drivers/dri/i965/brw_device_info.c
-