Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2020-01-31 11:08:43 +01:00
commit 1baef394b6
3 changed files with 17 additions and 5 deletions

View File

@ -200,7 +200,7 @@ fillin(DatagramIterator &scan, BamReader *manager) {
size_t size = (size_t)_num_rows * (size_t)_num_cols;
delete [] _data;
_data = new float[size];
_data = new btScalar[size];
for (size_t i = 0; i < size; ++i) {
_data[i] = scan.get_stdfloat();

View File

@ -888,7 +888,17 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) {
// Add it once for each index.
for (bind._index = 0; bind._index < param_size; ++bind._index) {
// It was discovered in #846, that GLSL 4.10 and lower don't seem to
// guarantee that matrices occupy successive locations, and on macOS
// they indeed occupy four locations per element.
// As a big fat hack, we multiply by four on macOS, because this is
// hard to fix on the 1.10 branch. We'll have a proper fix on the
// master branch.
#ifdef __APPLE__
bind._id._seqno = p + bind._index * 4;
#else
bind._id._seqno = p + bind._index;
#endif
_shader->cp_add_mat_spec(bind);
}
return;

View File

@ -2514,9 +2514,10 @@ read(const ShaderFile &sfile, BamCacheRecord *record) {
// Determine which language the shader is written in.
if (_language == SL_Cg) {
#ifdef HAVE_CG
cg_get_profile_from_header(_default_caps);
ShaderCaps caps = _default_caps;
cg_get_profile_from_header(caps);
if (!cg_analyze_shader(_default_caps)) {
if (!cg_analyze_shader(caps)) {
shader_cat.error()
<< "Shader encountered an error.\n";
return false;
@ -2606,9 +2607,10 @@ load(const ShaderFile &sbody, BamCacheRecord *record) {
// Determine which language the shader is written in.
if (_language == SL_Cg) {
#ifdef HAVE_CG
cg_get_profile_from_header(_default_caps);
ShaderCaps caps = _default_caps;
cg_get_profile_from_header(caps);
if (!cg_analyze_shader(_default_caps)) {
if (!cg_analyze_shader(caps)) {
shader_cat.error()
<< "Shader encountered an error.\n";
return false;