summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* trace: Re-license trace.xsl under MIT license.José Fonseca2014-01-171-14/+22
| | | | | | | I was the sole author, as Tungsten Graphics employee, which was since then acquired by VMware Inc. Reviewed-by: Brian Paul <[email protected]>
* svga: fix crash when clearing null color bufferBrian Paul2014-01-171-3/+7
| | | | | | | | | | Fixes regression since 9baa45f78b8ca7d66280e36009b6a685055d7cd6 but some of the piglit fbo-drawbuffers-none tests still don't pass. v2: use the right pointer type for 'h' Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: handle NULL color buffer pointersBrian Paul2014-01-175-94/+156
| | | | | | | | | Fixes regression from 9baa45f78b8ca7d66280e36009b6a685055d7cd6 v2: incorporate a few small changes suggested by Roland. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: handle NULL color buffer pointersBrian Paul2014-01-171-93/+96
| | | | | | Fixes regression from 9baa45f78b8ca7d66280e36009b6a685055d7cd6 Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: fix large point rasterization with point_quad_rasterizationRoland Scheidegger2014-01-171-12/+19
| | | | | | | | | | The whole round-pointsize-to-int stuff must only be done with GL legacy rules (no point_quad_rasterization) or all the wrong edges are lit up. This was previously in a private branch (d3d pointsprite test complains loudly otherwise) and got lost in a merge. However, it should certainly apply to GL point sprite rasterization as well. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: add bits for clipping points as tris (d3d-style)Roland Scheidegger2014-01-179-12/+60
| | | | | | | | | | | | | | | | | | | | | | OpenGL does whole-point clipping, that is a large point is either fully clipped or fully unclipped (the latter means it may extend beyond the viewport as long as the center is inside the viewport). d3d9 (d3d10 has no large points) however requires points to be clipped after they are expanded to a rectangle. (Note some IHVs are known to ignore GL rules at least with some hw/drivers.) Hence add a rasterizer bit indicating which way points should be clipped (some drivers probably will always ignore this), and add the draw interaction this requires. Drivers wanting to support this and using draw must support large points on their own as draw doesn't implement vp clipping on the expanded points (it potentially could but the complexity doesn't seem warranted), and the driver needs to do viewport scissoring on such points. Conflicts: src/gallium/drivers/llvmpipe/lp_context.c src/gallium/drivers/llvmpipe/lp_state_derived.c Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix GL_COLOR_SUM enum for drivers without ARB_vertex_programIlia Mirkin2014-01-162-3/+1
| | | | | | | | | | | | | | | | | | | | Commit c13970808 (mesa: GL_EXT_secondary_color is not optional) changed CHECK_EXTENSION2(EXT_secondary_color, ARB_vetex_program, cap) to CHECK_EXTENSION(ARB_vertex_program, cap) However CHECK_EXTENSION2 checks that either extension is available, not both. Remove the extension check entirely since the intent was for it to always be enabled. v2: Fix glGet*(GL_COLOR_SUM) too. Suggested by Ian. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: 9.2 10.0 <[email protected]>
* llvmpipe: do constant buffer bounds checking in shadersZack Rusin2014-01-169-43/+174
| | | | | | | | | | | | | | | | | | | | It's possible to bind a smaller buffer as a constant buffer, than what the shader actually uses/requires. This could cause nasty crashes. This patch adds the architecture to pass the maximum allowable constant buffer index to the jit to let it make sure that the constant buffer indices are always within bounds. The behavior follows the d3d10 spec, which says the overflow should always return all zeros, and overflow is only defined as access beyond the size of the currently bound buffer. Accesses beyond the declared shader constant register size are not considered an overflow and expected to return garbage but consistent garbage (we follow the behavior which some wlk tests expect which is to return the actual values from the bound buffer). Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nv50, nvc0: initialize ctx->sample_mask to ~0Ilia Mirkin2014-01-162-0/+4
| | | | | | | | | | Commit 95bf222603b (cso_context: Fix cso_context::sample_mask initial value.) fixed the cso sample mask to be initialized to ~0. The cso code is also careful not to needlessly call set_sample_mask, so we ended up with the ctx->sample_mask never being set. This broke a number of EXT_framebuffer_multisample piglit tests. Signed-off-by: Ilia Mirkin <[email protected]>
* mesa/main: Free ctx->DrawIndirectBuffer during teardownAaron Watry2014-01-161-0/+2
| | | | | | | | | | | | | | | | | | ctx->DrawIndirectBuffer wasn't being free'd in _mesa_free_buffer_objects With this patch, "valgrind --leak-check=full glxgears" on evergreen (CEDAR) now shows: LEAK SUMMARY: definitely lost: 0 bytes in 0 blocks indirectly lost: 0 bytes in 0 blocks possibly lost: 0 bytes in 0 blocks still reachable: 70,228 bytes in 651 blocks suppressed: 0 bytes in 0 blocks Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* st/dri: prevent leak of dri option default valuesAaron Watry2014-01-161-0/+6
| | | | | | | v2: Change comment style CC: "10.0" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeon: Move gfx/dma cs cleanup to r600_common_context_cleanupAaron Watry2014-01-162-7/+7
| | | | | | | | | | | The radeonsi code was not cleaning up either of these items leading to leaked memory. v2: Move cleanup to r600_common_context_cleanup instead of duplicating the logic for SI CC: "10.0" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Eliminate parameters to dd_function_table::ScissorIan Romanick2014-01-159-30/+31
| | | | | | | | The i830 and i915 drivers used them, but they didn't really need to. They will just be annoying in future patches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Eliminate parameters to dd_function_table::DepthRangeIan Romanick2014-01-157-11/+7
| | | | | | | No driver uses them. They will just be annoying in future patches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Eliminate parameters to dd_function_table::ViewportIan Romanick2014-01-1510-50/+11
| | | | | | | No driver uses them. They will just be annoying in future patches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radeon: Remove dead codeIan Romanick2014-01-151-9/+0
| | | | | | | | | A future patch will rename some of the fields of gl_viewport_attrib, and I don't want to update dead code that I can't test. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: Dave Airlie <[email protected]>
* i915: Remove spurious calls to DepthRangeIan Romanick2014-01-152-9/+2
| | | | | | | | | For both i830 and i915, the driver DepthRange function just calls intelCalcViewport. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: Eric Anholt <[email protected]>
* mesa: Add COMPRESSED_RGBA_S3TC_DXT1_EXT to COMPRESSED_TEXTURE_FORMATS for GLESIan Romanick2014-01-151-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ES and desktop GL specs diverge here. Yay! In desktop OpenGL, the driver can perform online compression of uncompressed texture data. GL_NUM_COMPRESSED_TEXTURE_FORMATS and GL_COMPRESSED_TEXTURE_FORMATS give the application a list of formats that it could ask the driver to compress with some expectation of quality. The GL_ARB_texture_compression spec calls this "suitable for general-purpose usage." As noted above, this means GL_COMPRESSED_RGBA_S3TC_DXT1_EXT is not included in the list. In OpenGL ES, the driver never performs compression. GL_NUM_COMPRESSED_TEXTURE_FORMATS and GL_COMPRESSED_TEXTURE_FORMATS give the application a list of formats that the driver can receive from the application. It is the *complete* list of formats. The GL_EXT_texture_compression_s3tc spec says: "New State for OpenGL ES 2.0.25 and 3.0.2 Specifications The queries for NUM_COMPRESSED_TEXTURE_FORMATS and COMPRESSED_TEXTURE_FORMATS include COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT3_EXT, and COMPRESSED_RGBA_S3TC_DXT5_EXT." Note that the addition is only to the OpenGL ES specification! Signed-off-by: Ian Romanick <[email protected]> See-also: http://lists.freedesktop.org/archives/mesa-dev/2013-October/047439.html Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "10.0" <[email protected]>
* scons: add new shaderimage.c file to the buildBrian Paul2014-01-151-0/+1
|
* clover: Fix clover::keys and ::values to deal with r-value references properly.Francisco Jerez2014-01-151-6/+6
| | | | | | | | Returning a reference is incorrect if the specified pair was a temporary -- Instead of that, use decltype() to deduce the correct return type qualifiers. Fixes a crash in clCreateProgramWithBinary(). Reported-and-tested-by: "Dorrington, Albert" <[email protected]>
* clover: Don't try to build programs created from a binary again.Francisco Jerez2014-01-152-19/+22
| | | | | | | | According to the spec it's allowed to call clBuildProgram() on a program created from a user-specified binary. We don't need to do anything to build the program in that case. Reported-and-tested-by: "Dorrington, Albert" <[email protected]>
* clover: Add missing fields to the clover::module serialization code.Francisco Jerez2014-01-151-0/+3
| | | | Tested-by: "Dorrington, Albert" <[email protected]>
* clover: Store map result into a temporary vector in clCreateProgramWithBinary.Francisco Jerez2014-01-151-1/+1
| | | | | | | This avoids the inefficient multiple evaluation of the map result in the code below. It should cause no functional changes. Tested-by: "Dorrington, Albert" <[email protected]>
* docs: Mark ARB_shader_image_load_store as work in progress.Francisco Jerez2014-01-151-1/+1
| | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Validate image units when the texture state changes.Francisco Jerez2014-01-153-0/+23
| | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Unbind deleted textures from the shader image units.Francisco Jerez2014-01-151-0/+25
| | | | | | | | | | | | From ARB_shader_image_load_store: If a texture object bound to one or more image units is deleted by DeleteTextures, it is detached from each such image unit, as though BindImageTexture were called with <unit> identifying the image unit and <texture> set to zero. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Add image parameter queries for ARB_shader_image_load_store.Francisco Jerez2014-01-153-0/+85
| | | | | | | v2: Fix off-by-one error in index parameter bound checking. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Add ARB_shader_image_load_store to the extension table.Francisco Jerez2014-01-152-0/+2
| | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glapi: Update dispatch XML files for ARB_shader_image_load_store.Francisco Jerez2014-01-154-2/+94
| | | | | | | And uncomment the relevant lines of the dispatch sanity test. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Implement the GL entry points defined by ARB_shader_image_load_store.Francisco Jerez2014-01-154-0/+521
| | | | | | | | | | v2: Name image format classes consistently, fix array and 3D teximage selection with layered = GL_FALSE, make sure that the user-specified layer is less than the number of texture layers, add some asserts. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Add MESA_FORMAT_SIGNED_RG88 and _RG1616.Francisco Jerez2014-01-156-15/+153
| | | | | | | | | | | | Including pack/unpack and texstore code. ARB_shader_image_load_store requires support for the GL_RG8_SNORM and GL_RG16_SNORM formats, which map to MESA_FORMAT_SIGNED_GR88 and MESA_FORMAT_SIGNED_GR1616 on little-endian hosts, and MESA_FORMAT_SIGNED_RG88 and MESA_FORMAT_SIGNED_RG1616 respectively on big-endian hosts -- only the former were already present, add support for the latter. Acked-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Add MESA_FORMAT_ABGR2101010.Francisco Jerez2014-01-156-0/+134
| | | | | | | | Including pack/unpack and texstore code. This texture format is a requirement for ARB_shader_image_load_store. Acked-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Add driver interface for ARB_shader_image_load_store.Francisco Jerez2014-01-151-0/+13
| | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Add state data structures required for ARB_shader_image_load_store.Francisco Jerez2014-01-154-0/+108
| | | | | | | | v2: Increase MAX_IMAGE_UNITS to what i965 wants and add a separate MAX_IMAGE_UNIFORMS define, clarify a couple of comments. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Define helper function to get the number of texture layers.Francisco Jerez2014-01-152-0/+93
| | | | | | | | | | | And to check if it can have layers at all. This will be used by the implementation of ARB_shader_image_load_store. v2: Fix constness of texobj argument, use assert and return reasonable default rather than calling unreachable() in default switch case. Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use signed temporary variable to store _ColorDrawBufferIndexesEmil Velikov2014-01-151-1/+1
| | | | | | | | | | | The temporary variable used to store _ColorDrawBufferIndexes must be signed (GLint), otherwise the following conditional will be incorrectly evaluated. Leading to crashes in the driver/mesa or accessing/writing to arbitrary memory location. The bug dates back to 2009. Cc: 10.0 9.2 9.1 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* automake: include the git sha in the opengl version string for oot buildsEmil Velikov2014-01-151-6/+6
| | | | | | Acked-by: Chad Versace <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* mesa: use signed temporary variable to store _ColorDrawBufferIndexesEmil Velikov2014-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | _ColorDrawBufferIndexes is defined as GLint* and using a GLuint* will result in the first part of the conditional to be evaluated to true always. Unintentionally introduced by the following commit, this will result in a driver segfault if one is using an old version of the piglit test bin/clearbuffer-mixed-format -auto -fbo commit 03d848ea1003abefd8fe51a5b4a780527cd852af Author: Marek Olšák <[email protected]> Date: Wed Dec 4 00:27:20 2013 +0100 mesa: fix interpretation of glClearBuffer(drawbuffer) This corresponding piglit tests supported this incorrect behavior instead of pointing at it. Cc: Marek Olšák <[email protected]> Cc: 10.0 9.2 9.1 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* nouveau: add framebuffer validation callbackIlia Mirkin2014-01-152-0/+52
| | | | | | | | | | Fixes assertions when trying to attach textures to fbs with formats not supported by the render engines. See https://bugs.freedesktop.org/show_bug.cgi?id=73459 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* clover: Use cl_ulong in the maximum allocation size calculation to avoid ↵Francisco Jerez2014-01-141-1/+1
| | | | overflow.
* i965: Emit 3DSTATE_VF on Broadwell too.Kenneth Graunke2014-01-141-1/+1
| | | | | | | It's not just for Haswell. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Disable workaround flush for push constants on Broadwell.Kenneth Graunke2014-01-141-1/+1
| | | | | | | | If it wasn't necessary for Haswell, it's likely not to be necessary for Broadwell either. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Enable native ETC texture support on Broadwell.Kenneth Graunke2014-01-141-1/+1
| | | | | | | Broadwell, like Baytrail, has native ETC texture support. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* ilo: handle NULL renderbuffers correctlyChia-I Wu2014-01-146-27/+45
| | | | Renderbuffers may be NULL since 9baa45f78b8ca7d66280e36009b6a685055d7cd6.
* ilo: disable HiZ for misaligned levelsChia-I Wu2014-01-144-82/+215
| | | | | | | | | | | | | | We need to disable HiZ for non-8x4 aligned levels, except for level 0, layer 0. For the very first layer we can adjust Width and Height fields of 3DSTATE_DEPTH_BUFFER to make it aligned. Specifically, add ILO_TEXTURE_HIZ and set the flag only for properly aligned levels. ilo_texture_can_enable_hiz() is updated to check for the flag. In tex_layout_validate(), align the depth bo to 8x4 so that we can adjust Width/Height of 3DSTATE_DEPTH_BUFFER without introducing out-of-bound access. Finally in rectlist blitter, add the ability to adjust 3DSTATE_DEPTH_BUFFER.
* ilo: use a helper to determine if HiZ is enabledChia-I Wu2014-01-145-8/+19
| | | | | Add ilo_texture_can_enable_hiz and replace all checks for tex->hiz.bo by calls to ilo_texture_can_enable_hiz().
* ilo: decide on hiz first in texture allocationChia-I Wu2014-01-141-64/+64
| | | | | | | | | Add tex_layout_init_hiz() before tex_layout_init_format() to decide whether HiZ should be enabled. On GEN6, because of layer offsetting, HiZ is enabled only when the texture is non-mipmapped and non-array. PIPE_USAGE_STAGING is also taken as a hint to disable HiZ.
* ilo: emit gen7_wa_pipe_control_wm_max_threads_stall on HaswellChia-I Wu2014-01-141-7/+9
| | | | | | | Rename the workaround, as it is for 3DSTATE_PS instead of 3DSTATE_WM, and emit it on Haswell too. This does not fix any app, but an assertion failure.
* ilo: use HALIGN_4 on GEN7 for depth buffersChia-I Wu2014-01-141-11/+1
| | | | The comment was no longer true since 6642381e7513926b847d6bc10bf590e1c0c54859.
* ilo: OOM for HiZ is fatal on GEN6Chia-I Wu2014-01-141-2/+7
| | | | On GEN6, HiZ and Separate Stencil Buffer must be enabled at the same time.