summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* mesa: Fix extra memset in store_tfeedback_info()Paul Berry2012-01-051-4/+3
| | | | | | | | | | | | | | Commit 9d36c96d6ec9f2c05c8e0b9ef18c5462cddee8c1 (mesa: Fix glGetTransformFeedbackVarying()) accidentally added an extra memset() call to the store_tfeedback_info() function, causing prog->LinkedTransformFeedback.NumBuffers to be erased. This patch removes the extra memset and rearranges the other operations in store_tfeedback_info() to be in the correct order. Fixes piglit tests "EXT_transform_feedback/api-errors *unbound*" Reviewed-by: Eric Anholt <[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: add support for clip distancesBryan Cain2012-01-054-11/+39
|
* glx/dri2: print FPS when env var LIBGL_SHOW_FPS is 1 (v2)Marek Olšák2012-01-051-1/+34
| | | | | | | | | This is useful for apps which don't print FPS. Only enabled in SwapBuffers. v2: track state per drawable, use libGL prefix Reviewed-by: Michel Dänzer <[email protected]>
* r300/compiler: fix buffer underflow when setting SEM_WAIT on last instructionMarek Olšák2012-01-052-4/+4
| | | | | | Do it after we check whether inst_end != -1. Also move the code structure at the beginning of r300_fragment_shader_code to detect underflows easily with valgrind.
* u_vbuf: use cso_cache to cache vertex element statesMarek Olšák2012-01-051-10/+47
| | | | Improves performance to 28 fps in Cogs.
* u_vbuf: implement another upload codepath which unrolls indicesMarek Olšák2012-01-053-28/+121
| | | | | | | Improves performance from cca 1 fps to 23 fps in Cogs. This new codepath is not always used, instead, there is a heuristic which determines whether to use it. Using translate for uploads is generally slower than what we have had already, it's a win only in a few cases.
* u_vbuf: cleanup variable names to be consistentMarek Olšák2012-01-051-13/+11
|
* u_vbuf: cleanup the computation of how many vertices to upload/translateMarek Olšák2012-01-051-16/+23
|
* u_vbuf: convert min_index,max_index to start,countMarek Olšák2012-01-051-19/+26
|
* util: add helper function util_dump_draw_infoMarek Olšák2012-01-052-0/+34
|
* trace: dump primitive restart infoMarek Olšák2012-01-051-0/+3
|
* translate: implement translation of 10_10_10_2 typesMarek Olšák2012-01-051-0/+148
| | | | | | | | | This is for GL_ARB_vertex_type_2_10_10_10_rev. I just took the code from u_format_table.c. It's based on pack_rgba_float. I had no other choice. The u_format hooks are not exactly compatible with translate. The cleanup of it is left for future work. Reviewed-by: Dave Airlie <[email protected]>
* translate: implement translation of (pure) integer formatsMarek Olšák2012-01-051-94/+252
| | | | | | | The conversion is limited to only a few cases, because converting to any other type shouldn't happen in any driver. Reviewed-by: Dave Airlie <[email protected]>
* u_format: implement fetch_rgba_uint and fetch_rgba_sint for integer formatsMarek Olšák2012-01-053-4/+32
| | | | | | | | | | | | | Fetching int as float and vice versa is not allowed. Fetching unsigned int as signed int and vice versa is not allowed either. Doing conversions like that isn't allowed for samplers in OpenGL. The three hooks could be consolidated into one fetch hook, which would fetch uint as uint32, sint as sint32, and everything else as float. The receiving parameter would be void*. This would be useful for implementing vertex fetches for shader model 4.0, which has untyped registers. Reviewed-by: Dave Airlie <[email protected]>