Major improvement: uniforms can now be set to default values. The syntax is the same as for setting any other values, f.ex. 'uniform Scalar a = 1; uniform Scalar b = 0.5 * a;'. Undefined uniforms are still allowed, but in this case the user should load a proper value into it during runtime. Default uniform values can be overwritten by calling any of the uniform loader funcions (like acDeviceLoadScalarUniform). Improved also error checking. Now there are explicit warnings if the user tries to load an invalid value into a device constant.
This commit is contained in:
@@ -27,11 +27,6 @@ main(void)
|
||||
{
|
||||
AcMeshInfo info;
|
||||
acLoadConfig(AC_DEFAULT_CONFIG, &info);
|
||||
// Some real params must be calculated (for the MHD case) // TODO DANGEROUS
|
||||
info.real_params[AC_inv_dsx] = (AcReal)(1.0) / info.real_params[AC_dsx];
|
||||
info.real_params[AC_inv_dsy] = (AcReal)(1.0) / info.real_params[AC_dsy];
|
||||
info.real_params[AC_inv_dsz] = (AcReal)(1.0) / info.real_params[AC_dsz];
|
||||
info.real_params[AC_cs2_sound] = info.real_params[AC_cs_sound] * info.real_params[AC_cs_sound];
|
||||
|
||||
// Alloc
|
||||
AcMesh model, candidate;
|
||||
|
Reference in New Issue
Block a user