summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* r300g: fix blending with blend color and RGBA formatsMarek Olšák2013-02-061-0/+11
| | | | NOTE: This is a candidate for the stable branches.
* egl/dri: Don't invoke dri2_dpy->flush if it's NULL.José Fonseca2013-02-061-1/+2
| | | | | | | I'd like to test Mesa OpenGL ES along side with NVIDIA libGL drivers. But without this change, I get a NULL pointer dereference. Reviewed-by: Brian Paul <[email protected]>
* glsl: Initialize ast_parameter_declarator member variables.Vinson Lee2013-02-051-4/+8
| | | | | | | Fixes uninitialized pointer field defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: fix sRGB renderingBrian Paul2013-02-051-0/+11
| | | | | | | | | | | We weren't emitting the SVGA_RS_OUTPUTGAMMA state so sRGB rendering didn't work properly. Fixes piglit's framebuffer-srgb test. Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* r600g/compute: Fix segfault caused by new shader disassemblerTom Stellard2013-02-052-2/+4
|
* Require libdrm_radeon 2.4.42 for radeonsi.Michel Dänzer2013-02-052-2/+2
| | | | It has new PCI IDs and an important tiled surface layout fix.
* i965: Disable write masking when setting up texturing m0.Eric Anholt2013-02-042-1/+4
| | | | | | | | | | v2/Kayden: Also disable write masking in the vec4 backend. Fixes 78 oglconform glsl-bif-tex-* subcases. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]> [v1] Reviewed-by: Eric Anholt <[email protected]> [v2]
* intel: Fix regression in intel_create_image_from_name stride handlingTapani Pälli2013-02-041-1/+1
| | | | | | | | | Strangely, the DRIimage interface we have passes the pitch in pixels instead of bytes, which anholt missed in the change to using bytes for region pitch. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Fix segfaults from 45a28a927ab7f29ff325b9326d386a39ba538c18Eric Anholt2013-02-042-2/+4
| | | | | | If you look up a level that isn't in the miptree, you crash. Reviewed-by: Chad Versace <[email protected]>
* radeonsi: add Oland pci idsAlex Deucher2013-02-041-0/+14
| | | | | | Signed-off-by: Alex Deucher <[email protected]> Note: this is a candidate for the 9.1 branch.
* radeonsi: default PA_SC_RASTER_CONFIG to 0Alex Deucher2013-02-041-1/+3
| | | | | | | | That should work in all cases. Signed-off-by: Alex Deucher <[email protected]> Note: this is a candidate for the 9.1 branch.
* radeonsi: add support for Oland chipsAlex Deucher2013-02-044-0/+6
| | | | | | Signed-off-by: Alex Deucher <[email protected]> Note: this is a candidate for the 9.1 branch
* glsl: Support transform feedback of varying structs.Paul Berry2013-02-042-67/+184
| | | | | | | | | | | | | | | | | | | Since transform feedback needs to be able to access individual fields of varying structs, we can no longer match up the arguments to glTransformFeedbackVaryings() with variables in the vertex shader. Instead, we build up a hashtable which records information about each possible name that is a candidate for transform feedback, and then match up the arguments to glTransformFeedbackVaryings() with the contents of that hashtable. Populating the hashtable uses the program_resource_visitor infrastructure, so the logic is shared with how we handle uniforms. NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Use parse_program_resource_name to parse transform feedback varyings.Paul Berry2013-02-042-19/+16
| | | | | | | | | | | | | | | | | | | Previously, transform feedback varyings were parsed in an ad-hoc fashion that wasn't compatible with structs (or array of structs). This patch makes it use parse_program_resource_name(), which correctly handles both. Note that parse_program_resource_name()'s technique for handling mal-formed input strings is to simply let them through and rely on the fact that a future name lookup will fail. Because of this, tfeedback_decl::init() no longer needs to return a boolean error code--it always succeeds, and if the input was mal-formed the error will be detected later. NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Rename uniform_field_visitor to program_resource_visitor.Paul Berry2013-02-044-33/+34
| | | | | | | | | | | | | | | | There's actually nothing uniform-specific in uniform_field_visitor. It is potentially useful for all kinds of program resources (in particular, future patches will use it for transform feedback varyings). This patch renames it to program_resource_visitor, and clarifies several comments, to reflect the fact that it is useful for more than just uniforms. NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa/glsl: Separate parsing logic from _mesa_get_uniform_location.Paul Berry2013-02-044-61/+91
| | | | | | | | | | | | | | | | The parsing logic is moved to a new function in the GLSL module, parse_program_resource_name(). This name was chosen because it should eventually be useful for handling everything that OpenGL 4.3 calls "program resources" (e.g. uniforms, vertex inputs, fragment outputs, and transform feedback varyings). Future patches will make use of this function for linking transform feedback varyings. NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* gallium/egl: Fix include dirs for VPATH buildQuentin Glidic2013-02-041-0/+1
| | | | | | NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Quentin Glidic <[email protected]>
* intel: make sure to setup image dimension in image_from_planar setupAbdiel Janulgue2013-02-041-0/+1
| | | | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60212 Tested-by: Scott Moreau <[email protected]> Tested-by: Tiago Vignatti <[email protected]> Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Abdiel Janulgue <[email protected]>
* builtin_compiler/build: Don't use *_FOR_BUILD when not cross compilingMatt Turner2013-02-041-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | Previously we were relying on CFLAGS_FOR_BUILD to be the same as CFLAGS when not cross compiling, but this assumption didn't take into consideration 32-bit builds on 64-bit systems. More generally, not honoring CFLAGS is bad. Automake is evidently too stupid to accept if CROSS_COMPILING CC = @CC_FOR_BUILD@ ... else CC = @CC@ endif without warning that CC has been already defined. The warnings are harmless, but I'd prefer to avoid future reports about them, so define proxy variables, which are assigned inside the conditional and then unconditionally assigned to CC et al. NOTE: This is a candidate for the 9.1 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59737 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60038
* st/mesa: emit SQRT opcode when driver supports itBrian Paul2013-02-041-7/+21
|
* gallium/drivers: handle PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED queryBrian Paul2013-02-048-0/+17
| | | | Initially, only softpipe/llvmpipe support SQRT.
* gallivm: implement support for SQRT opcodeBrian Paul2013-02-043-0/+37
|
* tgsi: add support for new SQRT opcodeBrian Paul2013-02-044-1/+18
|
* gallium: add SQRT shader opcodeBrian Paul2013-02-043-2/+12
| | | | | | | | | | | | | | | | | | The glsl-to-tgsi translater will emit SQRT to implement GLSL's sqrt() and distance() functions if the PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED query says it's supported by the driver. Otherwise, sqrt(x) is implemented with x*rsq(x). The problem with this is sqrt(0) must be handled specially because rsq(0) might be Inf/NaN/undefined (and then 0*rsq(0) is Inf/Nan/undefined). In the glsl-to-tgsi code we use an extra CMP to check if x is zero and then replace the result of x*rsq(x) with zero. In the end, this makes sqrt() generate much more reasonable code for drivers that can do square roots. Note that many of piglit's generated shader tests use the GLSL distance() function.
* radeonsi: Remove spurious traces of R16G16B16 support.Michel Dänzer2013-02-041-3/+0
| | | | | | The hardware can't do it, and these were causing warnings in some piglit tests. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Enable texture arrays.Michel Dänzer2013-02-041-1/+1
| | | | | | 28/30 piglit tests pass. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Improve packing of texture address parameters.Michel Dänzer2013-02-041-30/+97
| | | | | | | In particular, the LOD bias and depth comparison values are packed before the 'normal' texture coordinates, and the array slice and LOD values are appended. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Adapt to sample intrinsics changes.Michel Dänzer2013-02-043-51/+56
| | | | | | Fix up intrinsic names, and bitcast texture address parameters to integers. NOTE: This is a candidate for the 9.1 branch.
* st/mesa: simplify the update_single_texture() functionBrian Paul2013-02-041-28/+7
| | | | | | | | In particular, rework the sRGB/linear format selection code. There's no reason to mess with the Mesa format. Just do everything in terms of the gallium pipe_format. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: merge st_ChooseTextureFormat_renderable() into st_ChooseTextureFormat()Brian Paul2013-02-042-38/+21
| | | | That was the only place it was being called from.
* st/mesa: improve the format choosing code for DrawPixelsBrian Paul2013-02-041-6/+8
| | | | | | The code before was getting a pipe format, then calling st_pipe_format_to_mesa_format() and then converting back again with st_mesa_format_to_pipe_format(). This removes one conversion step.
* gallium: handle unhandled PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENTAndreas Boll2013-02-047-0/+8
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60098 Signed-off-by: Brian Paul <[email protected]>
* st/mesa: don't choose DXT formats if we can't do DXT compressionBrian Paul2013-02-045-13/+29
| | | | | | | | | | | | | | | | | | | | If we call gl[Copy]TexImage2D() with a generic compression format (e.g. intFormat=GL_COMPRESSED_RGBA) we can't choose a DXT format if we don't have the external DXT compression library. We weren't actually enforcing this before since the pipe_screen::is_format_supported(DXT) query has no dependency on the DXT compression library. Now if we're given a generic compressed format and we can't do DXT compression we'll fall back to a non-compressed format. v2: use util_format_is_s3tc() function and add more comments about the allow_dxt parameter. Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't use format chooser code for glCompressedTexImageBrian Paul2013-02-041-2/+12
| | | | | | | | | | When glCompressedTexImage is called the internalFormat is a specific format for the incoming image and the the hardware format should be the same (since we never do format transcoding). So use the simpler _mesa_glenum_to_compressed_format() function. This change is also needed for the next patch. Note: This is a candidate for the stable branches.
* i965: Fix the SF Vertex URB Read Length calculation for Gen7 platforms.Kenneth Graunke2013-02-031-16/+16
| | | | | | | | | | | | | | | | | | | Ivybridge doesn't appear to have the same errata as Sandybridge; no corruption was observed by setting it to more than the minimal correct value. It's possible that we were simply lucky, since the URB entries are 1024-bit on Ivybridge vs. 512-bit Sandybridge. Or perhaps the underlying hardware issue is fixed. Either way, we may as well program the minimum value since it's now readily available, likely to be more efficient, and possibly more correct. v2: Use GEN7_SBE_* defines rather than GEN6_SF_*. (A copy and paste mistake.) They're the same, but using the right names is better. NOTE: This is a candidate for all stable branches. Reviewed-by: Paul Berry <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Fix the SF Vertex URB Read Length calculation for Sandybridge.Kenneth Graunke2013-02-031-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This commit message was primarily written by Paul Berry, who explained what's going on far better than I would have.) Previous to this patch, we thought that the only restrictions on 3DSTATE_SF's URB read length were (a) it needs to be large enough to read all the VUE data that the SF needs, and (b) it can't be so large that it tries to read VUE data that doesn't exist. Since the VUE map already tells us how much VUE data exists, we didn't bother worrying about restriction (a); we just did the easy thing and programmed the read length to satisfy restriction (b). However, we didn't notice this erratum in the hardware docs: "[errata] Corruption/Hang possible if length programmed larger than recommended". Judging by the context surrounding this erratum, it's pretty clear that it means "URB read length must be exactly the size necessary to read all the VUE data that the SF needs, and no larger". Which means that we can't program the read length based on restriction (b)--we have to program it based on restriction (a). The URB read size needs to precisely match the amount of data that the SF consumes; it doesn't work to simply base it on the size of the VUE. Thankfully, the PRM contains the precise formula the hardware expects. Fixes random UI corruption in Steam's "Big Picture Mode", random terrain corruption in PlaneShift, and Piglit's fbo-5-varyings test. NOTE: This is a candidate for all stable branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56920 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60172 Tested-by: Jordan Justen <[email protected]> (v1/Piglit) Tested-by: Martin Steigerwald <[email protected]> (PlaneShift) Reviewed-by: Paul Berry <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Compute the maximum SF source attribute.Kenneth Graunke2013-02-033-4/+12
| | | | | | | | | | The maximum SF source attribute is necessary to compute the Vertex URB read length properly, which will be done in the next commit. NOTE: This is a candidate for all stable branches. Reviewed-by: Paul Berry <[email protected]> Tested-by: Martin Steigerwald <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Refactor Gen6+ SF attribute override code.Kenneth Graunke2013-02-031-12/+13
| | | | | | | | | | | The next patch will benefit from easy access to the source attribute number and whether or not we're swizzling. It doesn't want the final attr_override DWord form, however. NOTE: This is a candidate for all stable branches. Reviewed-by: Paul Berry <[email protected]> Tested-by: Martin Steigerwald <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Remove hash table from ir_set_program_inouts pass.Kenneth Graunke2013-02-031-24/+14
| | | | | | | | | | | Back when ir_var_in and ir_var_out signified both function parameters and shader input/outputs, we had trouble distinguishing the two when looking at a dereference. Now that we have separate ir_var_shader_in and ir_var_shader_out modes, we can determine this easily. Removing the hash table saves memory and CPU overhead. Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Remove dead field brw_wm_prog_data::error.Kenneth Graunke2013-02-031-1/+0
|
* i965: Remove dead field brw_context::constant_map.Kenneth Graunke2013-02-031-1/+0
| | | | This was used by the old VS backend, but that's long gone.
* r600g: Fix memory leak.Vinson Lee2013-02-011-1/+3
| | | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/dri2: Fix memory leak.Vinson Lee2013-02-011-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nv30: Fix memory leak.Vinson Lee2013-02-011-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nv50: Fix memory leak.Vinson Lee2013-02-011-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nvc0: Fix memory leak.Vinson Lee2013-02-011-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Fix memory leak.Vinson Lee2013-02-011-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* configure.ac: Fix --with-llvm-shared-libsQuentin Glidic2013-02-011-2/+7
| | | | | | | | | | | The third argument of AC_ARG_WITH is evaluated for any provided value, not only on --with-, so it must not force-enable the feature Also, setting $with_llvm_shared_libs in the opencl check was overriding the user switch https://bugs.freedesktop.org/show_bug.cgi?id=59851 Signed-off-by: Quentin Glidic <[email protected]>
* r600g/llvm: Select the correct GPU type for RV670Tom Stellard2013-02-011-1/+1
| | | | | | | | RV670 belongs in the R600 chip class https://bugs.freedesktop.org/show_bug.cgi?id=58666 NOTE: This is a candidate for the 9.1 branch
* intel: implement create image from textureAbdiel Janulgue2013-02-011-21/+138
| | | | | | | | | | | | | | | | | Save miptree level info to DRIImage: - Appropriately-aligned base offset pointing to the image - Additional x/y adjustment offsets from above. v8: -Bump intelImageExtension version v9: -Don't use internal _eglError but implement error reporting in new DRI inteface instead. This fixes Android build problems based on feedback from Adrian M Negreanu and Chad Versace. -Move the non-tile-aligned check and error-reporting to intel_set_texture_image_region v10: -Don't #include "egl/main/eglcurrent.h". [chadv] Reviewed-by: Eric Anholt <[email protected]> (v6) Acked-by: Chad Versace <[email protected]> (v10) Signed-off-by: Abdiel Janulgue <[email protected]>