aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* mesa: rename ColorMaterialBitmask to _ColorMaterialBitmaskBrian Paul2012-06-2710-21/+21
| | | | Since it's a derived field.
* mesa: re-order, update comments on lighting-related structsBrian Paul2012-06-271-25/+25
|
* gallium/util: Fix parsing of options with underscore.José Fonseca2012-06-271-1/+1
| | | | | | | | For example GALLIVM_DEBUG=no_brilinear which was being parsed as two options, "no" and "brilinear".
* gallivm: Added a generic lp_build_print_value which prints a LLVMValueRef.James Benton2012-06-272-117/+117
| | | | | | | | Updated lp_build_printf to share common code. Removed specific lp_build_print_vecX. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i915g: Implement sRGB texturesStéphane Marchesin2012-06-265-12/+128
| | | | | | | | Since we don't have them in hw we emulate them in the shader. Although not recommended by the spec it is legit. As a side effect we also get GL 2.1. I think this is as far as we can take the i915.
* svga: return 120 for PIPE_CAP_GLSL_FEATURE_LEVELBrian Paul2012-06-261-1/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* llvmpipe: return 120 for PIPE_CAP_GLSL_FEATURE_LEVELBrian Paul2012-06-261-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* glsl: glcpp: Extend testing of #line directivesCarl Worth2012-06-262-0/+12
| | | | | | | | The most recent commit adds support for comments and macro expansion on #line directives. Add testing to verify the new features. Signed-off-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: glcpp: Move handling of #line directives from lexer to parser.Carl Worth2012-06-264-40/+55
| | | | | | | | | | | | | | | | | | | The GLSL specification requires that #line directives be interpreted after macro expansion. Our existing implementation of #line macros in the lexer prevents conformance on this point. Moving the handling of #line from the lexer to the parser gives us the macro expansion we need. An additional benefit is that the preprocessor also now supports comments on the same line as #line directives. Finally, the preprocessor now emits the (fully-macro-expanded) #line directives into the output. This allows the full GLSL compiler to also see and interpret these directives so it can also generate correct line numbers in error messages. Signed-off-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: glcpp: Rename and document _glcpp_parser_expand_ifCarl Worth2012-06-261-5/+20
| | | | | | | | | This function is currently used only in the expansion of #if lines, but we will soon be using it more generally (for the expansion of (_glcpp_parser_expand_and_lex_from) and some more documentation. Signed-off-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Consistently use length-based ralloc string functions for info_log.Carl Worth2012-06-261-14/+24
| | | | | | | | | | | | | | | | | | | | | Commit b823b99ec0f13af257dcd885f436a4d294c6222a switched from using functions such as ralloc_asprintf and ralloc_strcat to ralloc_asprintf_rewrite_tail. This change maintains the string's length as a aparamter that is updated by the ralloc functions (rather than recomputing it with strlen over and over). However, the change failed to updated two locations (glcpp_error and glcpp_warning), with the result that the string's length wasn't updated by these calls. Then, subsequent calls to other ralloc_asprintf_rewrite_tail would overwrite the text appended by glcpp_error. This commit fixes the two missing updates, and restores line numbers to the output of glcpp error messages, (as noticed by a glcpp unit test case that has been failing since the above-mentioned commit). Signed-off-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: glcpp: Allow "#if undefined-macro' to evaluate to false.Carl Worth2012-06-265-3/+20
| | | | | | | | | | | | | | | | | A strict reading of the GLSL specification would have this be an error, but we've received reports from users who expect the preprocessor to interepret undefined macros as 0. This is the standard behavior of the rpeprocessor for C, and according to these user reports is also the behavior of other OpenGL implementations. So here's one of those cases where we can make our users happier by ignoring the specification. And it's hard to imagine users who really, really want to see an error for this case. The two affected tests cases are updated to reflect the new behavior. Signed-off-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* r600g: enable DUAL_EXPORT mode when possible on r6xx/r7xxJerome Glisse2012-06-273-18/+57
| | | | | | | DUAL_EXPORT can be enabled on r6xx/r7xx when all CBs use 16-bit export and there is no depth/stencil export. Signed-off-by: Jerome Glisse <[email protected]>
* r600g: enable DUAL_EXPORT mode when possibleVadim Girlin2012-06-274-6/+55
| | | | | | | | It seems DUAL_EXPORT on evergreen may be enabled when all CBs use 16-bit export mode (EXPORT_4C_16BPC), also there should be at least one CB, and the PS shouldn't export depth/stencil. Signed-off-by: Vadim Girlin <[email protected]>
* r600g: avoid unnecessary shader exports v2Vadim Girlin2012-06-276-28/+41
| | | | | | | | | | | | In some cases TGSI shader has more color outputs than the number of CBs, so it seems we need to limit the number of color exports. This requires different shader variants depending on the nr_cbufs, but on the other hand we are doing less exports, which are very costly. v2: fix various piglit regressions Signed-off-by: Vadim Girlin <[email protected]> Signed-off-by: Jerome Glisse <[email protected]>
* r600g: cache shader variants instead of rebuilding v3Vadim Girlin2012-06-275-94/+217
| | | | | | | | | | | | | | | | | | | Shader variants are stored in the list, the key for lookup is based on the states that require different hw shaders - currently it's rctx->two_side (all gpus) and rctx->nr_cbufs (evergreen/cayman, when writes_all property is set). v2: - use simple list instead of keymap as suggested by Marek on irc - call r600_adjust_gprs from r600_bind_vs_shader for r6xx/r7xx (r600_shader_select isn't used for vertex shaders currently) v3: - fix call to r600_adjust_gprs - do it after updating current shader Improves performance for some apps, e.g. FlightGear - see https://bugs.freedesktop.org/show_bug.cgi?id=50360 Signed-off-by: Vadim Girlin <[email protected]>
* svga: handle missing PIPE_CAP_x queriesBrian Paul2012-06-261-9/+14
| | | | | | And fix incorrect error message for a bad shader type/number. Reviewed-by: Marek Olšák <[email protected]>
* llvmpipe: handle more PIPE_CAP_x queriesBrian Paul2012-06-261-4/+48
| | | | | | | | | As with the previous commit for softpipe. v2: remove 'default' case to get compile-time warning Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* softpipe: handle more PIPE_CAP_x queriesBrian Paul2012-06-261-3/+31
| | | | | | | | | | These all return zero. Add a debug_printf() to catch the default case so we don't accidently mishandle something important in the future. v2: remove 'default' case to get compile-time warning Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* svga: return 1 for PIPE_CAP_MIXED_COLORBUFFER_FORMATSBrian Paul2012-06-261-1/+3
| | | | | | | | | | | This is actually required for GL_ARB_framebuffer_object, but the state tracker doesn't currently check it. Direct3D 9 allows mixed format color buffers with some restrictions. Setting this allows Unigine Heaven 2.5 and 3.0 to run. Tested both on GL and D3D hosts. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* glsl: fix comment typoBrian Paul2012-06-261-1/+1
|
* u2f_emit: Fix type parameter in LLVM call.Olivier Galibert2012-06-261-1/+1
| | | | | | | | The type is the destination type (i.e. float vector) and not the source type. Fixes piglit fs-{in,de}crement-uint. Signed-off-by: Olivier Galibert <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* i965/msaa: Set KILL_ENABLE when GL_ALPHA_TO_COVERAGE enabled.Paul Berry2012-06-262-4/+6
| | | | | | | | | | | | | | | i965 hardware needs to be informed of situations in which it's possible for pixels (or samples) to be discarded for reasons other than depth/stencil testing (e.g. due to an explicit "discard" in the fragment shader). One of these situations is when GL_ALPHA_TO_COVERAGE is enabled, since that can cause samples to be discarded by the color calculator when the pixel's alpha value is less than 1.0. Without this patch, GL_ALPHA_TO_COVERAGE does not take effect on depth buffers. Reviewed-by: Anuj Phogat <[email protected]>
* i965/msaa: Implement GL_SAMPLE_ALPHA_TO_{COVERAGE,ONE}.Paul Berry2012-06-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | This patch enables the multisampling parameters GL_SAMPLE_ALPHA_TO_COVERAGE and GL_SAMPLE_ALPHA_TO_ONE, which allow the fragment shader's alpha output to be converted into a sample coverage mask and ignored for blending. i965 supports these parameters through the BLEND_STATE structure. The GL spec allows, but does not require, the implementation to dither the conversion from alpha to a sample coverage mask, so that alpha values that aren't a multiple of 1/num_samples result in the correct proportion of samples being lit. A bit exists in the BLEND_STATE structure to enable this functionality, but according to the hardware docs it must be disabled on Sandy Bridge (see the Sandy Bridge PRM, Vol2, Part1, p379: AlphaToCoverage Dither Enable). So it is enabled for Gen7 only. Fixes piglit tests "EXT_framebuffer_multisample/sample-alpha-to-{coverage,one} {2,4}". Reviewed-by: Anuj Phogat <[email protected]>
* i965/msaa: Implement glSampleCoverage.Paul Berry2012-06-264-7/+26
| | | | | | | | | | | | | | This patch enables glSampleCoverage() functionality, which allows the client program to specify that only a portion of the samples be lit up when performing multisampled rendering. i965 supports glSampleCoverage() through the 3DSTATE_SAMPLE_MASK command packet, which allows the driver to specify a bitfield indicating which samples to light up. Fixes piglit tests "EXT_framebuffer_multisample/sample-coverage {2,4} {inverted,non-inverted}". Reviewed-by: Anuj Phogat <[email protected]>
* st/wgl: Add a few more comments.José Fonseca2012-06-262-6/+38
|
* r600g: don't disable streamout if it hasn't been startedMarek Olšák2012-06-261-1/+1
|
* u_blitter: disable streamout before renderingMarek Olšák2012-06-261-0/+10
| | | | | | This fixes piglit EXT_transform_feedback tests: - intervening-read output - intervening-read prims_written
* i965/fs: Fix conversions float->bool, int->boolChad Versace2012-06-251-7/+7
| | | | | | | | | | | | | | | | | Fixes gles2conform GL.equal.equal_bvec2_frag. This fixes brw_fs_visitor's translation of ir_unop_f2b. It used CMP to convert the float to one of 0 or ~0. However, the convention in the compiler is that true is represented by 1, not ~0. This patch adds an AND to convert ~0 to 1. By inspection, a similar problem existed with ir_unop_i2b, with a similar fix. [v2 kayden]: eliminate extra temporary register. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49621 Signed-off-by: Chad Versace <[email protected]>
* st/wgl: 80-column wrappingBrian Paul2012-06-252-7/+12
|
* docs/lists: add piglit mailing listAndreas Boll2012-06-251-0/+3
| | | | Signed-off-by: Brian Paul <[email protected]>
* docs/helpwanted: update some infoAndreas Boll2012-06-251-9/+8
| | | | Signed-off-by: Brian Paul <[email protected]>
* docs/sourcetree: update some infoAndreas Boll2012-06-251-4/+6
| | | | Signed-off-by: Brian Paul <[email protected]>
* docs/devinfo: update release infoAndreas Boll2012-06-251-22/+19
| | | | Signed-off-by: Brian Paul <[email protected]>
* docs/systems: add some useful driver linksAndreas Boll2012-06-251-5/+7
| | | | Signed-off-by: Brian Paul <[email protected]>
* docs: update some broken/old linksAndreas Boll2012-06-255-6/+6
| | | | Signed-off-by: Brian Paul <[email protected]>
* docs: whitespace cleanupAndreas Boll2012-06-251-16/+16
| | | | Signed-off-by: Brian Paul <[email protected]>
* docs: escape html special charAndreas Boll2012-06-251-1/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* docs: add missing target attributeAndreas Boll2012-06-253-4/+4
| | | | | | target is needed for the frame based layout Signed-off-by: Brian Paul <[email protected]>
* docs/shading: use proper markupAndreas Boll2012-06-251-11/+11
| | | | | | use dl instead of ul Signed-off-by: Brian Paul <[email protected]>
* docs: document the GALLIUM_LOG_FILE env varBrian Paul2012-06-251-0/+2
|
* mesa: new MESA_LOG_FILE env var to log errors, warnings, etc., to a fileBrian Paul2012-06-252-2/+14
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* docs: update GL3.3 statusMarek Olšák2012-06-251-1/+2
|
* r600g: inline r600_blit_push_depth and use resource_copy_regionMarek Olšák2012-06-253-18/+11
| | | | | We are going to have a separate resource for depth texturing and transfers and this is just a transfer thing.
* r600g: split flushed depth texture creation and flushingMarek Olšák2012-06-255-16/+34
|
* i965/msaa: Add backend support for centroid interpolation.Paul Berry2012-06-253-11/+32
| | | | | | | | | | | | | | | This patch causes the fragment shader to be configured correctly (and the correct code to be generated) for centroid interpolation. This required two changes: brw_compute_barycentric_interp_modes() needs to determine when centroid barycentric coordinates need to be included in the pixel shader thread payload, and fs_visitor::emit_general_interpolation() needs to interpolate using the correct set of barycentric coordinates. Fixes piglit tests "EXT_framebuffer_multisample/interpolation {2,4} centroid-edges" on i965. Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Refactor interpolation code to prepare for adding centroid support.Paul Berry2012-06-252-8/+17
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965/msaa: Adapt clip setup for centroid noperspective interpolation.Paul Berry2012-06-253-2/+6
| | | | | | | | | | | | | | | | | | To save time, we only instruct the clip stage of the pipeline to compute noperspective barycentric coordinates if those coordinates are needed by the fragment shader. Previously, we would determine whether the coordinates were needed by seeing whether the fragment shader used the BRW_WM_NONPERSPECTIVE_PIXEL_BARYCENTRIC interpolation mode. However, with MSAA, it's possible that the fragment shader might use BRW_WM_NONPERSPECTIVE_CENTROID_BARYCENTRIC instead. In the future, when we support ARB_sample_shading, it might use BRW_WM_NONPERSPECTIVE_SAMPLE_BARYCENTRIC. This patch modifies the upload_clip_state() functions to check for all three possible noperspective interpolation modes. Reviewed-by: Eric Anholt <[email protected]>