summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add MESA_GLSL debug flag to dump shaders on compile errorMarek Olšák2013-07-302-5/+15
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* driconf: enable app-specific workarounds for all driversMarek Olšák2013-07-302-2/+6
| | | | | | | | | | They were only enabled for i965. Note that drirc must be installed in /etc. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/dri: remove driOptionCache from dri_context in favor of dri_screenMarek Olšák2013-07-302-13/+1
| | | | | | | There is no reason to have this duplicated. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/dri: move enabling postprocessing to dri_screenMarek Olšák2013-07-304-16/+18
| | | | | | | The driconf options are global. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/dri: remove more unused driconf optionsMarek Olšák2013-07-301-6/+1
| | | | | | | vblank_mode is read by dri_util.c and falls under the "dri2" driver name, which is not connected to the actual Mesa/Gallium driver in any way. Reviewed-by: Brian Paul <[email protected]>
* st/dri: implement the driconf option force_s3tc_enable properlyMarek Olšák2013-07-306-21/+24
| | | | Reviewed-by: Brian Paul <[email protected]>
* driconf: remove the unused option allow_large_texturesMarek Olšák2013-07-302-11/+1
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/dri: support the driconf option disable_blend_func_extendedMarek Olšák2013-07-305-4/+10
| | | | | | | This is needed for Unigine. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/osmesa: initialize disable_glsl_line_continuationsMarek Olšák2013-07-301-0/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/postprocessing: convert blits to pipe->blitMarek Olšák2013-07-305-25/+54
| | | | | | | | | PP saves current states to cso_context and then util_blit_pixels does the same. cso_context doesn't like that and the original state is not correctly restored. Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
* gallium/postprocessing: fix shader parsingMarek Olšák2013-07-301-2/+2
| | | | | | | | | | tokens was converted to a pointer, which made the Elements macro return 1. Broken by e87fc11cac696881469a57955af2ac7b4929a2c7. Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: default texture buffer format should be R8 in the core profileMarek Olšák2013-07-301-2/+2
| | | | | | | | | Cc: [email protected] Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> v2: Since we don't expose the extension in the compatibility profile, the "if (API == CORE) .. else .." statement is removed.
* mesa: default DEPTH_TEXTURE_MODE should be RED in the core profileMarek Olšák2013-07-308-10/+12
| | | | | | | Cc: [email protected] Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: expose EXT_framebuffer_multisample_blit_scaled if MSAA is supportedMarek Olšák2013-07-301-0/+1
| | | | | | Surprisingly all drivers supporting MSAA can already do this (r300g and r600g for sure) and I think Christoph wanted to have this feature for his Nouveau drivers anyway.
* st/mesa: fix sRGB renderbuffers without EXT_framebuffer_sRGB supportMarek Olšák2013-07-302-0/+15
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=59322 Cc: [email protected]
* Revert "r300g: Give CLIP_DISABLE another try"Marek Olšák2013-07-302-3/+2
| | | | | | | | This reverts commit e866bd1adea2c3b4971ad68e69c644752f2ab7b6. https://bugs.freedesktop.org/show_bug.cgi?id=57875 Cc: [email protected]
* glsl: Remove redundant writes to prog->LinkStatusPaul Berry2013-07-302-2/+0
| | | | | | | | The linker_error() function sets prog->LinkStatus to false. There's no reason for the caller of linker_error() to also do so. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Improve error message for interstage interface block mismatch.Paul Berry2013-07-301-1/+2
| | | | | | | | | | We're now emitting this error from a point where we have easy access to the name of the block that failed to match, so go ahead and include that in the error message, as we do for intrastage interface block mismatches. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Use a consistent technique for tracking link success/failure.Paul Berry2013-07-305-82/+75
| | | | | | | | | | | | | | | | | | This patch changes link_shaders() so that it sets prog->LinkStatus to true when it starts, and then relies on linker_error() to set it to false if a link failure occurs. Previously, link_shaders() would set prog->LinkStatus to true halfway through its execution; as a result, linker functions that executed during the first half of link_shaders() would have to do their own success/failure tracking; if they didn't, then calling linker_error() would add an error message to the log, but not cause the link to fail. Since it wasn't always obvious from looking at a linker function whether it was called before or after link_shaders() set prog->LinkStatus to true, this carried a high risk of bugs. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add error message for intrastage interface block mismatch.Paul Berry2013-07-303-3/+8
| | | | | | | | Previously we failed to link (which is correct), but we did not output an error message, which could have been confusing for users. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Remove bogus check on return value of link_uniform_blocks().Paul Berry2013-07-303-6/+4
| | | | | | | | | | | | | | | | A comment in link_intrastage_shaders(), and an if-test that followed it, seemed to indicate that link_uniform_blocks() would return a negative value in the event of an error. But this is not the case--all error checking has already been performed by validate_intrastage_interface_blocks(), and link_uniform_blocks() can only return unsigned values. So get rid of the if-test and change the return type of link_intrastage_shaders() to clarify that it can only return unsigned values. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* r600g/compute: Added missing address space checking of kernel parametersJonathan Charest2013-07-301-3/+2
| | | | | | | | | | | To have non-static buffers in local memory, it is necessary to pass them as arguments to the kernel. For r600, the correct lds size must be set to the SQ_LDS_ALLOC register. The correct size is the clover size plus the size reported by the compiler. Reviewed-by: Tom Stellard <[email protected]>
* clover: Added missing address space checking of kernel parameters v2Jonathan Charest2013-07-301-15/+31
| | | | | | | | | | Here is an updated patch with no line wrapping and respecting 80-column limit (for my changes). v2: Tom Stellard - Create global arguments for constant buffers so we don't break r600g. Reviewed-by: Tom Stellard <[email protected]>
* mesa: Remove broken assertion about enabled texture targets.Kenneth Graunke2013-07-291-4/+2
| | | | | | | | | | | | | | | For GLSL programs, enabledTargets can have more than one bit set. For example, a shader that uses sampler2D and samplerCube uniforms will have both TEXTURE_2D_BIT and TEXTURE_CUBE_BIT set. The code that sets _ReallyEnabled already handles this, selecting the "highest priority" texture target. We should simply use that. Fixes new Piglit test incomplete-textures-of-multiple-types. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62698 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: Don't create a swrast context on ES2+.Kenneth Graunke2013-07-291-1/+1
| | | | | | | | | | | | | | We already skip this for API_OPENGL_CORE; ES2+ is very similar. The primary user of the swrast context is GL_SELECT and GL_FEEDBACK, which have never existed in ES. This saves approximately 18MB of memory in GLBenchmark 2.7 Egypt (ES2). No regressions in es3conform on Ivybridge. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* glsl: Remove shader stage checking for extension handling.Kenneth Graunke2013-07-291-61/+28
| | | | | | | | | | | | | | | | | Certain extensions only add functionality to particular shader stages. (For example, ARB_draw_instanced only adds variables to the vertex shader stage.) Previously, we only allowed such extensions to be enabled in the shader stages where they're useful. However, I've never found any text which mandates that behavior; in my opinion, you should be able to turn on extensions in any shader stage, even if they have no effect. Fixes Piglit tests glslparsertest/glsl2/draw_buffers-05.vert and ARB_draw_instanced/preprocessor/feature-macro-enabled.frag. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29185 Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Expose OES_surfaceless_context.Matt Turner2013-07-291-0/+1
| | | | | | | | | EGL_KHR_surfaceless_context extension allows contexts to be made current without a default winsys fbo. This extension specifies what ES 1.1 and 2.0 should do (the ES 3.0 spec already does). Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Return GL_FRAMEBUFFER_UNDEFINED if the winsys fbo is incomplete.Matt Turner2013-07-291-2/+6
| | | | | | | Specified by ARB_framebuffer_object, GL 3.0, and ES 3.0. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallivm: (trivial) git rid of assertion in float->uint conversion codeRoland Scheidegger2013-07-291-2/+3
| | | | | | | Commit 8c3d3622d9ce2fd2a8f46084ab8153d708fa5b09 introduced a new assertion, but since it causes lp_test_conv failures remove it again and let's hope we don't really hit bugs caused by the potentially bogus code (it is possible the assert() caught some cases which work correctly too).
* nvc0: force use of correct firmware fileMaarten Lankhorst2013-07-281-1/+1
| | | | Signed-off-by: Maarten Lankhorst <[email protected]>
* glsl: Less const for glsl_type convenience accessorsIan Romanick2013-07-272-8/+8
| | | | | | | | | | | | | The second 'const' says that the pointer itself is constant. This in unenforcible in C++, so GCC emits a warning (see) below for each of these functions in every file that includes glsl_types.h. It's a lot of warning spam. ../../../src/glsl/glsl_types.h:176:58: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* glsl: Disallow auxiliary storage qualifiers on FS outputs.Kenneth Graunke2013-07-271-0/+14
| | | | | | | | | | | This has always been an error; we just forgot to check for it. Fixes Piglit's no-aux-qual-on-fs-output.frag. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67333 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: [email protected]
* glsl: Classify "layout" like other identifiers.Kenneth Graunke2013-07-271-1/+1
| | | | | | | | | | | | | When "layout" isn't being lexed as LAYOUT_TOK, we should treat it like an ordinary identifier. This means we need to classify it to determine whether we should return IDENTIFIER, TYPE_IDENTIFIER, or NEW_IDENTIFIER. Fixes the WebGL conformance test "shader-with-non-reserved-words." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: [email protected]
* glsl: Be consistent about '\n', '.', and capitalization in errors/warnings.Paul Berry2013-07-278-122/+122
| | | | | | | | | | | | The majority of calls to _mesa_glsl_error(), _mesa_glsl_warning(), and _mesa_glsl_parse_state::check_version() use a message that begins with a lower case letter and ends without a period. This patch makes all messages follow that convention. Also, error/warning messages shouldn't end in '\n', since _mesa_glsl_msg() automatically adds '\n' at the end of the message. Reviewed-by: Matt Turner <[email protected]>
* gallivm: fix float->SNORM conversionRoland Scheidegger2013-07-272-11/+47
| | | | | | | | | | Just like the UNORM case we need to use round to nearest, not trunc. (There's also another problem, we're using the formula for SNORM->float which will produce a value below -1.0 for the most negative value which according to both OpenGL and d3d10 would need clamping. However, no actual failures have been observed due to that hence keep cheating on that.) Reviewed-by: Jose Fonseca <[email protected]>
* util: don't flush overflowing values to infinity in half-float conversionRoland Scheidegger2013-07-272-9/+17
| | | | | | | | | | | | | | | | | | I am not able to find _any_ rounding behavior specified for OpenGL for float to half-float conversions. However, it is specified for fp11/fp10 which suggests round to next finite value but round-to-zero would also be allowed, but finite values must not be flushed to infinity in either case. Hence I believe it makes sense to do the same for half-floats too. We could probably also use round-to-zero consistently, which is in fact required by d3d10 (but it doesn't seem to matter much). Does not match the mesa core function doing the same though (which is saying it was built to match intel gpus which I don't believe for a second as it would cause failures in d3d10, moreover the PRM (for ivy bridge, not listed in older manuals) while not specifying rounding behavior clearly states finite numbers are never flushed to infinity). Reviewed-by: Jose Fonseca <[email protected]>
* tgsi: handle texel swizzles correctly for d3d10-style sample opcodesRoland Scheidegger2013-07-271-5/+35
| | | | | | | Same as for gallivm (though these don't quite work correctly in softpipe, so untested). Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: handle texel swizzles correctly for d3d10-style sample opcodesRoland Scheidegger2013-07-272-0/+29
| | | | | | | | | | | unlike OpenGL, the texel swizzle is embedded in the instruction, so honor that. (Technically we now execute both the sampler_view swizzle and the per-instruction swizzle but this should be quite ok.) v2: add documentation note as it's not obvious. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Disable GL_EXT_framebuffer_object in core profiles and OpenGL 3.1Ian Romanick2013-07-261-1/+1
| | | | | | | | | | | | GL_EXT_framebuffer_object differs from GL_ARB_framebuffer_object in ways that we can't and don't implement in core profiles. Exposing it is a lie, so we shouldn't do that. It's possible the some other GL_EXT_framebuffer_* extensions should be disabled, but it's not quite so clear cut. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: disable ARB_texture_cube_map_array_enable keywords for glsl esTapani Pälli2013-07-261-24/+5
| | | | | | | | | | | | Patch fixes a crash with Webgl 'shader-with-non-reserved-words' conformance test by ignoring desktop extension keywords on GLSL ES. v2: fix reserved and allowed desktop glsl versions (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Fix flaky texture swizzlingChris Forbes2013-07-271-1/+1
| | | | | | | | | | | | | If any component used the ZERO or ONE swizzle, its corresponding member in the `swizzle` array would never be initialized. We *mostly* got away with this, except when that memory happened to contain a value that clobbered another channel when combined using BRW_SWIZZLE4(). NOTE: This is a candidate for stable branches. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/clover: Allow double precision operationsNiels Ole Salscheider2013-07-251-0/+1
| | | | | | | Pass "cl_khr_fp64" preprocessor definition to clang Signed-off-by: Niels Ole Salscheider <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* gallium/vl: add prime supportDave Airlie2013-07-261-1/+19
| | | | | | | | | | | | | | | | This fixes the dri2 opening to check if DRI_PRIME is set, and picks the correct drm device path to open, this along with a change to libvdpau allows vdpauinfo to work at least, Martin Peres tested with nouveau, and there seems to be a further issue with final displaying, it only works sometimes, but this patch is at least necessary to help debug further. Signed-off-by: Dave Airlie <[email protected]> Cc: [email protected] Reviewed-by: Christian König <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67283 Tested-by: Armin K. <[email protected]>
* Revert "i965: Delete pre-DRI2.3 viewport hacks."Kenneth Graunke2013-07-253-1/+25
| | | | | | | | | | | | | | | This reverts commit c9db037dc999eadbcaa8816c814e6ec1776d1a40. Eric believes that the viewport hacks are still necessary for EGL; invalidate events aren't hooked up properly. This commit caused a regression where EFL applications wouldn't show anything other than window decorations; GLBenchmark also showed issues. The revert had conflicts due to the intel_context/brw_context merge. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66606 Cc: [email protected]
* xa: move surface to ref/unref apiJerome Glisse2013-07-253-2/+18
| | | | | | | This make ddx life easier. Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* xa: let ddx handle flushJerome Glisse2013-07-252-9/+2
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* xa: export a common context flush functionJerome Glisse2013-07-254-7/+17
| | | | | | First step before moving flushing inside the ddx. Signed-off-by: Jerome Glisse <[email protected]>
* xa: add handle type parameter to get handleJerome Glisse2013-07-252-2/+18
| | | | | | Allow to retrieve non shared handle. Signed-off-by: Jerome Glisse <[email protected]>
* xa: add xa_surface_from_handle()Rob Clark2013-07-252-4/+46
| | | | | | | | | | | For freedreno DDX, we have to create the scanout GEM bo in a special way (until we have our own KMS/DRM kernel driver.. and even then for phones/tablets you probably need to use the android drivers if you don't want to port the lcd panel driver support). The easiest way to handle this is let the DDX create the scanout bo, and then create the xa surface from that. Signed-off-by: Rob Clark <[email protected]>
* gallivm: Remove NoFramePointerElimNonLeaf for LLVM >= 3.4.Vinson Lee2013-07-251-0/+2
| | | | | | | | TargetOptions::NoFramePointerElimNonLeaf was removed in LLVM 3.4 r187093. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>