summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: rework ctx->Driver.CopyTexSubImage() parametersBrian Paul2012-01-0710-149/+164
| | | | | | | | | | | Replace target, level parameters with gl_texture_image. Add gl_renderbuffer parameter to indicate source buffer for the copy. This removes some redundant code in the drivers to find the source renderbuffer and the destination texture image (which we already had in _mesa_CopyTexSubImage). Signed-off-by: Brian Paul <[email protected]>
* mesa: remove unused _mesa_unpack_uint_rgba_row() prototypeBrian Paul2012-01-071-5/+0
|
* glsl_to_tgsi: fix emission of boolean constantsBryan Cain2012-01-071-1/+1
| | | | We use 0xffffffff for true, but visit(ir_constant *) was emitting 1.
* glsl_to_tgsi: remove bad assertionBryan Cain2012-01-071-2/+1
|
* swrast: fix Z testing of points/lines for 16-bit depth buffersBrian Paul2012-01-071-7/+29
| | | | | | | We were comparing 32-bit Z buffer values against 16-bit fragment values. Need to do scaling like for the 24-bit case. Triangle Z testing was OK since it didn't hit this code path.
* swrast: s/GLbitfield/GLbitfield64/ for sw_span::arrayAttribsBrian Paul2012-01-074-6/+8
| | | | This is a bitfield of FRAG_BIT_x values so it should be 64-bits now.
* swrast: s/GLint/GLuint/ to silence MSVC signed/unsigned comparison warningBrian Paul2012-01-071-2/+2
|
* meta: add some 'f' suffixes to silence MSVC warningsBrian Paul2012-01-071-2/+2
|
* mesa: add some 'f' suffixes to silence MSVC warningsBrian Paul2012-01-071-4/+4
|
* mesa: add/update comments in _mesa_copy_buffer_subdata()Brian Paul2012-01-071-1/+4
|
* st/mesa: add support for clip vertex.Dave Airlie2012-01-072-6/+18
| | | | | | | | We need to pass the pre-projection matrix clip planes into the driver, instead of the post for the case we have a vertex shader that writes clip vertex. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: fix default interpolation for colors.Dave Airlie2012-01-071-4/+10
| | | | | | | | | | Brian mentioned that mesa-demos/reflect was broken on softpipe, by my previous commit. The problem was were blindly translating none to perspective, when color/pntc at least need it linear. this is the final version that fixes the reflect regression. Signed-off-by: Dave Airlie <[email protected]>
* i965/vs: Fix invalid array access in copy propagation.Kenneth Graunke2012-01-061-14/+15
| | | | | | | | | | | | Accessing virtual_grf_reg_map[inst->dst.reg] is invalid if inst->dst.file != GRF. Since is_direct_copy already implies a GRF destination, we can just move the check earlier. Fixes a regression in commit 07ee9f374f2946f852896e9264c7fa83eafc3f16. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44302 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove gl_framebuffer:_DepthBuffer, _StencilBuffer fieldsBrian Paul2012-01-062-12/+0
| | | | | | | | These were used by swrast to make a combined depth+stencil buffer look like separate depth and stencil buffers. But that's no longer needed after rewriting the depth/stencil code in swrast. Reviewed-by: Eric Anholt <[email protected]>
* swrast: remove s_depthstencil.[ch] filesBrian Paul2012-01-064-832/+0
| | | | | | The code is no longer used. Reviewed-by: Eric Anholt <[email protected]>
* swrast: remove calls to _swrast_update_depth/stencil_buffer()Brian Paul2012-01-061-23/+0
| | | | | | | These functions updated the gl_renderbuffer::_DepthBuffer and _StencilBuffer fields. But those fields are no longer used. Reviewed-by: Eric Anholt <[email protected]>
* i965: Turn on ARB_depth_buffer_float by default.Eric Anholt2012-01-061-2/+1
| | | | | | | | | | Everything about this that we have tests for works except for the deprecated metaops. The conclusion we came to on IRC sounded like we were OK with turning it on as long as core functionality works. The remaining failures (copypixels, drawpixels) should just be a matter of finishing the MapRenderbuffer for them. Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: Convert the glBlitFramebuffer(GL_NEAREST) path to MapRenderbuffer().Eric Anholt2012-01-061-39/+150
| | | | | | | | Fixes on i965: ARB_depth_buffer_float/fbo-depthstencil-GL_DEPTH32F_STENCIL8-blit ARB_depth_buffer_float/fbo-stencil-GL_DEPTH32F_STENCIL8-blit Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix packing of stencil bits to MESA_FORMAT_Z32_FLOAT_X24S8.Eric Anholt2012-01-061-1/+1
| | | | | | | | | We were converting our ubyte stencil value to a float. Just write it as a uint, which overwrites the X24 part of X24S8 with 0 but shouldn't matter. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Fix use of uninitialized value in rbmapping changes.Eric Anholt2012-01-061-1/+1
| | | | | | | | | I'm so surprised that gcc didn't catch this that I feel like I must be misreading. srcMap is what we initialize (along with dstMap) from this map value right after this check. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Use the fast copypixels code to implement fast glBlitFramebuffer().Eric Anholt2012-01-063-139/+46
| | | | | | | | They were meaning to do the same thing of memcpying rows, so just write the code once. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Move the check for fast_copy_pixels() ability to caller.Eric Anholt2012-01-061-9/+5
| | | | | | | | I'm going to reuse this function from glBlitFramebuffer() handling, which wants to do the same thing. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: Add sensible disasm for the JMPI instruction.Eric Anholt2012-01-061-1/+3
| | | | | | | We care about the jump distance, not that the first src is always the ip register. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen7: Enable transform feedback as long as kernel support is present.Eric Anholt2012-01-063-1/+8
| | | | | | | | | The last major issue (intervening-read) is fixed, so let's turn this on for real. The only other known issue is a hardware limitation for tesselation with flat shading. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]>
* i965/gen7: Fix up the transform feedback buffer pointers on later batches.Eric Anholt2012-01-064-3/+18
| | | | | | Fixes piglit EXT_transform_feedback/intervening-read Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen7: Flush the batch between transform feedbacks.Eric Anholt2012-01-063-3/+31
| | | | | | | | | | We need the kernel to reset our pointers to 0 in between. Note that the initialization of function pointer had to move to after InitContext since we didn't have intel->gen set up yet. Fixes piglit EXT_transform_feedback/immediate-reuse Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen7: Use the updated interface for SO write pointer resetting.Eric Anholt2012-01-063-4/+12
| | | | | | | | The new kernel patch I submitted makes the interface opt-in, so all batchbuffers aren't preceded by the 4 MI_LOAD_REGISTER_IMMs. This requires the updated i915_drm.h present in libdrm 2.4.30. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl_to_tgsi: Remove the obsolete remove_output_reads pass.Kenneth Graunke2012-01-061-84/+0
| | | | | | This is now handled by the GLSL compiler, so this code is dead. Signed-off-by: Dave Airlie <[email protected]>
* glsl_to_tgsi: Use the GLSL compiler's new remove-output-reads pass.Vincent Lejeune2012-01-061-8/+7
| | | | | | | | | | | | The existing glsl_to_tgsi::remove_output_read pass did not work properly when indirect addressing was involved; this commit replaces it with a lowering pass that occurs before TGSI code generation. Fixes varying-array related piglit tests. Signed-off-by: Vincent Lejeune <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Remove 'texelBytes' declarations that are only used in assertions.Vinson Lee2012-01-051-68/+34
| | | | | | | | This patch silences these GCC warnings. warning: unused variable 'texelBytes' Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Avoid segfault when getting an unbound transform feedback buffer name.Paul Berry2012-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | Previously we were using gl_transform_feedback_object::Buffers[i]->Name to service an indexed get request for GL_TRANSFORM_FEEDBACK_BUFFER_BINDING. However, if no buffer has been bound, gl_transform_feedback_object::Buffers[i] is NULL, so this was causing a segfault. This patch switches to using gl_transform_feedback_object::BufferNames[i], which is equal to gl_transform_feedback_object::Buffers[i]->Name if gl_transform_feedback_object::Buffers[i] is not NULL, and 0 if it is NULL. Fixes piglit test "EXT_transform_feedback/get-buffer-state indexed_binding". Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: Make use of gl_transform_feedback_info::ComponentOffset.Paul Berry2012-01-051-1/+2
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make use of gl_transform_feedback_info::ComponentOffset.Paul Berry2012-01-054-1/+19
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add gl_transform_feedback_info::ComponentOffset.Paul Berry2012-01-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using transform feedback, there are three circumstances in which it is useful for Mesa to instruct a driver to stream out just a portion of a varying slot (rather than the whole vec4): (a) When a varying is smaller than a vec4, Mesa needs to instruct the driver to stream out just the first one, two, or three components of the varying slot. (b) In the future, when we implement varying packing, some varyings will be offset within the vec4, so Mesa will have to instruct the driver to stream out an arbitrary contiguous subset of the components of the varying slot (e.g. .yzw or .yz). (c) On drivers that set gl_shader_compiler_options::LowerClipDistance, if the client requests that an element of gl_ClipDistance be streamed out using transform feedback, Mesa will have to instruct the driver to stream out a single component of one of the gl_ClipDistance varying slots. Previous to this patch, only (a) was possible, since gl_transform_feedback_info specified only the number of components of the varying slot to stream out. This patch adds gl_transform_feedback_info::ComponentOffset, which indicates which components should be streamed out. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix transform feedback of gl_ClipVertex.Paul Berry2012-01-051-5/+8
| | | | | | | | | | | | | | | | | | | | | | | Previously, on i965 Gen6 and above, we weren't allocating space for gl_ClipVertex in the VUE, since the VS was automatically converting it to clip distances. This prevented transform feedback from being able to capture gl_ClipVertex. This patch goes aheads and allocates space for gl_ClipVertex in the VUE on Gen6 and above. The old behavior is retained on Gen5 and below, since (a) transform feedback is not yet supported on those platforms, and (b) those platforms don't currently support gl_ClipVertex anyhow. Note: this constitutes a slight waste of VUE space for shaders that use gl_ClipVertex and don't use transform feedback to capture it. However, that seems preferable to making the VUE map (and all of the state that depends on it) dependent on transform feedback settings. Fixes Piglit test "EXT_transform_feedback/builtin-varyings gl_ClipVertex". Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix transform feedback of gl_PointSize.Paul Berry2012-01-052-2/+14
| | | | | | | | | | | | | | | On i965 Gen6 and above, gl_PointSize is stored in component W of the first VUE slot (which corresponds to VERT_RESULT_PSIZ in the VUE map). Normally we store varying floats in component X of a VUE slot, so we need special case logic for gl_PointSize. For Gen6, we do this with a ".wwww" swizzle in the GS. For Gen7, we shift the component mask by 3 to select the W component. Fixes Piglit test "EXT_transform_feedback/builtin-varyings gl_PointSize". Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: use memmove() instead of memcpy() in the SHIFT_ARRAY macroBrian Paul2012-01-051-1/+1
| | | | | | | | | | | The src/dst arrays would overlap but dst was less than src so a simple version of memcpy() would do the right thing. But this isn't guaranteed when memcpy() is optimized. Fixes demos/copypix when the dest region was clipped by the left side of the window. Reviewed-by: Adam Jackson <[email protected]>
* st/mesa: add support for gl_ClipDistanceBryan Cain2012-01-052-5/+61
|
* gallium: fix behavior of pipe_buffer_map_rangeMarek Olšák2012-01-052-9/+6
| | | | | | | To match what transfer_map returns. Really, subtracting the offset leads to bugs if someone expects it to work exactly like transfer_map. Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove the dead Varyings list in the program.Eric Anholt2012-01-052-6/+0
| | | | Reviewed-by: Paul Berry <[email protected]>
* mesa: Fix glGetTransformFeedbackVarying().Eric Anholt2012-01-052-27/+31
| | | | | | | | | | The current implementation was totally broken -- it was looking in an unpopulated structure for varyings, and trying to do so using the current list of varying names, not the list used at link time. v2: Fix leaking of memory into the program per re-link. Reviewed-by: Paul Berry <[email protected]>
* mesa: only map src/dest regions in _mesa_copy_buffer_subdata()Brian Paul2012-01-051-6/+7
| | | | | | | We were wastefully mapping the whole source/dest buffers before. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: print more info in buffer_object_subdata_range_good() error messageBrian Paul2012-01-051-1/+4
|
* st/mesa: 80-column wrappingBrian Paul2012-01-051-1/+2
|
* i965: Enable EXT_texture_integer by defaultIan Romanick2012-01-041-2/+1
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Acked-with-reservations-by: Eric Anholt <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa: Add missing GL_RG_INTEGER casesIan Romanick2012-01-041-0/+39
| | | | | | | | Adds two missing '|| srcFormat == GL_RG_INTEGER' in assertions and a bunch of missing pixel converions cases. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix infinite loop regression in intel_miptree_all_slices_resolve.Kenneth Graunke2012-01-041-1/+1
| | | | | | | | | | | | | Commit 0ed11e333147e280208d9d0b3ff3f39970547643 fixed a "use after free" bug by getting the next pointer before deleting the current node. Unfortunately, it also made "next" never get updated if i->need != need. Fixes infinite loops in piglit tests fbo-depth-array and fbo-depthtex. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/vs: Use the proper dimensionality for the sampler result register.Kenneth Graunke2012-01-041-1/+1
| | | | | | | | | | | | | | | | | | | textureSize() returns an int, ivec2, or ivec3, but never an ivec4. Creating the destination register as an ivec4 triggered later failures, even though the register did hold the proper values. For example, piglit test vs-textureSize-compare calls textureSize on a 2D texture and compares the result to an expected value. Unfortunately, our generated code also tried to compare the third and fourth components which were undefined, and failed. Fixes piglit test vs-textureSize-compare as well as 19 subcases of oglconform's glsl-bif-tex-size test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44339 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add missing _NEW_TEXTURE dirty bit to brw_vs_prog state atom.Kenneth Graunke2012-01-041-0/+1
| | | | | | | | | Commit d45814c925dd6c479cfd383b9b59458fc4359cf7 totally added a data dependency on _NEW_TEXTURE, even including the comment, but didn't actually add the dirty bit. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Additional error checks for transform feedback.Paul Berry2012-01-041-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | From the EXT_transform_feedback spec: The error INVALID_OPERATION is also generated by BeginTransformFeedbackEXT if no binding points would be used, either because no program object is active or because the active program object has specified no varying variables to record. ... The error INVALID_VALUE is generated by BindBufferRangeEXT or BindBufferOffsetEXT if <offset> is not word-aligned. Fixes Piglit tests: - EXT_transform_feedback/api-errors no_prog_active - EXT_transform_feedback/api-errors interleaved_no_varyings - EXT_transform_feedback/api-errors separate_no_varyings - EXT_transform_feedback/api-errors bind_offset_offset_1 - EXT_transform_feedback/api-errors bind_offset_offset_2 - EXT_transform_feedback/api-errors bind_offset_offset_3 - EXT_transform_feedback/api-errors bind_offset_offset_5 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>