summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-04i965: Disable write masking when setting up texturing m0.Eric Anholt2-1/+4
v2/Kayden: Also disable write masking in the vec4 backend. Fixes 78 oglconform glsl-bif-tex-* subcases. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com> [v1] Reviewed-by: Eric Anholt <eric@anholt.net> [v2]
2013-02-04intel: Fix regression in intel_create_image_from_name stride handlingTapani Pälli1-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 <tapani.palli@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-02-04i965: Fix segfaults from 45a28a927ab7f29ff325b9326d386a39ba538c18Eric Anholt2-2/+4
If you look up a level that isn't in the miptree, you crash. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-02-04radeonsi: add Oland pci idsAlex Deucher1-0/+14
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Note: this is a candidate for the 9.1 branch.
2013-02-04radeonsi: default PA_SC_RASTER_CONFIG to 0Alex Deucher1-1/+3
That should work in all cases. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Note: this is a candidate for the 9.1 branch.
2013-02-04radeonsi: add support for Oland chipsAlex Deucher4-0/+6
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Note: this is a candidate for the 9.1 branch
2013-02-04glsl: Support transform feedback of varying structs.Paul Berry2-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 <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-02-04glsl: Use parse_program_resource_name to parse transform feedback varyings.Paul Berry2-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 <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-02-04glsl: Rename uniform_field_visitor to program_resource_visitor.Paul Berry4-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 <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-02-04mesa/glsl: Separate parsing logic from _mesa_get_uniform_location.Paul Berry4-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 <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-02-04gallium/egl: Fix include dirs for VPATH buildQuentin Glidic1-0/+1
NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-02-04intel: make sure to setup image dimension in image_from_planar setupAbdiel Janulgue1-0/+1
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60212 Tested-by: Scott Moreau <oreaus@gmail.com> Tested-by: Tiago Vignatti <tiago.vignatti@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2013-02-04builtin_compiler/build: Don't use *_FOR_BUILD when not cross compilingMatt Turner1-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
2013-02-04st/mesa: emit SQRT opcode when driver supports itBrian Paul1-7/+21
2013-02-04gallium/drivers: handle PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED queryBrian Paul8-0/+17
Initially, only softpipe/llvmpipe support SQRT.
2013-02-04gallivm: implement support for SQRT opcodeBrian Paul3-0/+37
2013-02-04tgsi: add support for new SQRT opcodeBrian Paul4-1/+18
2013-02-04gallium: add SQRT shader opcodeBrian Paul3-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.
2013-02-04radeonsi: Remove spurious traces of R16G16B16 support.Michel Dänzer1-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.
2013-02-04radeonsi: Enable texture arrays.Michel Dänzer1-1/+1
28/30 piglit tests pass. NOTE: This is a candidate for the 9.1 branch.
2013-02-04radeonsi: Improve packing of texture address parameters.Michel Dänzer1-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.
2013-02-04radeonsi: Adapt to sample intrinsics changes.Michel Dänzer3-51/+56
Fix up intrinsic names, and bitcast texture address parameters to integers. NOTE: This is a candidate for the 9.1 branch.
2013-02-04st/mesa: simplify the update_single_texture() functionBrian Paul1-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 <maraeo@gmail.com>
2013-02-04st/mesa: merge st_ChooseTextureFormat_renderable() into st_ChooseTextureFormat()Brian Paul2-38/+21
That was the only place it was being called from.
2013-02-04st/mesa: improve the format choosing code for DrawPixelsBrian Paul1-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.
2013-02-04gallium: handle unhandled PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENTAndreas Boll7-0/+8
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60098 Signed-off-by: Brian Paul <brianp@vmware.com>
2013-02-04st/mesa: don't choose DXT formats if we can't do DXT compressionBrian Paul5-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 <jfonseca@vmware.com>
2013-02-04mesa: don't use format chooser code for glCompressedTexImageBrian Paul1-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.
2013-02-03i965: Fix the SF Vertex URB Read Length calculation for Gen7 platforms.Kenneth Graunke1-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 <stereotype441@gmail.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-03i965: Fix the SF Vertex URB Read Length calculation for Sandybridge.Kenneth Graunke1-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 <jordan.l.justen@intel.com> (v1/Piglit) Tested-by: Martin Steigerwald <martin@lichtvoll.de> (PlaneShift) Reviewed-by: Paul Berry <stereotype441@gmail.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-03i965: Compute the maximum SF source attribute.Kenneth Graunke3-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 <stereotype441@gmail.com> Tested-by: Martin Steigerwald <martin@lichtvoll.de> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-03i965: Refactor Gen6+ SF attribute override code.Kenneth Graunke1-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 <stereotype441@gmail.com> Tested-by: Martin Steigerwald <martin@lichtvoll.de> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-03glsl: Remove hash table from ir_set_program_inouts pass.Kenneth Graunke1-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 <kenneth@whitecape.org>
2013-02-03i965: Remove dead field brw_wm_prog_data::error.Kenneth Graunke1-1/+0
2013-02-03i965: Remove dead field brw_context::constant_map.Kenneth Graunke1-1/+0
This was used by the old VS backend, but that's long gone.
2013-02-01r600g: Fix memory leak.Vinson Lee1-1/+3
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-01egl/dri2: Fix memory leak.Vinson Lee1-0/+1
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-01nv30: Fix memory leak.Vinson Lee1-0/+1
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-01nv50: Fix memory leak.Vinson Lee1-0/+1
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-01nvc0: Fix memory leak.Vinson Lee1-0/+1
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-01swrast: Fix memory leak.Vinson Lee1-0/+1
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-01configure.ac: Fix --with-llvm-shared-libsQuentin Glidic1-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 <sardemff7+git@sardemff7.net>
2013-02-01r600g/llvm: Select the correct GPU type for RV670Tom Stellard1-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
2013-02-01intel: implement create image from textureAbdiel Janulgue1-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 <eric@anholt.net> (v6) Acked-by: Chad Versace <chad.versace@linux.intel.com> (v10) Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2013-02-01intel: Account for mt->offset in intel_miptree_mapAbdiel Janulgue1-2/+2
We need to take account the offset from original bo when using glTexSubImage() and other functions that manipulate the subregion of an exported texture. Offsets are appended to mapped region address and when blitting from a source region. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2013-02-01intel: Create a miptree using offsets in intel_set_texture_image_regionAbdiel Janulgue1-7/+53
When binding a region to a texture image, re-create the miptree base-level considering the offset and dimension information exported by DRIImage. v8: - Move the alignment surface address checks from the image-from-texture code to the texture-from-image side. This allows the error reporting to conform to OES_EGL_Image and to prevent mixing up EGL and GL errors. Reported by Chad Versace. - Addressed an existing issue in renderbuffer case where there is a a possibility of creating EGL images out of depthstencil textures which isn't really possible. This was spotted by Eric earlier. Reviewed-by: Eric Anholt <eric@anholt.net> (v6) Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v8) Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2013-02-01i965: Account for offsets when updating SURFACE_STATE.Abdiel Janulgue2-2/+21
If the offsets are present, this lets us specify a particular level and slice in a shared region using the base level of an exported mip-map tree. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2013-02-01intel: add pixel offset calculator for miptree levelsAbdiel Janulgue2-0/+21
Add helper to calculate fine-grained x and y adjustment pixels to an image within a miptree level for tiled regions. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2013-02-01intel: Expose intel_miptree_create_internal as intel_miptree_create_layout.Abdiel Janulgue2-14/+25
Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2013-02-01intel: expose dimensions and offsets of a miptree level in DRIImageAbdiel Janulgue1-0/+7
v8: - Append has_depthstencil field in DRIImage structure. Reviewed-by: Eric Anholt <eric@anholt.net> (v6) Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v8) Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>