summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* util: add debug_warn_once() macroBrian Paul2012-01-071-0/+19
| | | | Emits a warning message, but only once to avoid tons of repeated warnings.
* draw: whitespace fixes, etc.Brian Paul2012-01-074-173/+160
|
* gallium: make vbuf_render::set_primitive() return voidBrian Paul2012-01-079-52/+27
| | | | All the implementations of this function always return TRUE.
* svga: fix assorted whitespace issues, add copyright commentBrian Paul2012-01-073-78/+85
|
* svga: add switch cases for PIPE_SHADER_CAP_OUTPUT_READBrian Paul2012-01-071-0/+4
| | | | | Silences unhandled switch case warning. Return 0 since we don't want to read from output regs.
* mesa: add/update comments in _mesa_copy_buffer_subdata()Brian Paul2012-01-071-1/+4
|
* u_vbuf: don't unroll indices if mapping vertex buffers blocksMarek Olšák2012-01-071-1/+35
|
* draw: fix missing include for u_format.Dave Airlie2012-01-071-0/+1
| | | | Signed-off-by: Dave Airlie <[email protected]>
* 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]>
* gallium: add new semantic for clip vertex.Dave Airlie2012-01-072-2/+4
| | | | | | This is to match the gl_ClipVertex output from GLSL 1.20. Signed-off-by: Dave Airlie <[email protected]>
* draw: don't translate non-floats to float.Dave Airlie2012-01-071-0/+22
| | | | | | | | translate signed/unsigned integers to coresponding uint/sint r32g32b32a32 types. This fixes a bunch of piglit tests. 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]>
* glsl/builtins: Add missing mix(genType, genType, bvec) built-ins.Kenneth Graunke2012-01-063-1/+11
| | | | | | | | | | | | The IR for mix(float, float, bool) was missing a write mask, causing the IR reader to die horribly. Furthermore, I neglected to add any of the new prototypes to the 1.30 profiles. Fixes oglconform's glsl-bif-com advanced.mix test cases. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44477 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[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]>
* configure.ac: Remove unused GLUT substitutions.Kenneth Graunke2012-01-061-4/+0
| | | | | | | GLUT was removed from the main tree a while ago; nothing uses these substitutions. Reviewed-by: Matt Turner <[email protected]>
* glsl: Don't mark assignment temporaries as read-onlyIan Romanick2012-01-061-5/+0
| | | | | | | | | | | | | | | The various l-value errors this was designed to catch are now caught by other means. Marking the temporaries as read-only now just prevents sensible error messages from being generated. It's 0:0(0): error: function parameter 'out p' references the read-only variable '_post_incdec_tmp' versus 0:13(5): error: function parameter 'out p' references a post-decrement operation Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Emit extra errors for l-value violations in 'out' or 'inout' parametersIan Romanick2012-01-061-4/+59
| | | | | | | | | | Somethings, like pre-increment operations, were not previously caught. After the 8.0 release, this code needs some major refactoring and clean-up. It's a mess. :( Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42755
* glsl: Emit errors for assignments to non-l-value expressionsIan Romanick2012-01-061-7/+22
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42755
* glsl: Track descriptions of some expressions that can't be l-valuesIan Romanick2012-01-063-0/+19
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[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-064-5/+13
| | | | | | | | 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]>
* r600g: remove obsolete MULTIWRITE commentAlex Deucher2012-01-061-1/+0
| | | | | | fs writes all is implemented in the shader on eg+. Signed-off-by: Alex Deucher <[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]>
* glsl: Add a lowering pass to remove reads of shader output variables.Vincent Lejeune2012-01-063-0/+143
| | | | | | | | | This is similar to Gallium's existing glsl_to_tgsi::remove_output_read lowering pass, but done entirely inside the GLSL compiler. Signed-off-by: Vincent Lejeune <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* draw: fix piglit base vertex + user vertex array testsDave Airlie2012-01-061-1/+1
| | | | | | | | | | | | | This fixes draw-elements-base-vertex user_varrays draw-elements-instanced-base-vertex user_varrays for softpipe with no llvm support (DRAW_USE_LLVM=false) I'm not sure if this is the correct answer, but these tests were showing a max_index of 7, then trying to fetch up to 43, maybe it should be fixing max_index earlier somewhere to take care of this. Signed-off-by: Dave Airlie <[email protected]>
* Strip LLVM svn rev from `llvm-config --version` output.ojab2012-01-051-1/+1
| | | | Reviewed-by: Vinson Lee <[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: Fix transform feedback of unsubscripted arrays.Paul Berry2012-01-051-45/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not explicitly stated in the GL 3.0 spec that transform feedback can be performed on a whole varying array (without supplying a subscript). However, it seems clear from context that this was the intent. Section 2.15 (TransformFeedback) says this: When writing varying variables that are arrays, individual array elements are written in order. And section 2.20.3 (Shader Variables), says this, in the description of GetTransformFeedbackVarying: For the selected varying variable, its type is returned into type. The size of the varying is returned into size. The value in size is in units of the type returned in type. If it were not possible to perform transform feedback on an unsubscripted array, the returned size would always be 1. This patch fixes the linker so that transform feedback on an unsubscripted array is supported. Fixes piglit tests "EXT_transform_feedback/builtin-varyings gl_ClipDistance[{4,8}]-no-subscript" and "EXT_transform_feedback/output_type *[2]-no-subscript". Note: on back-ends that set gl_shader_compiler_options::LowerClipDistance (for example i965), tests "EXT_transform_feedback/builtin-varyings gl_ClipDistance[{1,2,3,5,6,7}]" still fail. I hope to address this in a later patch. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* Add .gitignore files to exclude unit test build artifacts from gitPaul Berry2012-01-053-0/+6
| | | | | | | | | | | | | | | | | | | | With the addition of unit tests in commit 3ef3ba4d2eee36f64062a21ce030c3f4d8c4cac4, several additional build artifacts are created: bin/depcomp bin/missing tests/Makefile tests/Makefile.in tests/glx/Makefile tests/glx/Makefile.in tests/glx/.deps/ tests/glx/.gitignore This patch adds all of these files to .gitignore. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[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]>
* mesa: Fix transform feedback of gl_ClipDistance.Paul Berry2012-01-051-18/+41
| | | | | | | | | | | | | | On drivers that set gl_shader_compiler_options::LowerClipDistance (for example i965), references to gl_ClipDistance (a float[8] array) will be converted to references to gl_ClipDistanceMESA (a vec4[2] array). This patch modifies the linker so that requests for transform feedback of gl_ClipDistance are similarly converted. Fixes Piglit test "EXT_transform_feedback/builtin-varyings gl_ClipDistance". Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make tfeedback_decl::var_name a const char *.Paul Berry2012-01-051-1/+1
| | | | 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-052-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>