summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* dri2: Hard-code the DRI2 versionIan Romanick2012-07-111-1/+1
| | | | | | | | This allows revising the dri_interface.h separately from adding driver support. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unneeded extern qualifiersChad Versace2012-07-101-2/+2
| | | | | | | Remove 'extern' from the functions declared in texcompress_etc.h. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Add hardware context support.Kenneth Graunke2012-07-104-6/+21
| | | | | | | | | | | With fixes and updates from Ben Widawsky and comments from Paul Berry. v2: Use drm_intel_gem_context_destroy to destroy hardware context; remove useless initialization of hw_ctx, both suggested by Eric. Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Acked-by: Paul Berry <[email protected]>
* mesa/test: Update name of GL_TIME_ELAPSEDIan Romanick2012-07-101-1/+1
| | | | | | | | 4952caa caused the _EXT to fall off the name of this enum. This is fine. Update the unit test to expect the new value. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51956
* st/mesa: implement ARB_timer_queryMarek Olšák2012-07-102-0/+19
|
* mesa: implement glGet(GL_TIMESTAMP) v2Marek Olšák2012-07-102-1/+20
| | | | | | This is adds a new driver function to retrieve the timestamp. Reviewed-by: Eric Anholt <[email protected]>
* mesa: add ARB_timer_query to the extension listMarek Olšák2012-07-101-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: add QueryCounter display list supportMarek Olšák2012-07-101-0/+24
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: implement TIMESTAMP query and glQueryCounterMarek Olšák2012-07-101-6/+72
| | | | Reviewed-by: Brian Paul <[email protected]>
* i965/fs: Invalidate live intervals after copy propagation.Eric Anholt2012-07-061-0/+3
| | | | | | | | For copy propgation, we've dropped the use of a GRF in favor of a (probably later) use of a different GRF. This definitely requires invalidating intervals. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Invalidate live intervals in passes that remove an instruction.Eric Anholt2012-07-061-0/+6
| | | | | | | | | Since live intervals are based on ip, removing an instruction trashes the intervals unless we were to go do some surgery. These happen to usually remove a use of a grf, so it's time to recalculate, anyway. Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for the 8.0 release branch.
* i965/vs: Move the other two src_reg/dst_reg constructors to brw_vec4.cpp.Eric Anholt2012-07-062-43/+43
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Move class functions to brw_vec4.cpp.Eric Anholt2012-07-062-106/+126
| | | | | | | This has less impact than for the FS (4k savings), because it was partially done already, but makes things more consistent. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Move class functions from the header to .cpp files.Eric Anholt2012-07-063-278/+326
| | | | | | | Cuts compile time for brw_fs.h changes from 2.7s to .7s and reduces i965_dri.so size by 70k. Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: only expose ARB_shader_bit_encoding with GLSL 1.3Marek Olšák2012-07-061-4/+1
| | | | | | I don't think it's possible or even useful to use the extension with GLSL 1.2. Reviewed-by: Brian Paul <[email protected]>
* intel: Share common __DRIimage allocation codeKristian Høgsberg2012-07-051-40/+19
| | | | | | | We have the same switch and allocation code in two places. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Just look up image->internal_format using _mesa_get_format_base_formatKristian Høgsberg2012-07-051-10/+2
| | | | | Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Remove unused __DRIimage::data_type fieldKristian Høgsberg2012-07-052-13/+0
| | | | | Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "mesa: #define fprintf to be __mingw_fprintf() on Mingw32"Brian Paul2012-07-051-10/+0
| | | | | | | | | This reverts commit cbffaf20e9e6154310ba68bb2b44adc37ba83bcd. Use the PRIx64 macro in the fprintf() call instead, as suggested by Dylan Noblesmith. Reviewed-by: José Fonseca <[email protected]>
* mesa: use the PRIx64 macro for printing 64-bit hexadecimal valuesBrian Paul2012-07-051-5/+6
| | | | | | We'll revert the #define fprintf __mingw_fprintf change next. Reviewed-by: José Fonseca <[email protected]>
* intel: Fix a comment typo.Eric Anholt2012-07-041-1/+1
|
* mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.Gwenole Beauchesne2012-07-042-0/+2
|
* 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]>
* Revert "mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x."Marek Olšák2012-07-042-2/+0
| | | | This reverts commit d1665388ce53d23ee7853e5083ce6f7192061109.
* mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.Gwenole Beauchesne2012-07-032-0/+2
|
* 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]>
* 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]>
* 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]>
* 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
|
* 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]>
* mesa: more const qualifiers to match the latest glext.hBrian Paul2012-06-275-8/+9
| | | | | | | For some reason regular gcc on Linux didn't catch these but the mingw compiler did (generated errors, not warnings). v2: include the changes in src/mapi/ too
* glapi: add const qualifier to glShaderSourceARB() parameterBrian Paul2012-06-271-1/+1
| | | | | | | | | Fixes the es2 build with gcc. Note: in glext.h the prototypes for glShaderSource() and glShaderSourceARB() disagree: only the former has the extra const qualifier. Reviewed-by: José Fonseca <[email protected]>
* i965: enable ARB_instanced_arrays extensionJordan Justen2012-06-274-7/+42
| | | | | | | | Set the step_rate value when drawing to implement ARB_instanced_arrays for gen >= 4. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_reference_array_object() an inline functionBrian Paul2012-06-272-6/+17
| | | | As we do for texture objects, buffer objects, etc.
* mesa: look up enum name for glEnable/Disable errorsBrian Paul2012-06-271-5/+6
|
* mesa: move TEXGEN defines closer to gl_texgen structBrian Paul2012-06-271-40/+40
|