summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* radeon/llvm: use bitcasts for integersVadim Girlin2012-05-083-5/+73
| | | | | | | | | We're using float as default type, so basically for every instruction that wants other types for dst/src operands we need to perform the bitcast to/from default float. Currently bitcast produces no-op MOV instruction, will be eliminated later. Signed-off-by: Vadim Girlin <[email protected]>
* r600g: Fix out of tree builds that use the LLVM backendTom Stellard2012-05-071-1/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=49567
* radeon/llvm: Remove references to DebugFlag and isCurrentDebugType()Tom Stellard2012-05-074-22/+3
| | | | | | | These weren't being used at all and they were causing build failures when LLVM was built with NDEBUG defined and mesa was not. https://bugs.freedesktop.org/show_bug.cgi?id=49110
* i965/Gen7: Work around GPU hangs due to misaligned depth coordinate offsets.Paul Berry2012-05-072-0/+54
| | | | | | | | | | | | | | | | | | | | In i965 Gen7, Mesa has for a long time used the "depth coordinate offset X/Y" settings (in 3DSTATE_DEPTH_BUFFER) to cause the GPU to render to miplevels other than 0. Unfortunately, this doesn't work, because these offsets must be aligned to multiples of 8, and miplevels in the depth buffer are only guaranteed to be aligned to multiples of 4. When the offsets aren't aligned to a multiple of 8, the GPU sometimes hangs. As a temporary measure, to avoid GPU hangs, this patch smashes the 3 LSB's of "depth coordinate offset X/Y" to 0. This results in incorrect rendering to mipmapped depth textures, but that seems like a reasonable stopgap while we figure out a better solution. Avoids GPU hangs in piglit test "depthstencil-render-miplevels" at texture sizes that are not powers of 2. Reviewed-by: Chad Verace <[email protected]>
* i965/Gen6: Work around GPU hangs due to misaligned depth coordinate offsets.Paul Berry2012-05-072-0/+54
| | | | | | | | | | | | | | | | | | | | | | | In i965 Gen6, Mesa has for a long time used the "depth coordinate offset X/Y" settings (in 3DSTATE_DEPTH_BUFFER) to cause the GPU to render to miplevels other than 0. Unfortunately, this doesn't work, because these offsets must be aligned to multiples of 8, and miplevels in the depth buffer are only guaranteed to be aligned to multiples of 4. When the offsets aren't aligned to a multiple of 8, the GPU sometimes hangs. As a temporary measure, to avoid GPU hangs, this patch smashes the 3 LSB's of "depth coordinate offset X/Y" to 0. This results in incorrect rendering to mipmapped depth textures, but that seems like a reasonable stopgap while we figure out a better solution. (Note that we have only ever observed this GPU hang on Gen6 when HiZ is enabled, so another possible stopgap would be to disable HiZ). Avoids GPU hangs in piglit test "depthstencil-render-miplevels" at texture sizes that are not powers of 2. Reviewed-by: Chad Verace <[email protected]>
* fbo: Only reuse depth/stencil attachments if the parameters match.Paul Berry2012-05-071-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user attaches a texture to one of the depth/stencil attachment points (GL_STENCIL_ATTACHMENT or GL_DEPTH_ATTACHMENT), we check to see if the same texture is also attached to the other attachment point, and if so, we re-use the existing texture attachment. This is necessary to ensure that if the user later queries what is attached to GL_DEPTH_STENCIL_ATTACHMENT, they will not receive an error. If, however, the user attaches buffers to the two different attachment points using different parameters (e.g. a different miplevel), then we can't re-use the existing texture attachment, because it is pointing to the wrong part of the texture. This might occur as a transitory condition if, for example, if the user attached miplevel zero of a texture to GL_STENCIL_ATTACHMENT and GL_DEPTH_ATTACHMENT, rendered to it, and then later attempted to attach miplevel one of the same texture to GL_STENCIL_ATTACHMENT and GL_DEPTH_ATTACHMENT. This patch causes Mesa to check that GL_STENCIL_ATTACHMENT and GL_DEPTH_ATTACHMENT use the same attachment parameters before attempting to share the texture attachment. On i965 Gen6, fixes piglit tests "texturing/depthstencil-render-miplevels 1024 depth_stencil_shared" and "texturing/depthstencil-render-miplevels 1024 stencil_depth_shared". Reviewed-by: Chad Versace <[email protected]>
* i965: Fix mipmap offsets for HiZ and separate stencil buffers.Paul Berry2012-05-078-60/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rendering to a miplevel other than 0 within a color, depth, stencil, or HiZ buffer, we need to tell the GPU to render to an offset within the buffer, so that the data is written into the correct miplevel. We do this using a coarse offset (in pages), and a fine adjustment (the so-called "tile_x" and "tile_y" values, which are measured in pixels). We have always computed the coarse offset and fine adjustment using intel_renderbuffer_tile_offsets() function. This worked fine for color and combined depth/stencil buffers, but failed to work properly when HiZ and separate stencil were in use. It failed to work because there is only one set of fine adjustment controls shared by the HiZ, depth, and stencil buffers, so we need to choose tile_x and tile_y values that are compatible with the tiling of all three buffers, and then compute separate coarse offsets for each buffer. This patch fixes the HiZ and separate stencil case by replacing the call to intel_renderbuffer_tile_offsets() with calls to two functions: intel_region_get_tile_masks(), which determines how much of the adjustment can be performed using offsets and how much can be performed using tile_x and tile_y, and intel_region_get_aligned_offset(), which computes the coarse offset. intel_region_get_tile_offsets() is still used for color renderbuffers, so to avoid code duplication, I've re-worked it to use intel_region_get_tile_masks() and intel_region_get_aligned_offset(). On i965 Gen6, fixes piglit tests "texturing/depthstencil-render-miplevels 1024 X" where X is one of (depth, depth_and_stencil, depth_stencil_single_binding, depth_x, depth_x_and_stencil, stencil, stencil_and_depth, stencil_and_depth_x). On i965 Gen7, the variants of "texturing/depthstencil-render-miplevels" that contain a stencil buffer still fail, due to another problem: Gen7 seems to ignore the 3 LSB's of the tile_y adjustment (and possibly also tile_x). v2: Removed spurious comments. Added assertions to check preconditions of intel_region_get_aligned_offset(). Reviewed-by: Chad Versace <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* intel: Disable ARB_framebuffer_object in ES contextsChad Versace2012-05-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes ARB_framebuffer_object from the GLES1 and GLES2 extension lists in intel_extensions_es.c. Fixes a crash in the Android browser on Ice Cream Sandwich. The Android browser crashed because it did the following, which is legal in GLES2 but not in ARB_framebuffer_object. glGenFramebuffers(1, &fb); glBindFramebuffer(GL_FRAMEBUFFER, fb); // render render render... glDeleteFramebuffers(1, &fb); // go do other stuff... glBindFramebuffer(GL_FRAMEBUFFER, fb); // This bind unexpectedly failed, and the app panics. The semantics of glBindFramebuffer specified by ARB_framebuffer_object (a desktop GL extension) and GLES2 specs are incompatible. The ideal solution to fix this is to create separate API entry points for glBindFramebuffer, one for GL and the other for GLES2. But, until that work is complete, disabling ARB_framebuffer_object in GLES2 contexts safely fixes the problem. Likewise, the semantics of glBindFramebuffer in ARB_framebuffer_object and of glBindFramebufferOES in OES_framebuffer_object (a GLES1 extension) are incompatible. Even though the functions have different names, the semantic difference still results in a bug because both API calls are implemented by a single function, _mesa_BindFramebufferEXT, which handles the semantic difference incorrectly. Again, disabling ARB_framebuffer_object in GLES1 contexts safely fixes this problem. According to the ARB_framebuffer_object spec, the extension is an amalgamation of EXT_framebuffer_object EXT_framebuffer_blit EXT_packed_depth_stencil EXT_framebuffer_multisample By disabling this extension, however, no functionality is removed from GLES1 and GLES2 contexts because 1) the first three extensions are explicitly enabled in Intel's ES extension lists and 2) no functionality of the last extension is exposed in an ES context. Note: This is a candidate for the 8.0 branch. See-also: http://www.mail-archive.com/[email protected]/msg21006.html CC: Charles Johnson <[email protected]> CC: Sean Kelley <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* nv50: handle VP without inputsMarcin Slusarz2012-05-071-0/+11
|
* nvc0/ir: allow abs,neg source modifiers with ceil,floor,truncChristoph Bumiller2012-05-061-0/+3
|
* nv50/ir/opt: don't lose saturation in tryCollapseChainedMULsChristoph Bumiller2012-05-061-2/+3
|
* nvc0/ir: fix lowering of textureGradChristoph Bumiller2012-05-063-12/+13
|
* nouveau: fix nouveau_scratch_runout_release bo count underflowChristoph Bumiller2012-05-061-1/+3
|
* mesa: Add primitive restart support to glArrayElementJordan Justen2012-05-051-1/+9
| | | | | | | | | | When primitive restart is enabled, and glArrayElement is called with the restart index value, then call glPrimitiveRestartNV. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul<[email protected]>
* auxiliary/os: Add missing signal.h include.Baldo Davide2012-05-051-0/+1
| | | | | | | | The signal.h include was missed in the commit bc16c73407d11bb6702cf7de9925bfaeb80a5272 which leads to broken compilations under Linux. Signed-off-by: José Fonseca <[email protected]>
* intel: Remove pointless software fallback for glBitmap on Gen6.Kenneth Graunke2012-05-041-4/+0
| | | | | | | | | | We already have a meta path below that works just fine; no apparent regressions in oglconform. NOTE: This is a candidate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46834 Reviewed-by: Chad Versace <[email protected]>
* glsl: Fix regression in function out-parameter lvalue detection.Eric Anholt2012-05-041-14/+14
| | | | | | | | | | When doing the var->assigned change in f2475ca424f7e001be50f64dafa5700f6603d684, I overzealously indented the second block of code into the "if (var)" test. Revert these blocks to the way they were before, just taking advantage of "var" to avoid re-calling variable_referenced(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49066
* mesa: Prevent buffer underrun when handling MESA_GL_EXTENSION_OVERRIDE.Eric Anholt2012-05-041-1/+1
|
* i965/fs: Fix regression in comparison handling from ANDs change.Eric Anholt2012-05-042-0/+18
| | | | | | | I had fixed up the logic ops for delayed ANDing, but not equality comparisons on bools. Fixes new piglit fs-bool-less-compare-true. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48629
* glsl: Don't consider unused FS out variables as being statically assigned.Eric Anholt2012-05-041-3/+3
| | | | | | | | I only considered var->assigned for FragColor and FragData, but ignored when it was false for out vars. Fixes piglit write-gl_FragColor-and-not-user-output.frag Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49068
* i965: Add a comment about the state flag for sRGBEnabled.Eric Anholt2012-05-042-4/+10
| | | | I thought this might be _NEW_COLOR, but it isn't.
* intel: Return success when asked to allocate a 0-width/height renderbuffer.Eric Anholt2012-05-041-0/+3
| | | | | | | | | | | | | It seems silly that GL lets you allocate these given that they're framebuffer attachment incomplete, but the webgl conformance tests actually go looking to see if the getters on 0-width/height depth/stencil renderbuffers return good values. By failing out here, they all got smashed to 0, which turned out to be correct for all the getters they tested except for GL_RENDERBUFFER_INTERNAL_FORMAT. Now, by succeeding but not making a miptree, that one also returns the expected value. Acked-by: Kenneth Graunke <[email protected]>
* glsl: Always copy the index when cloning a variable.Eric Anholt2012-05-041-6/+1
| | | | | | | | The index is also used for GL_ARB_blend_func_extended. Cloning in i965 was dropping a non-ARB_explicit_attrib_location index. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* i965: Add support for GL_ARB_draw_buffers_blend.Eric Anholt2012-05-042-6/+10
| | | | | | Tested with piglit fbo-draw-buffers-blend and intel oglconform. Reviewed-by: Kenneth Graunke <[email protected]>
* nv50: fix typo causing NULL-deref in nv50_resource_resolveChristoph Bumiller2012-05-041-1/+1
| | | | Introduced in b328949a37fee7b0f68ed3e068ffc4426c083042.
* nv50/ir: move expansion of IMUL to later stage and handle memory operandsChristoph Bumiller2012-05-044-17/+51
|
* nv50: implement stream outputChristoph Bumiller2012-05-0412-33/+468
|
* nv50: enable array texturesChristoph Bumiller2012-05-042-3/+4
|
* svga: specify 4-byte aligned vertex elementsBrian Paul2012-05-041-1/+2
| | | | | | | We haven't found a case where this is needed, but it would be prudent for some hosts, per Jose. Reviewed-by: José Fonseca <[email protected]>
* gallivm: fix comment typoBrian Paul2012-05-041-1/+1
|
* mesa: do more teximage error checking for generic compressed formatsBrian Paul2012-05-041-2/+30
| | | | | | | | | | | | When glTexImage or glCopyTexImage is called with internalFormat being a generic compressed format (like GL_COMPRESSED_RGB) we need to do the same error checks as for specific compressed formats. In particular, check if the texture target is compatible with the format. None of the texture compression formats we support so far work with GL_TEXTURE_1D, for example. See also https://bugs.freedesktop.org/show_bug.cgi?id=49124 NOTE: This is a candidate for the 8.0 branch.
* scons: Do not build EGL on Solaris.Vinson Lee2012-05-032-3/+3
| | | | | | | The current EGL headers do not support Solaris. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* darwin: Use ASL for loggingJeremy Huddleston2012-05-035-21/+183
| | | | Signed-off-by: Jeremy Huddleston <[email protected]>
* darwin: Make reported errors more user-friendlyJeremy Huddleston2012-05-031-9/+10
| | | | Signed-off-by: Jeremy Huddleston <[email protected]>
* darwin: Fix an error messageJeremy Huddleston2012-05-031-1/+1
| | | | Signed-off-by: Jeremy Huddleston <[email protected]>
* egl_dri2: Fix out of tree builds with the wayland backend enabledRobert Hooker2012-05-031-0/+1
| | | | | | | | | | | Otherwise it fails like so: CC egl_dri2.lo In file included from egl_dri2.h:40:0, from egl_dri2.c:42: ../../../../../../src/egl/wayland/wayland-drm/wayland-drm.h:8:41: fatal error: wayland-drm-server-protocol.h: No such file or directory compilation terminated.
* gbm: Add gbm_bo_write entry pointKristian Høgsberg2012-05-036-2/+78
| | | | | | | | | | | | | | | | This new gbm entry point allows writing data into a gbm bo. The bo has to be created with the GBM_BO_USE_WRITE flag, and it's only required to work for GBM_BO_USE_CURSOR_64X64 bos. The gbm API is designed to be the glue layer between EGL and KMS, but there was never a mechanism initialize a buffer suitable for use with KMS hw cursors. The hw cursor bo is typically not compatible with anything EGL can render to, and thus there's no way to get data into such a bo. gbm_bo_write() fills that gap while staying out of the efficient cpu->gpu pixel transfer business. Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
* r600g/llvm: Mask write of pred_inst in llvm_if()Tom Stellard2012-05-031-0/+1
|
* r600g/llvm: Lower ULT A, B, C to SETGT_UINT A, C, BTom Stellard2012-05-031-0/+7
|
* r600g: Print integer values of literal constants in shader dumpsTom Stellard2012-05-031-1/+2
|
* r600g: Add support for reading BREAK_LOGICALZ_i32 from bytestreamTom Stellard2012-05-032-0/+5
|
* r600g/llvm: Don't duplicate R600 intrinsics installed by LLVMTom Stellard2012-05-034-0/+26
| | | | | | | At this point, in order for OpenCL to work correctly with r600g, OpenCL specific intrinsics need to be defined in the LLVM tree. So, we need to check for these intrinsics in the LLVM include directory to make sure not to re-define them.
* r600g: Fix the evergreen offset/end register definitionsTom Stellard2012-05-021-9/+5
|
* glsl: report errors via GL_ARB_debug_outputDylan Noblesmith2012-05-023-0/+21
| | | | Reviewed-by: Brian Paul <[email protected]>
* glsl: add gl_context memberDylan Noblesmith2012-05-022-2/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: add _mesa_shader_debug()Dylan Noblesmith2012-05-022-0/+46
| | | | | | | | | This should be the one entrypoint libglsl needs for GL_ARB_debug_output. v2: added comments. Reviewed-by: Brian Paul <[email protected]>
* glsl: consolidate error/warning codeDylan Noblesmith2012-05-021-14/+23
| | | | | | | | And lay the groundwork for GL_ARB_debug_output. v2: Add descriptive comments. Reviewed-by: Brian Paul <[email protected]>
* radeon/llvm: Fix MachineInstr dumpTom Stellard2012-05-022-8/+9
|
* r600g: fixed the bug with VTX fetches in TEX clauses for evergreenAdam Rak2012-05-021-7/+6
| | | | Signed-off-by: Tom Stellard <[email protected]>
* winsys/radeon: Get max_pipes from the kernelTom Stellard2012-05-022-0/+11
| | | | Signed-off-by: Tom Stellard <[email protected]>