Notes: The most fundamental change in this release is an entirely new backend infrastructure. This change was made in order to become closer to compliance with the Sh specification as published in Metaprogramming GPUs with Sh, and is the last significant barrier to full spec compliance. This release will be followed by a release aiming at reaching such compliance (0.7.9) which will be a candidate for the first stable release series of Sh (0.8.x). In addition to forcing a specific backend using the shSetBackend() function, it is now possible to have Sh automatically select the best backend installed on the system for a particular target. To restrict this selection to a few backends, two functions have been added: shUseBackend() and shClearBackends(). The shFindBackend() function is also available to find the name of the best backend for a given target. New functions are now available to request the binding or compilation status of ShProgram objects: - shIsBound() checks whether a given target is currently bound. - shBound() returns the ShProgram that is currently bound to the target (if any). - ShProgram::is_compiled() checks whether a program has been compiled for a particular target. Floating point textures are now unclamped by default and so the ShUnclamped and ShClamped templates have been removed. To use a clamped texture, simply change the type of the texture from 'f' to 'fub'. As a result of the previous change, ShStorage is now type-aware. One of the implications of this is the need to declare the type of storage when creating an ShHostMemory object. Stream programs now support 2-component input/output and channels are automatically double-buffered if it is necessary to preserve the execution semantics. A new Sh semantic type has been added: SH_PLANE (with the appropriate ShPlane* typedefs). The following new library functions are available: - cosh, sinh, tanh - smoothstep, smoothpulse - poly Finally, a few issues regarding OSX 10.4.1 portability, GCC 4, ATI support and the Windows port were fixed. Please report any bugs or problems to our mailing list, libsh-users@lists.libsh.org, or use our issue tracker at (https://issues.libsh.org). Thanks - The Sh Team
Changes: 2005-06-15 Francois Marier <francois@serioushack.com> * util/shutil.cpp, shutil.hpp: Add the normalize_path() function to convert the path separators in the pathname to "\" on Windows and to "/" on UNIX. 2005-06-14 Francois Marier <francois@serioushack.com> * backends/gl/GlslEmit.cpp (emit_cond): Make cond() follow the Glsl spec except on NVIDIA where component-wise COND is available. 2005-06-13 Francois Marier <francois@serioushack.com> * src/ShMemory.hpp: Remove the default value of "value_type" in the ShHostMemory constructors. * examples/particle/main.cpp: Must specify the value_type when creating ShHostMemory objects. * backends/gl/ArbEmit.cpp, ArbCode.hpp (real_div): Add this method. * backends/gl/ArbEmit.cpp (emit_div): Make use of real_div(). (emit_hyperbolic): Make use of real_div(). Remove useless instructions in COSH and SINH. * backends/gl/GlslEmit.cpp (emit_discard): Properly cast the zero constant. 2005-06-10 Francois Marier <francois@serioushack.com> * backends/gl/GlslEmit.cpp, GlslCode.hpp (emit_cond): Add this method to properly typecast the 0 constant. 2005-06-09 Francois Marier <francois@serioushack.com> * backends/gl/ArbCode.cpp, ArbReg.cpp, ArbReg.hpp: Add support for the extra color ouputs of the ATI_draw_buffers extension. 2005-06-08 Francois Marier <francois@serioushack.com> * src/ShContext.cpp, ShContext.hpp (set_binding): There's no reason why the ShProgram argument shouldn't be a constant reference. * src/ShProgramNode.cpp, ShProgramNode.hpp, ShProgram.hpp (is_compiled): Add this method (issue35). * src/ShBackend.cpp, ShBackend.hpp (derived_targets): Add this method to reduce coupling between the available backends and the methods that take a "target" argument. * src/ShContext.cpp (bound_program): Make use of the new derived_backends() method in ShBackend. 2005-06-07 Francois Marier <francois@serioushack.com> * backends/gl/PBufferStreams.cpp (execute): Only use an intermediate stream if there are channels that are both being read from and written to. That way if users are already double-buffering, no intermediate stream will be used (issue152). 2005-06-06 Francois Marier <francois@serioushack.com> Removing ShUnclamped and adding types to ShStorage: * src/ShMemory.cpp, ShMemory.hpp: Add a value type to ShStorage. Add an extra parameter to the ShHostStorage and ShHostMemory constructors (defaults to SH_FLOAT in the case of ShHostMemory). Do type conversion on host-to-host transfers. Add value_type() and value_size() methods to ShStorage. * src/sh.hpp, Makefile.am, Makefile.win32, win32/Sh.vcproj: Remove ShClamping.h * src/ShTable.hpp, ShTexture.hpp, ShTextureNode.hpp, ShArray.hpp: Remove the clamping trait. * src/ShImage.cpp, ShImage3D.cpp: Explicitely specify that the host memory type should be SH_FLOAT. * backends/cc/CcTexturesString.hpp, CcTextures.hpp, CcEmit.cpp: Remove all clamping-related code and comments. * backends/cc/Cc.cpp: Specify the host memory type when constructing the host storage. * backends/gl/PBufferContext.cpp: Remove unused constructor. Add assert to make sure the type of both storage objects match in the transfer method. * backends/gl/PBufferContext.hpp: Remove unused constructor and make_storage method. * backends/gl/Utils.cpp, GlTextureName.cpp: Remove the clamping trait. * backends/gl/PBufferStreams.cpp: Specify the value type when creating storage and memory objects. Add assert to ensure proper types. * backends/gl/GlTextures.cpp: Remove all clamped code and leave only the unclamped alternative. * backends/gl/GlTextureStorage.cpp, GlTextureStorage.hpp: Remove the m_valueType member and the valueType() method since they have been moved to ShStorage. Do type conversion on host-to-GL transfers. * test/regress/shtest.py, test.hpp, tex.cpp.py: Specify the value type when creating the host memory. * test/regress/tex.cpp.py: Remove all ShUnclamped and ShClamped. * examples/textures/main.cpp: Change textures from AttribNf to AttribNfub. 2005-06-06 Kevin Moule <krmoule@cgl.uwaterloo.ca> * test/regress/test.hpp: Fixed ShVariant constructors to match changes made below. * backend/gl/GLTextureStorage.cpp, backends/gl/PBufferStreams.cpp: Fixed ShVariant constructors to match changes made below. * src/ShGenericImpl.hpp: Fixed ShVariant constructors to match changes made below. * src/ShVariant.hpp, src/ShVariantImpl.hpp, src/ShVariantFactory.hpp, src/ShVariantFactoryImpl.hpp: Modified ShDataVariant constructor arguments to be consistent with other constructors. Associated generate() functions were also modified for consistency. 2005-06-06 Francois Marier <francois@serioushack.com> * backends/gl/Glsl.cpp, GlslSet.cpp, GlslCode.cpp, ArbLimits.hpp, ArbCode.hpp, ArbCode.cpp: Change some ints to GLints to fix compilation errors on OSX (issue195). 2005-05-31 Francois Marier <francois@serioushack.com> * src/ShContext.cpp, ShContext.hpp (bound_program): Add this method. (is_bound): Add this method. (shIsBound): Add this function. (shBound): Add this function. 2005-05-31 Kevin Moule <krmoule@cgl.uwaterloo.ca> * src/Makefile.win32: Updated to reflect previous changes to VS project files. * src/ShHalfImpl.hpp: Changed fabsf to fabs, code uses doubles. 2005-05-30 Stefanus Du Toit <sjdutoit@uwaterloo.ca> * test/regress/Makefile.am (INCLUDES): Use $(top_srcdir) to allow out-of-source build. (AM_LDFLAGS): Use $(top_builddir) to allow out-of-source build. 2005-05-30 Francois Marier <francois@serioushack.com> * backends/gl/GlslVariable.cpp (GlslVariable): Typecast all numerical constants. * backends/gl/Makefile.am: Moving the common GL stuff into a separate library. * src/ShBackend.cpp: Ignore the libshgl library since it is not a real backend. * backends/gl/GlTextureStorage.cpp (HostGlTextureTransfer): Restoring the dynamic_cast. * src/ShBackend.cpp, ShBackend.hpp (is_valid_name): Add this method. (load_library): Check whether the backend name is valid before trying to load the library (issue194). * src/ShVariableType.hpp, ShVariableType.cpp: Add the SH_PLANE semantic type. * src/scripts/ShPlane.hpp.py, src/ShPlane.hpp, ShLibPlane.hpp: Add these files for the new SH_PLANE semantic type. * src/ShSyntax.cpp, ShSyntax.hpp (shHaveBackend): Add this function (issue34). (shClearBackends): Add this function (issue33). (shFindBackend): Add this function (issue34). * src/ShBackend.cpp, ShBackend.hpp (have_backend): Add this method. (target_handler): Add this method and make get_backend() use it. 2005-05-26 Francois Marier <francois@serioushack.com> * src/ShBackend.cpp: Refactor the code related to the library loading and search paths. Add a user path for user-installed libraries on UNIX. (~ShBackend): Unload the library whenever the backend is destroyed. * src/ShBackend.hpp (load_libraries): Add this method. 2005-05-25 Francois Marier <francois@serioushack.com> Backend infrastructure improvements (issue31): * src/ShBackend.cpp (target_cost): Separate library loading, backend instantiation and cost function. A backend is no longer initialized unless it is the best backend that should be used. * backends/cc/Cc.cpp, Cc.hpp, backends/gl/ArbBackend.cpp, GlslBackend.cpp: Remove the can_handle() method to replace it with the target_cost() non-member function. * src/ShBackend.hpp, ShBackend.cpp: Add an unbind_all_backends() static method that iterates through all backends and calls "unbind_all_programs()" on them. * backends/gl/GlBackend.cpp, GlBackend.hpp: Rename the unbind_all() methods to unbind_all_programs() in order to differentiate them from ShBackend::unbind_all_backends(). Remove the can_handle() method. * src/ShSyntax.cpp (shUnbind): No need to iterate through all backends, this is done from within ShBackend now. 2005-05-20 Francois Marier <francois@serioushack.com> Backend infrastructure improvements (issue31): * backends/cc/Cc.cpp, Cc.hpp, ArbBackend.cpp, GlslBackend.cpp: Make the can_handle() method return an integer cost instead of a boolean value. * backends/gl/GlBackend.cpp, GlBackend.hpp (can_handle): Return an integer cost instead of a boolean. Only provide the costs that are common to both Arb and Glsl. * src/ShBackend.cpp, ShBackend.hpp: Remove the generic can_handle() function since it is not used by the other backends anymore. Make the pure virtual can_handle() method return an int. * src/ShBackend.cpp, ShBackend.hpp: Add lists of selected and instantiated backends. Add get_backend(), can_handle(), use_backend(), clear_backends() and load_library(). Remove all references to ShEnvironment. * src/ShSyntax.cpp: Convert all calls to ShEnvironment::backend to calls to ShBackend::get_backend(). Remove the ShEnvironment include. Add an shUseBackend() method. * src/ShSyntax.hpp: Add an shUseBackend() method. * src/ShStream.cpp (operator=): Convert call to ShEnvironment::backend to ShBackend::get_backend(). * backends/gl/ArbCode.cpp, src/scripts/ShAttribImpl.hpp.py, src/ShAttribImpl.hpp, ShProgramNode.cpp, ShTextureNode.cpp, ShFixedManipulator.cpp, ShAlgebra.cpp, ShVariableNode.cpp: Remove the ShEnvironment include. * backends/gl/GlBackend.cpp, GlBackend.hpp (can_handle): Add this method. * backends/gl/ArbBackend.cpp, GlslBackend.cpp: Remove the static variable and instead add a non-member function to initialize the backend. (version): Add this method. * backends/gl/PBufferStreams.cpp (execute): Removed the target check since by that time it should have already been done. * backends/gl/GlTextureStorage.cpp (HostGlTextureTransfer): Changed a dynamic_cast to a static_cast as a hack to support two copies of this class to be loaded at the same time. * test/regress/shtest.py: Set the backend to "stream" instead of "gpu:stream" since we want to test the "cc" backend as well. * examples/particle/main.cpp, glut/main.cpp, textures/main.cpp: Instead of always calling shSetBackend, only call shUseBackend when a backend name has been specified on the command line. 2005-05-16 Francois Marier <francois@serioushack.com> * src/ShLibMiscImpl.hpp (poly): Improve efficiency of the algorithm used to compute poly(). 2005-05-10 Francois Marier <francois@serioushack.com> Improve the speed of row by row matrix assignment (mat_asn_vec). * src/scripts/ShAttribImpl.hpp.py (Impl.scalarcons): Set all values at once using setValues() instead of several calls to setValue(). * src/ShVariantImpl.hpp: Inline all the variant_cast() functions. * src/ShGenericImpl.hpp (setValues): Replace the std::copy call by a for loop. 2005-05-09 Francois Marier <francois@serioushack.com> * backends/gl/GlslEmit.cpp (emit_texture): Fix the swizzle for 2-component texture lookups. 2005-05-09 Stefanus Du Toit <sjdutoit@uwaterloo.ca> * configure.ac: On OS X, add -lSystem instead of -lmx. This seems to be more appropriate, and allows linking with libraries such as wxwidgets without causing duplicate symbols. 2005-05-06 Francois Marier <francois@serioushack.com> * backends/gl/PBufferStreams.cpp (execute): Allocate a bigger texture for 2-component outputs. * src/ShLibMiscImpl.hpp (poly): Remove unnecessary invocations of the pow() function. 2005-05-05 Francois Marier <francois@serioushack.com> * src/ShLibMiscImpl.hpp, ShLibMisc.hpp (poly): Add the poly() library function. * src/ShVariableNode.cpp (delete): Only free the pointer from the pool if the memory pool was actualy being used. This fixes a problem reported on libsh-devel by Jamie Burns. 2005-05-04 Francois Marier <francois@serioushack.com> * backends/gl/ArbCode.cpp (printVar): Scalar variables which were not assigned a register should just be inserted as immediate values. * backends/gl/GlslVariableMap.cpp (real_resolve): Remove unnecessary parentheses around negated variables. * backends/gl/GlslVariable.cpp (GlslVariable): Don't assign a glsl variable to scalar constants. Insert them in the code directly. * backends/gl/GlslCode.cpp (real_update_uniform): Display more information in the debugging message (size and kind). 2005-05-02 Francois Marier <francois@serioushack.com> * backends/gl/GlslVariableMap.cpp (allocate_builtin_inputs): Display an error if an input was left unassigned. * backends/gl/GlslVariableMap.cpp (allocate_builtin_outputs): Display an error if an output was left unassigned. * backends/gl/GlslEmit.cpp (table_substitution): Don't cast variables twice in the case of assignment operations. * backends/gl/GlslCode.cpp (real_update_uniform): Output more information about the unknown uniform in the debug message. 2005-04-28 Francois Marier <francois@serioushack.com> * backends/gl/PBufferStreams.cpp (execute): Add support for two-component output by using a GL_RGB buffer and discarding the third component after the copy. * src/ShVariant.hpp, ShVariantImpl: Add a count parameter to the ShDataVariant copy constructor to fix the problem where only the first element was being copied. 2005-04-26 Francois Marier <francois@serioushack.com> * src/ShOperation.hpp, ShOperation.cpp, ShInstructions.hpp, ShInstructions.cpp, ShLibTrig.hpp, ShLibTrigImpl.hpp, ShLib.hpp, ShEvalImpl.hpp: Add the COSH, SINH and TANH IR operations. * src/ShConcreteCTypeOp.cpp, ShConcreteRegularOpImpl.hpp: Implementation of the hyperbolic trig functions in immediate mode. * backends/gl/ArbEmit.cpp, ArbCode.hpp, GlslEmit.cpp, GlslCode.hpp: Add approximations for the COSH, SINH and TANH operations. * backends/cc/CcEmit.cpp: Use the standard C functions to implement COSH, SINH and TANH. 2005-04-25 Francois Marier <francois@serioushack.com> * util/ShFunc.hpp, ShFuncImpl.hpp: Rename "smoothstep" to "deprecated_smoothstep" since it is a cubic function whereas the book defines is as a linear function. Move the bezier function implementation here from Shrike's utilimpl.hpp. It should be moved to the core later. * src/ShLibClamp.hpp, ShLibClampImpl.hpp: Add the smoothstep() and smoothpulse() functions from Shrike's utilimpl.hpp (issue63).
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use