summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nv30: add forgotten PIPE_CAP_CUBE_MAP_ARRAY cap to listIlia Mirkin2013-08-261-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit bac6efe8e33115263fc7f1637671b303ea0b4243)
* gallium/osmesa: Link, not copy, the shared library to the LIB_DIR.Jon Severinsson2013-08-231-1/+1
| | | | | | | | Just like all other mesa libraries... CC: "9.2" <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit b47bde00790c4d4cef107c8cd33ed17a08415caf)
* gallium/osmesa: Always link with the c++ linker.Jon Severinsson2013-08-231-9/+2
| | | | | | | | Just like all other gallium targets... CC: "9.2" <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit aeb9c9e4b01af8a70432a961931abde5adf06c42)
* gallium/osmesa: Make and install an osmesa.pc.Jon Severinsson2013-08-232-3/+14
| | | | | | | | | | As of "2f142d59 build: Add --enable-gallium-osmesa flag." the pkgconfig file from classic osmesa is no longer installed when building gallium osmesa, so copy it to gallium osmesa and install the copy instead. CC: "9.2" <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit c8111904304a878a3d5831b453255f04e1ddcf56)
* mesa: Fix assertion error with glDebugMessageControlTimothy Arceri2013-08-231-13/+2
| | | | | | | | | | | | enums were being converted twice resulting in incorrect values. The extra conversion has been removed and the redundant assert is removed also. Cc: 9.2 <[email protected]> Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit f0072e3c6b0bd46d8ebf7ac0a2cf1bf63dc370e8)
* mesa: Specify a better GL_MAX_SERVER_WAIT_TIMEOUT limit.Kenneth Graunke2013-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous value of (GLuint64) ~0 has some problems: GL_MAX_SERVER_WAIT_TIMEOUT is supposed to be a GLuint64 value, but has to be queried via GetInteger64v(), which returns a GLint64. This means that some applications are likely to treat it as a signed integer, where ~0 means -1. Negative values are nonsensical and problematic. When interpreted correctly, ~0 translates to about 0.58 million years, which seems rather excessive. This patch changes it to 0x1fff7fffffff, which is about 1.11 years. This is still plenty long, and is the same as both an int64 and uint64. Applications that accidentally store it in a 32-bit int/unsigned also get a non-negative value, which is again the same as both int and unsigned. This value was suggested by Ian Romanick. v2: Add the ULL prefix on the constant (suggested by Ian). Fixes Piglit's spec/!OpenGL 3.2/get-integer-64v. Signed-off-by: Kenneth Graunke <[email protected]> Cc: [email protected] (cherry picked from commit a27180d0d8666c75befe5c5b26e6d7122b41588b)
* glsl: Give a warning, not an error, for UBO qualifiers on non-matrices.Ian Romanick2013-08-221-6/+12
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59648 Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Ian Romanick <[email protected]> (cherry picked from commit dded321f92e4727584a98b71d7aaa15d4f01fb24)
* glsl: Remove ubo_qualifiers_allowed variable.Matt Turner2013-08-224-11/+2
| | | | | | | | No longer used. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 921ef55a72dd07a6db0f170767d4a278c46d9ae6)
* glsl: Drop duplicate error messages.Matt Turner2013-08-221-13/+2
| | | | | | | | | This same message is printed in the validate_matrix_layout_for_type function. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 77373e020ecc1b156802a583745dc6ce16e91c9e)
* glsl: Rename ubo_qualifiers_valid to ubo_qualifiers_allowed.Matt Turner2013-08-224-6/+6
| | | | | | | | | | The variable means that UBO qualifiers are allowed in a particular context (e.g., not allowed in a struct field declaration), rather than a particular set of UBO qualifiers are valid. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> (cherry picked from commit 1a45db97058d63b742993d0fcf0e5df44e2aa1c6)
* i965: Fix misapplication of gles3 srgb workaroundChad Versace2013-08-221-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes inconsistent failure of gles2conform/GL2Tests/glUniform/glUniform.test under gnome-shell. What follows is a description of the bug and its fix. When intel_update_renderbuffers() allocates a miptree for a winsys renderbuffer, it propagates the renderbuffer's format to become also the miptree's format. If the winsys color buffer format is SARGB, then, in the first call to eglMakeCurrent, intel_gles3_srgb_workaround() changes the renderbuffer's format to ARGB. That is, it changes the format from sRGB to non-sRGB. However, it changes the renderbuffer's format *after* intel_update_renderbuffers() has allocated the renderbuffer's miptree. Therefore, when eglMakeCurrent returns, the miptree format (SARGB) differs from the renderbuffer format (ARGB). If the X server reallocates the color buffer, intel_update_renderbuffers() will create a new miptree for the renderbuffer. The new miptree's format (ARGB) will differ from old miptree's format (SARGB). This mismatch between old and new miptrees causes bugs. Fix the bug by moving intel_gles3_srgb_workaround() to occur *before* intel_update_renderbuffers(). CC: "9.2" <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67934 Signed-off-by: Chad Versace <[email protected]> (cherry picked from commit ce8639a766d0c36e676eea6f55135d9dccf1cb90)
* radeonsi: Fix y/z/w component values of TGSI_SEMANTIC_FOG pixel shader inputsMichel Dänzer2013-08-221-0/+18
| | | | | | | | | | They are defined as constant 0.0/0.0/1.0. Three more little piglits. Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]> (cherry picked from commit 237cb074cb0efa50633f35e737122471957747b2)
* build: Add --enable-gallium-osmesa flag.Matt Turner2013-08-212-2/+2
| | | | | | | | | The Gallium implementation is apparently not ready for regular consumption, so as much as I hate adding more build-time options, here's another. Acked-by: Brian Paul <[email protected]> (cherry picked from commit 2f142d596f6d950499d5e25d26e011a675c9670c)
* i965: Don't copy propagate bitcasts with source modifiers.Matt Turner2013-08-213-4/+23
| | | | | | | | | | | | | | | | | | | Previously, copy propagation would cause bitcast_f2u(abs(float)) to be performed in a single step, but the application of source modifiers (abs, neg) happens after type conversion, leading to incorrect results. That is, for bitcast_f2u(abs(float)) we would in fact generate code to do abs(bitcast_f2u(float)). For example, whereas bitcast_f2u(abs(float)) might result in a register argument such as (abs)g2.2<0,1,0>UD v2: Set interfered = true and break in register_coalesce instead of returning false. Reviewed-by: Paul Berry <[email protected]> (cherry picked from commit 9c48ae751ab28f35eb878551d24c071be0ce11b0)
* i965: Emit MOVs for neg/abs.Matt Turner2013-08-212-4/+4
| | | | | | | | | | | | | | | | | Necessary to avoid combining a bitcast and a modifier into a single operation. Otherwise if safe, the MOV should be removed by copy-propagation or register coalescing. With this and the next patch, there are only four changes in shader-db: all a single extra instruction. The code does something like mov a.w, -b.x and copy propagation doesn't work because it only handles no-op swizzles. Seems acceptable, given the known limitation of our copy propagation. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> (cherry picked from commit 0ae9ca12a887a5aca47edc2a6a99eac4235bf4b0)
* osmesa: Symlink shared library to LIB_DIRArmin K2013-08-211-0/+1
| | | | | | | Cc: 9.2 <[email protected]> Tested-by: Brian Paul <brianp at vmware.com> Reviewed-by: Brian Paul <brianp at vmware.com> (cherry picked from commit 63ac68bae398884b3b704eccf58a8a9fe8aac9e6)
* glapi/gen: build temporary files in the build directoryMaarten Lankhorst2013-08-211-4/+4
| | | | | | | | | | | Writing to the source directory can cause multiple parallel builds from the same source to fail. Create the temporary files in the build directory. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit 10aa3677cc032df9cc1509c4e45f553be378a7f9)
* mesa: Never advertise _S3TC compressed formatsIan Romanick2013-08-211-12/+0
| | | | | | | | | | | | | The NVIDIA driver doesn't expose them, and piglit's arb_texture_compression-invalid-formats expects them to not be there. This, with the previous commit, fixes piglit arb_texture_compression-invalid-formats. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit f53b634807140268b40b063a2a966ad2701df7be)
* mesa: Only advertise GL_ETC1_RGB8_OES in ES contextsIan Romanick2013-08-211-1/+9
| | | | | | | | | | There is no extension for this format in desktop GL, so an application can't give the format back to glCompressedTexImage2D. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit 40550c8cedbcca508fb05baa7b7d480e6a60c51f)
* glsl: Track existence of default float precision in GLSL ES fragment shadersIan Romanick2013-08-212-4/+68
| | | | | | | | | | | | | | | | | | | | This is required by the spec, and it's a bit tricky because the default precision is scoped. As a result, I'm slightly abusing the symbol table. Fixes piglit no-default-float-precision.frag tests and the piglit default-precision-nested-scope-0[1234].frag tests that are currently on the piglit mailing list for review. On IRC I got confirmation from cwabbot that ARM (Mali T6xx and T400) enforces this requirement and from kusma that NVIDIA (Tegra2) enforces this requirement. We should be safe from regressing shipping applications. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit cabd45773b58d6aa48202da1cdd8cf1a6b856c53)
* glsl: Merge precision qualifiers tooIan Romanick2013-08-211-0/+3
| | | | | | | | | | | | | | We never noticed this before because we previously didn't enfoce GLSL ES fragement shader requirements that precision be defined. There may also have been some interaction here with the addition of GL_ARB_shading_language_420pack, but it doesn't appear to me that it added any new bugs (just perhaps uncovered some old ones). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit 73e2d69792fba229e52ea47165592d086e650c45)
* glsl: Pass type to is_valid_default_precision_type instead of nameIan Romanick2013-08-211-4/+5
| | | | | | | | | This is used by the next patch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit b15b62c54c0e3c10aaf8573a62acfcdc93979b0d)
* build: fix out-of-tree builds in gallium/auxiliaryRoss Burton2013-08-211-0/+4
| | | | | | | | | | | The rules were writing files to e.g. util/u_indices_gen.py, but in an out-of-tree build this directory doesn't exist in the build directory. So, create the directories just in case. Cc: [email protected] Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Ross Burton <[email protected]> (cherry picked from commit 76feef0823df75a36f264f48ec843dd863fd5b89)
* radeonsi: Always pre-load separate VGPRs for centroid vs. center interpolationMichel Dänzer2013-08-211-1/+2
| | | | | | | | | | | | | | The LLVM R600 backend currently always uses separate VGPRs for these. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68162 (Centroid interpolation is identical to center interpolation without multisampling, so the shader hardware was only pre-loading one set of interpolation coefficients, and the pixel shader code was using uninitialized values as the centroid interpolation coefficients) Cc: [email protected] Tested-by: Laurent Carlier <[email protected]> (cherry picked from commit be301f707e8c6ba3bb0574e64a0a4f1653af8fb7)
* gallium/osmesa: add same checks to OSMesaMakeCurrent as the other osmesaMaarten Lankhorst2013-08-211-2/+3
| | | | | | | | Fixes a opengl crash in wine. Cc: "9.2" <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]> (cherry picked from commit 86751cbddfa762a6dbd01fd07102ba91bb90b8e5)
* gallium/osmesa: link against static libglapi library too to get the gl exportsMaarten Lankhorst2013-08-211-3/+2
| | | | | | | | | | | | | This should fix missing symbols in a osmesa built against shared glapi osmesa build. All opengl exports were missing that are defined in the static glapi, so link against both to fix this. I could swear I've done this before, maybe there was a glitch in the matrix. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47824 Cc: "9.2" <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]> (cherry picked from commit 603160d4c0ff3b5ec594aed4ee7f8e161626946d)
* glsl: Use alignment of container record for its first fieldIan Romanick2013-08-192-2/+28
| | | | | | | | | | | | | | | | | | | | | The first field of a record in a UBO has the aligment of the record itself. Fixes piglit vs-struct-pad, fs-struct-pad, and (with the patch posted to the piglit list that extends the test) layout-std140. NOTE: The bit of strangeness with the version of visit_field without the record_type poitner is because that method is pure virtual in the base class. The original implementation of the class did this to ensure derived classes remembered to implement that flavor. Now they can implement either flavor but not both. I don't know a C++ way to enforce that. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68195 Cc: "9.2 9.1" [email protected] (cherry picked from commit 574e4843e9e26aa6affa31c80ac42f745b68268b)
* glsl: Add new overload of program_resource_visitor::visit_field methodIan Romanick2013-08-192-10/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The outer-most record is passed into the visit_field method for the first field. In other words, in the following structure: struct S1 { vec4 v; float f; }; struct S { S1 s1; S1 s2; }; uniform Ubo { S s; }; s.s1.v would get record_type = S (because s1.v is the first non-record field in S), and s.s2.v would get record_type = S1. s.s1.f and s.s2.f would get record_type = NULL becuase they aren't the first field of anything. This new overload isn't used yet, but the next patch will add several uses. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> Cc: "9.2 9.1" [email protected] (cherry picked from commit 5ac884fd9f213baed1de52eb7d17b86455c48a02)
* glsl: Disallow embedded structure definitionsIan Romanick2013-08-193-0/+38
| | | | | | | | | | | Continue to allow them in GLSL 1.10 because the spec allows it. Generate an error in all other versions because the specs specifically disallow it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit d9bb8b7b56ce65bbf6909419aa6d3d69ccd34c08)
* meta: Add default precision qualifier to all fragement shadersIan Romanick2013-08-191-0/+18
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit 5fb1dd51f3845985b9389987a1c6337e7fafeabc)
* glsl: Add default precision qualifiers for ES builtinsIan Romanick2013-08-195-0/+6
| | | | | | | | | | Once the compiler proplerly checks for default precision qualifiers, these shaders will cease to compile. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit 5ac247a73e78c6df7a3980c84e6207c3da601987)
* glsl: don't eliminate texcoords that can be set by GL_COORD_REPLACEMarek Olšák2013-08-193-12/+23
| | | | | | | | | | Tested by examining generated TGSI shaders from piglit/glsl-routing. Cc: [email protected] Reviewed-by: Henri Verbeet <[email protected]> Tested-by: Henri Verbeet <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (cherry picked from commit d13003f544417db6de44c65a0c118bd2b189458a)
* nv50: allow non-nv12 buffers to be created, just pass them through to vlIlia Mirkin2013-08-191-5/+1
| | | | | | | | | | | Since we expose non-NV12 formats as supported when there is no decoer profile selected, make sure that those formats are actually allowed to be allocated. Signed-off-by: Ilia Mirkin <[email protected]> Tested-by: Emil Velikov <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit a8346a2f52d08233d376db3aa8205d0b2cc74318)
* meta: Fix blitting a framebuffer with renderbuffer attachmentAnuj Phogat2013-08-161-10/+15
| | | | | | | | | | | | | | | | | | This patch fixes a case of framebuffer blitting with renderbuffer as color attachment and GL_LINEAR filter. Meta implementation of glBlitFrambuffer() converts source color buffer to a texture and uses it to do the scaled blitting in to destination buffer. Using the exact source rectangle to create the texture does incorrect linear filtering along the edges. This patch makes the changes to extend the texture edges by one pixel in x, y directions. This ensures correct linear filtering. It fixes failing piglit fbo-attachments-blit-scaled-linear test. Signed-off-by: Anuj Phogat <[email protected]> CC: "9.2" <[email protected]> CC: "9.1" <[email protected]> Reviewed-by: Paul Berry <[email protected]> (cherry picked from commit d944a6144f6ee6a0b24126ce72de280db90038c9)
* nv30: remove no-longer-used formats from tableIlia Mirkin2013-08-161-3/+0
| | | | | | | | | Commit 14ee790df77 removed the formats from the vtxfmt_table but forgot to also update the info_table. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "9.2 and 9.1" <[email protected]> (cherry picked from commit c1a6f59b20dab380b77ad1375062f9987cad9183)
* i965: Force X-tiling for 128 bpp formats on Sandybridge.Kenneth Graunke2013-08-161-0/+9
| | | | | | | | | | | | | | | | 128 bpp formats are not allowed to be Y-tiled on any architectures except Gen7. +11 Piglits on Sandybridge (mostly regression fixes since the switch to Y-tiling). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63867 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64261 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit c189840b21e176d87cbb382e64e848061b8c7b06)
* mesa/program: remove useless YYIDLaurent Carlier2013-08-161-2/+2
| | | | | | | | This fixes the build with Bison 3.0. Also works with Bison 2.7.1. CC: "9.2" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 5ffa28df4e4cc22481b4ed41c78632f35765f41d)
* mesa/vbo: Fix handling of attribute 0 in non-compatibilty contextsIan Romanick2013-08-151-23/+59
| | | | | | | | | | | | | | | | | It is only in OpenGL compatibility-style contexts where generic attribute 0 and GL_VERTEX_ARRAY have a bizzare, aliasing relationship. Moreover, it is only in OpenGL compatibility-style contexts and OpenGL ES 1.x where one of these attributes provokes the vertex. In all other APIs each implicit call to glArrayElement provokes a vertex regardless of which attributes are enabled. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Robert Bragg <[email protected]> Cc: "9.0 9.1 9.2" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55503 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66292 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67548 (cherry picked from commit 41eef83cc030e7087b79b0070d00fbc56538fb81)
* i915,i965: Fix memory leak in try_pbo_upload (v2)Vinson Lee2013-08-152-0/+2
| | | | | | | | | | | | Fixes "Resource leak" defect reported by Coverity. Tested on Haswell, no Piglit regressions. v2: Apply to i965, not just i915. (chadv) CC: "9.2, 9.1" <[email protected]> Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Chad Versace <[email protected]> (cherry picked from commit 035bf2198368d3fa69387788a63039d71319f0bf)
* radeonsi: Don't leave gaps between position exports from vertex shaderMichel Dänzer2013-08-153-59/+83
| | | | | | | | | | | | If the vertex shader exports clip distances but not point size, use position exports 1/2 instead of 2/3 for the clip distances. Fixes geometry corruption in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66974 Cc: [email protected] Reviewed-by: Tom Stellard <[email protected]> (cherry picked from commit b00269aa5887b88d2e037d6bfa374779902f8743)
* llvmpipe: fix stencil bug if we have both stencil and depth testsRoland Scheidegger2013-08-151-14/+13
| | | | | | | | | | | | | | This is a very well hidden bug found by accident (only the fixed glean tstencil2 test so far seems to hit it). We must use new mask with combined s_pass values and orig_mask values for zpass/zfail stencil ops, otherwise both the sfail op and one of zpass/zfail op are applied (probably not hit in most tests because some of the ops tend to be KEEP usually). Note: this is a candidate for the 9.2 branch. Reviewed-by: Zack Rusin <[email protected]> (cherry picked from commit abdd32dcd5569c7caa393acd21753e03de24047f)
* nv30: U8_USCALED only works for size 4Ilia Mirkin2013-08-151-3/+0
| | | | | | | | | | See https://bugs.freedesktop.org/show_bug.cgi?id=61635 for a sample program. Changing it to use a vec4 makes it work. Remove the unsupported formats. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "9.2 and 9.1" <[email protected]> (cherry picked from commit 14ee790df77c810f187860a8d51096173ff39fcf)
* glsl: Emit better warnings for things that look like default precision ↵Ian Romanick2013-08-151-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statements Previously we would emit a warning for empty declarations like float; We would also emit the same warning for things like highp float; However, this second case is most likely the application trying to set the default precision. This makes the compiler generate a stronger warning with some suggestion of a fix. It really seems like this should be an error. I'll bet that 100% of the time someone writes 'highp float;' the actually meant 'precision highp float;'. Alas, both AMD and NVIDIA accept this syntax, and the spec doesn't explicitly forbid it. This makes piglit's precision-05.vert generate the following warnings: 0:12(11): warning: empty declaration with precision qualifier, to set the default precision, use `precision lowp float;' 0:13(12): warning: empty declaration with precision qualifier, to set the default precision, use `precision mediump int;' v2: Add { } around a one-line if body and fix a comment. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit 830f4df993b41fc90c776b19f77f77a29ce0e7f4)
* draw: always call util_cpu_detect() in draw context creation.Roland Scheidegger2013-08-151-1/+4
| | | | | | | | | | | | | | | | | | | | Since disabling denorms in draw_vbo() we require the util_cpu_caps to be initialized there. Hence add another util_cpu_detect() call in draw_create_context() which should ensure this. (There is another call in draw_get_option_use_llvm() which only gets called with x86 (not x86_64) but calling it always there wouldn't help since it most likely wouldn't get called when compiling without llvm, so leave it alone there.) This fixes https://bugs.freedesktop.org/show_bug.cgi?id=66806. (Because util_cpu_caps wasn't initialized when first calling util_fpstate_get() hence it returning zero, but it would later get initialized by rtasm translate code hence when draw call returned it unmasked all exceptions by calling util_fpstate_set(). This was happening only with DRAW_USE_LLVM=0 or not compiling with llvm, otherwise the llvm init code was calling it on time too.) Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Zack Rusin <[email protected]> Tested-by: Vinson Lee <[email protected]>
* radeon/llvm: Add missing "%s" format string to fprintf.Jon Severinsson2013-08-141-1/+1
| | | | | | | | | This fixes a compilation warning with -Wformat-security. CC: "9.2" <[email protected]> Reviewed-by: Tom Stellard <[email protected]> (cherry picked from commit 9298f537a72dc2323898e91c40894f55e3c4754a)
* glsl: disable ARB_texture_cube_map_array_enable keywords for glsl esTapani Pälli2013-08-131-24/+5
| | | | | | | | | | | | | Patch fixes a crash with Webgl 'shader-with-non-reserved-words' conformance test by ignoring desktop extension keywords on GLSL ES. v2: fix reserved and allowed desktop glsl versions (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 8c211dd742669bc03b44186e41e5aa40081d6bcc)
* gbm: Link to libwayland-drm if Wayland EGL platform is enabledArmin K2013-08-133-5/+6
| | | | | | | | | | | | We were relying on libEGL to pull in libwayland-client symbols, but with commit 2c2e64edaba0f6aeb181ca5b51eb8dea8e9b39f9 cleaned up the symbol leak. CC: "9.2" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67962 Tested-by: Bryce Harrington <[email protected]> Reviewed-by: Chad Versace <[email protected]> (cherry picked from commit f423eba46e080b975a2b8366b490d99dee4729ad)
* glsl: Require function return type arrays be explicitly sizedIan Romanick2013-08-131-0/+12
| | | | | | | | | Fixes piglit array-function-return-unsized.vert. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit 1b35e33af420cd335610289aa2d8a175a7139a97)
* glsl: Move and refine test for unsized arrays in GLSL ESIan Romanick2013-08-131-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | GLSL ES does not allow unsized arrays, and GLSL ES 1.00 does not allow array initializers. However, GLSL ES 3.00 allows array initializers, and the initializer can explicitly size the array. The specification even includes some examples of this: float x[] = float[2] (1.0, 2.0); // declares an array of size 2 float y[] = float[] (1.0, 2.0, 3.0); // declares an array of size 3 float a[5]; float b[] = a; Move the unsized array check to after the initializer has been processed. If the array is still unsized, generate the error. This should have no effect in GLSL ES 1.00 because, as previously mentioned, array initializers are not allowed. Fixes piglit "glsl-es-3.00 compiler array-sized-by-initializer.vert". Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.1 9.2" <[email protected]> (cherry picked from commit 42624b1c8145375f987e380bb78456658f845a17)
* glx: Generate GLXBadDrawable when drawable is zeroIan Romanick2013-08-131-2/+12
| | | | | | | | | Fixes piglit glx-query-drawable-GLXBadDrawable. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]> Cc: "9.2" <[email protected]> (cherry picked from commit d5aee174b88878e6d47dc1fadd3935f535fd85f0)