summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GLES2: upgrade gl2ext.h to version 18099Kristian Høgsberg2012-07-042-22/+398
| | | | | | | | | | | | | | | Redo this commit, and remove the inclusion of gl2ext.h from src/mapi/glapi/glapi_priv.h. The include was added in 8f3be339850ead96f9c6200db4e0db1f74e39d13 to fix a missing prototype for glDrawBuffersNV and others, but it's not possible to include both glext.h and gl2ext.h from the same file. I don't see the missing prototype here (with or without shared glapi) so I'm just removing the offending #include. Also, since we're redoing this, update to the most recent gl2ext.2. Signed-off-by: Kristian Høgsberg <[email protected]>
* mesa/st: gl_ClipDistance must be interpolated in 3d space.Olivier Galibert2012-07-041-2/+2
| | | | | | | | | | | That old bug was hidden but the clipper always interpolating in 3d space no matter what it should have been doing. Now that the interpolation has been fixed, the bug shows up. Fixes fdo 51364. Signed-off-by: Olivier Galibert <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* gallium/util: Save and restore vertex buffer state in util_gen_mipmap.Stuart Abercrombie2012-07-041-0/+2
| | | | | | | | | | | | | Calling glGenerateMipmap could overwrite vertex buffer state, leading to incorrect rendering or crashes depending on the Gallium driver. This was happening on WebGL Conformance test texture-size. Before 784dd51198433e5c299da4a7742c68d21d68d1c1 this was covered up by redundant vertex buffer validation. Reviewed-by: Stéphane Marchesin <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* Revert "GLES2: upgrade gl2ext.h to version 16994."Marek Olšák2012-07-041-372/+12
| | | | | | | | | | | | | | | | This reverts commit 8818b88748bde6de5a4a98ad237c85151b44c774. I get a lot of errors like this one: In file included from ../../../src/mapi/glapi/glapi_priv.h:49:0, from glapi_dispatch.c:40: ../../../include/GLES2/gl2ext.h:1074:28: error: redefinition of typedef ‘PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC’ ../../../include/GL/glext.h:10237:25: note: previous declaration of ‘PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC’ was here This with a clean build (with git clean -fdX). I don't get the errors on my other machine. I didn't investigate why, a wild guess is that this depends on the version of gcc.
* Revert "mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x."Marek Olšák2012-07-043-10/+0
| | | | This reverts commit d1665388ce53d23ee7853e5083ce6f7192061109.
* mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.Gwenole Beauchesne2012-07-033-0/+10
|
* GLES2: upgrade gl2ext.h to version 16994.Gwenole Beauchesne2012-07-031-12/+372
|
* i965/fs: Allow copy propagation on uniforms.Eric Anholt2012-07-031-4/+7
| | | | | | | | | | | | | | | | | | This is a big win for savage2, hon and yofrankie. 62 new programs for savage2/hon get 16-wide mode, along with one for humus demos and two for tropics. Even a few shaders from tropics see reductions of 15% or more. total instructions in shared programs: 216536 -> 207353 (-4.24%) instructions in affected programs: 123941 -> 114758 (-7.41%) In benchmarking Tropics, only a .040% +/- 034% performance improvement was observed (n=90). Rather disappointing, but I was primarily motivated to do this patch by a regression in the number of 16-wide shaders compiled after a GRF texturing on IVB patch I'm working on. Hopefully this helps avoid that regression. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Allow copy propagation with source modifiers.Eric Anholt2012-07-031-3/+17
| | | | | | | | | | | | | This shaves a few instructions off of a ton of programs. For 12 shaders from tropics and sanctuary, it's enough reduction in register pressure to get 16-wide mode. 7 shaders from heroes of newerth and savage2 are hurt by about 1.1%, where copy propagation of negates ends up preventing coalescing, but we could regain that by doing dataflow analysis in our copy propagation. No significant performance difference in tropics (n=11) Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Move copy propagation test out to a separate function.Eric Anholt2012-07-032-6/+20
| | | | | | It's going to get more complicated in a moment. Reviewed-by: Kenneth Graunke <[email protected]>
* glx/tests: Fix off-by-one error in allocating extension string bufferIan Romanick2012-07-031-1/+1
| | | | | | | | | | | NOTE: This is a candidate for the 8.0 release branch. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50621 Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=418161 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: Markus Oehme <[email protected]>
* glsl: fix unop/binop errors in commentsBrian Paul2012-07-031-2/+2
|
* msaa: Make meta-ops save and restore state of GL_MULTISAMPLE.Paul Berry2012-07-022-1/+17
| | | | | | | | | | | | | | | | | | | | | | The meta-ops _mesa_meta_Clear() and _mesa_meta_glsl_Clear() need to ignore the state of GL_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE, GL_SAMPLE_COVERAGE_VALUE, and GL_SAMPLE_COVERAGE_INVERT when clearing multisampled buffers. The easiest way to accomplish this is to disable GL_MULTISAMPLE during the clear meta-ops. Note: this patch also causes GL_MULTISAMPLE to be disabled during _mesa_meta_GenerateMipmap() and _mesa_meta_GetTexImage() (since those two meta-ops use MESA_META_ALL). Arguably this isn't strictly necessary, since those meta-ops use their own non-MSAA fbo's, but it shouldn't do any harm. Fixes Piglit tests "EXT_framebuffer_multisample/clear {2,4} {color,stencil}" on i965. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/msaa: Fix centroid interpolation of unlit pixels.Paul Berry2012-07-024-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | From the Ivy Bridge PRM, Vol 2 Part 1 p280-281 (3DSTATE_WM: Barycentric Interpolation Mode): "Errata: When Centroid Barycentric mode is required, HW may produce incorrect interpolation results when a 2X2 pixels have unlit pixels." To work around this problem, after doing centroid interpolation, we replace the centroid-interpolated values for unlit pixels with non-centroid-interpolated values (which are interpolated at pixel centers). This produces correct rendering at the expense of a slight increase in shader execution time. I've conditioned the workaround with a runtime flag (brw->needs_unlit_centroid_workaround) in the hopes that we won't need it in future chip generations. Fixes piglit tests "EXT_framebuffer_multisample/interpolation {2,4} {centroid-deriv,centroid-deriv-disabled}". All MSAA interpolation tests pass now. Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Add FS_OPCODE_MOV_DISPATCH_TO_FLAGS to fragment shader backend.Paul Berry2012-07-024-2/+39
| | | | | | | | | | | | | | In order to compute centroid varyings correctly, the fragment shader needs to be able to load the current pixel/sample mask into a flag register. This patch adds an opcode to the fragment shader back-end to do this; the opcode gets translated into the instruction mov(1) f0<1>UW g1.14<0,1,0>UW { align1 WE_all } Since this instruction clobbers f0, instruction scheduling has to treat it the same as instructions that have a conditional modifier. Reviewed-by: Eric Anholt <[email protected]>
* i965: fix transform feedback with primitive restartJordan Justen2012-07-023-0/+18
| | | | | | | | | | | | | | | | | When querying GL_PRIMITIVES_GENERATED, if primitive restart is also used, then take the software primitive restart path so GL_PRIMITIVES_GENERATED is returned correctly. GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN is also updated since it will also affected by the same issue. As noted in brw_primitive_restart.c, with further work we should be able to move this situation back to a hardware handled path. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Re-enable rendering to SNORM formats.Kenneth Graunke2012-07-021-6/+1
| | | | | | | | | Commit d73f6375f50b fixed the cause of the Piglit failure with ARB_color_buffer_float fragment clamp modes. Now that it's fixed, there's no reason to leave snorm format rendering disabled. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Remove unused ir_loop_jump::loop pointer.Kenneth Graunke2012-07-021-4/+0
| | | | | | | | | | | | | | | | | Commit 0c005bd7 intended to make ir_loop_jump::mode public, but also accidentally added a new pointer to the enclosing loop. Furthermore, it tried to initialize the new field by adding "this->loop = loop;" to the constructor, but since there is no loop parameter, this only initialized the field to itself---so it will likely be a garbage pointer. A lot of code, such as lower_jumps, allocates new loop jumps without setting this field appropriately, so any uses would probably just crash. Thankfully, there were none, so we can just delete the field. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51574 Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Don't alter fragment color clamp in DrawPixels().Kenneth Graunke2012-07-021-1/+0
| | | | | | | | | | | | | | | | DrawPixels uses the MESA_META_CLAMP_FRAGMENT_COLOR flag to save/restore the fragment color clamp mode. This is unnecessary since it never alters it. It's also harmful: when the clamp mode is GL_FIXED_ONLY, setting this flag causes _mesa_meta_begin to force it to GL_FALSE, breaking clamping on SNORM formats. DrawPixels should use the user-specified clamp mode and not change it. Fixes Piglit's spec/ARB_color_buffer_float/GL_RGBA8_SNORM-drawpixels test on i965/Sandybridge (with SNORM render targets re-enabled). Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: use FLUSH_CURRENT and not FLUSH_VERTICES in _mesa_validate_*Marek Olšák2012-07-021-7/+14
| | | | | | | | | | | | | | | | ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL calls FLUSH_VERTICES, which is not what we want. This fixes a breakage in classic drivers, introduced in: 62b971673950148eb949ba23d7fdc47debea16f0 vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way around It should fix: https://bugs.freedesktop.org/show_bug.cgi?id=51629 https://bugs.freedesktop.org/show_bug.cgi?id=51642 Reviewed-by: Brian Paul <[email protected]>
* mesa: point to Makefile.old in the srcdirDylan Noblesmith2012-07-021-3/+3
| | | | | | Gets out-of-tree builds slightly closer to working. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: fix parser source gen for out-of-tree buildsDylan Noblesmith2012-07-021-0/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: fix api source gen for out-of-tree buildsDylan Noblesmith2012-07-021-2/+4
| | | | | | Add $(srcdir) where needed. Reviewed-by: Kenneth Graunke <[email protected]>
* glapi/gen: fix out of tree buildDylan Noblesmith2012-07-021-23/+29
| | | | | | | | | | Add "-f $(srcdir)/gl_API.xml" to the arguments of all the scripts that by default look for gl_API.xml in the working directory when run with no arguments, and prepend $(srcdir) to those scripts that are already using an explicit -f argument. Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/tgsi: Don't declare temps individually when they are all similar.José Fonseca2012-07-021-8/+19
| | | | | | | | | | | | tgsi_ureg was recently enhanced to support local temporaries, and as result temps are declared individually. This change avoids many TEMP register declarations on common shaders. (And fixes performance regression due to mismatches against performance sensitive shaders.) Reviewed-by: Brian Paul <[email protected]>
* gallivm: Cleanup the 4 x float -> 16 ub special path in lp_build_conv.José Fonseca2012-07-021-49/+26
| | | | | | No behaviour change intended. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/util: Add ULL suffix to large constants.José Fonseca2012-07-021-3/+3
| | | | | As suggested by Andy Furniss: it looks like some old gcc versions require it.
* clover: Handle NULL devs argument in clBuildProgramTom Stellard2012-07-011-5/+10
| | | | | If devs is NULL, then the kernel should be compiled for all devices associated with the program.
* clover: Define non-templated copy constructor for clover::ref_ptr.Francisco Jerez2012-07-011-2/+1
| | | | | | | | | The templated copy constructor doesn't prevent the compiler from emitting a default copy constructor, which leads to inconsistent memory handling and was reported to cause segfaults when doing event manipulation. Reported-by: Tom Stellard <[email protected]>
* llvmpipe: fix comment typoBrian Paul2012-06-291-1/+1
|
* st/mesa: use DEBUG_INCOMPLETE_FBO debug flagBrian Paul2012-06-291-7/+3
|
* mesa: remove some unused gl_dlist_state fieldsBrian Paul2012-06-291-6/+0
|
* clover: Add a function internalizer pass before LTO v2Tom Stellard2012-06-291-10/+49
| | | | | | | | | The function internalizer pass marks non-kernel functions as internal, which enables optimizations like function inlining and global dead-code elimination. v2: - Pass vector arguments by const reference
* radeon/llvm: Enable vec4 loads on R600Tom Stellard2012-06-293-0/+20
|
* radeon/llvm: Enable floating point stores on R600Tom Stellard2012-06-291-0/+6
|
* radeon/llvm: Handle floating point loads on R600Tom Stellard2012-06-292-0/+31
|
* radeon/llvm: Expand UDIV and UREM nodesTom Stellard2012-06-291-4/+3
|
* radeon/llvm: Emit raw ISA for vertex fetch instructionsTom Stellard2012-06-293-81/+139
|
* gallium/util: Truly disable INF/NAN tests on MSVC.José Fonseca2012-06-291-1/+1
| | | | Thanks to Brian for spotting this.
* gallium/util: Disable INF/NAN tests on MSVC.José Fonseca2012-06-291-1/+7
| | | | Somehow they are not recognized as constants.
* translate: Free elt8_func/elt16_func too.José Fonseca2012-06-291-1/+3
| | | | | | | These were leaking. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Reimplement half <-> float conversions.James Benton2012-06-297-227/+69
| | | | | | | | | | Removed u_half.py used to generate the table for previous method. Previous implementation of float to half conversion was faulty for denormalised and NaNs and would require extra logic to fix, thus making the speedup of using tables irrelevant. Reviewed-by: Jose Fonseca <[email protected]>
* tests: Updated tests to properly handle NaN for half floats.James Benton2012-06-294-9/+41
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* util: Updated u_format_tests to rigidly test half-float boundary values.James Benton2012-06-291-0/+30
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* util: Added functions for checking NaN / Inf for double and half-floats.James Benton2012-06-291-2/+102
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* util: Added util_format_is_array.James Benton2012-06-292-0/+39
| | | | | | This function checks whether a format description is in a simple array format. Reviewed-by: Jose Fonseca <[email protected]>
* vbo: optimize validation for glMultiDrawElementsMarek Olšák2012-06-283-12/+82
| | | | | | | | | Some parameters need to be checked only once. check_valid_to_render needs to be called only once. The validate function is based on the one for DrawElements. Reviewed-by: Brian Paul <[email protected]>
* vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way aroundMarek Olšák2012-06-282-28/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* vbo: don't call twice _mesa_valid_to_render in DrawArraysInstancedBaseInstanceMarek Olšák2012-06-281-5/+2
| | | | | | It's called in _mesa_validate_DrawArraysInstanced already. Reviewed-by: Brian Paul <[email protected]>
* mesa: rename MaxTransformFeedbackSeparateAttribs to MaxTransformFeedbackBuffersMarek Olšák2012-06-288-18/+20
| | | | | | | | | | | | This is a cleanup for ARB_transform_feedback3, where GL_MAX_TRANSFORM_FEEDBACK_BUFFERS is introduced for interleaved attribs and has the same meaning as GL_MAX_.._SEPARATE_ATTRIBS for separate attribs. Also, the maximum number of TFB buffers is reduced from 32 to 4, which makes this patch useful even without the extension. I don't know of any hardware which can do more than 4. Reviewed-by: Brian Paul <[email protected]>