Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2021-04-08 12:30:35 +02:00
commit dd3510eea7
9 changed files with 68 additions and 28 deletions

View File

@ -92,10 +92,10 @@ jobs:
- name: Install dependencies (macOS) - name: Install dependencies (macOS)
if: runner.os == 'macOS' if: runner.os == 'macOS'
run: | run: |
curl -O https://www.panda3d.org/download/panda3d-1.10.8/panda3d-1.10.8-tools-mac.tar.gz curl -O https://www.panda3d.org/download/panda3d-1.10.9/panda3d-1.10.9-tools-mac.tar.gz
tar -xf panda3d-1.10.8-tools-mac.tar.gz tar -xf panda3d-1.10.9-tools-mac.tar.gz
mv panda3d-1.10.8/thirdparty thirdparty mv panda3d-1.10.9/thirdparty thirdparty
rmdir panda3d-1.10.8 rmdir panda3d-1.10.9
# Temporary hack so that pzip can run, since we are about to remove Cg anyway. # Temporary hack so that pzip can run, since we are about to remove Cg anyway.
install_name_tool -id "$(pwd)/thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib" thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib install_name_tool -id "$(pwd)/thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib" thirdparty/darwin-libs-a/nvidiacg/lib/libCg.dylib
@ -347,16 +347,16 @@ jobs:
shell: powershell shell: powershell
run: | run: |
$wc = New-Object System.Net.WebClient $wc = New-Object System.Net.WebClient
$wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.8/panda3d-1.10.8-tools-win64.zip", "thirdparty-tools.zip") $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.9/panda3d-1.10.9-tools-win64.zip", "thirdparty-tools.zip")
Expand-Archive -Path thirdparty-tools.zip Expand-Archive -Path thirdparty-tools.zip
Move-Item -Path thirdparty-tools/panda3d-1.10.8/thirdparty -Destination . Move-Item -Path thirdparty-tools/panda3d-1.10.9/thirdparty -Destination .
- name: Get thirdparty packages (macOS) - name: Get thirdparty packages (macOS)
if: runner.os == 'macOS' if: runner.os == 'macOS'
run: | run: |
curl -O https://www.panda3d.org/download/panda3d-1.10.8/panda3d-1.10.8-tools-mac.tar.gz curl -O https://www.panda3d.org/download/panda3d-1.10.9/panda3d-1.10.9-tools-mac.tar.gz
tar -xf panda3d-1.10.8-tools-mac.tar.gz tar -xf panda3d-1.10.9-tools-mac.tar.gz
mv panda3d-1.10.8/thirdparty thirdparty mv panda3d-1.10.9/thirdparty thirdparty
rmdir panda3d-1.10.8 rmdir panda3d-1.10.9
(cd thirdparty/darwin-libs-a && rm -rf rocket) (cd thirdparty/darwin-libs-a && rm -rf rocket)
- name: Set up Python 3.9 - name: Set up Python 3.9
uses: actions/setup-python@v1 uses: actions/setup-python@v1

View File

@ -1,7 +0,0 @@
language: cpp
branches:
only:
- release/1.10.x
- release/1.9.x
script:
- echo "Build disabled on master branch."

View File

@ -333,7 +333,7 @@ seekoff(streamoff off, ios_seekdir dir, ios_openmode which) {
// Posix case. // Posix case.
{ {
off_t li = lseek(_fd, off, SEEK_END); off_t li = lseek(_fd, off, SEEK_END);
if (li == (off_t)-1) { if (li == (off_t)-1 || (sizeof(off_t) == 8 && li == 0x7fffffffffffffff)) {
return -1; return -1;
} }
new_pos = (size_t)li; new_pos = (size_t)li;

View File

@ -789,6 +789,7 @@ if (COMPILER=="GCC"):
if (os.path.isdir("/usr/PCBSD")): if (os.path.isdir("/usr/PCBSD")):
IncDirectory("ALWAYS", "/usr/PCBSD/local/include") IncDirectory("ALWAYS", "/usr/PCBSD/local/include")
LibDirectory("ALWAYS", "/usr/PCBSD/local/lib") LibDirectory("ALWAYS", "/usr/PCBSD/local/lib")
SmartPkgEnable("INOTIFY", "libinotify", ("inotify"), "sys/inotify.h")
if GetTarget() != "windows": if GetTarget() != "windows":
PkgDisable("DIRECTCAM") PkgDisable("DIRECTCAM")
@ -2434,7 +2435,6 @@ def WriteConfigSettings():
dtool_config["IS_FREEBSD"] = '1' dtool_config["IS_FREEBSD"] = '1'
dtool_config["PHAVE_ALLOCA_H"] = 'UNDEF' dtool_config["PHAVE_ALLOCA_H"] = 'UNDEF'
dtool_config["PHAVE_MALLOC_H"] = 'UNDEF' dtool_config["PHAVE_MALLOC_H"] = 'UNDEF'
dtool_config["PHAVE_LINUX_INPUT_H"] = 'UNDEF'
dtool_config["HAVE_PROC_CURPROC_FILE"] = '1' dtool_config["HAVE_PROC_CURPROC_FILE"] = '1'
dtool_config["HAVE_PROC_CURPROC_MAP"] = '1' dtool_config["HAVE_PROC_CURPROC_MAP"] = '1'
dtool_config["HAVE_PROC_CURPROC_CMDLINE"] = '1' dtool_config["HAVE_PROC_CURPROC_CMDLINE"] = '1'
@ -3995,7 +3995,7 @@ TargetAdd('libp3dxml.in', opts=['IMOD:panda3d.core', 'ILIB:libp3dxml', 'SRCDIR:p
OPTS=['DIR:panda/metalibs/panda', 'BUILDING:PANDA', 'JPEG', 'PNG', 'HARFBUZZ', OPTS=['DIR:panda/metalibs/panda', 'BUILDING:PANDA', 'JPEG', 'PNG', 'HARFBUZZ',
'TIFF', 'OPENEXR', 'ZLIB', 'FREETYPE', 'FFTW', 'ADVAPI', 'WINSOCK2', 'TIFF', 'OPENEXR', 'ZLIB', 'FREETYPE', 'FFTW', 'ADVAPI', 'WINSOCK2',
'SQUISH', 'NVIDIACG', 'VORBIS', 'OPUS', 'WINUSER', 'WINMM', 'WINGDI', 'IPHLPAPI', 'SQUISH', 'NVIDIACG', 'VORBIS', 'OPUS', 'WINUSER', 'WINMM', 'WINGDI', 'IPHLPAPI',
'SETUPAPI', 'IOKIT'] 'SETUPAPI', 'INOTIFY', 'IOKIT']
TargetAdd('panda_panda.obj', opts=OPTS, input='panda.cxx') TargetAdd('panda_panda.obj', opts=OPTS, input='panda.cxx')

View File

@ -328,7 +328,22 @@ init_device() {
uint8_t axes[(ABS_MAX + 8) >> 3] = {0}; uint8_t axes[(ABS_MAX + 8) >> 3] = {0};
if (test_bit(EV_ABS, evtypes)) { if (test_bit(EV_ABS, evtypes)) {
// Check which axes are on the device. // Check which axes are on the device.
num_bits = ioctl(_fd, EVIOCGBIT(EV_ABS, sizeof(axes)), axes) << 3; int result = ioctl(_fd, EVIOCGBIT(EV_ABS, sizeof(axes)), axes);
#ifdef __FreeBSD__
// Older kernels had a bug where this would always return 0, see D28218
if (result == 0) {
for (int i = ABS_MAX; i >= 0; --i) {
if (test_bit(i, axes)) {
num_bits = i + 1;
break;
}
}
}
else
#endif
if (result > 0) {
num_bits = result << 3;
}
has_axes = true; has_axes = true;
} }
@ -691,6 +706,7 @@ init_device() {
_rtrigger_code = -1; _rtrigger_code = -1;
} }
#ifndef __FreeBSD__
char path[64]; char path[64];
char buffer[256]; char buffer[256];
const char *parent = ""; const char *parent = "";
@ -728,6 +744,7 @@ init_device() {
} }
fclose(f); fclose(f);
} }
#endif
// Special-case fix for Xbox 360 Wireless Receiver: the Linux kernel // Special-case fix for Xbox 360 Wireless Receiver: the Linux kernel
// driver always reports 4 connected gamepads, regardless of the number // driver always reports 4 connected gamepads, regardless of the number

View File

@ -134,6 +134,7 @@ consider_add_evdev_device(size_t ev_index) {
// having read permissions set, but doesn't export all of the features // having read permissions set, but doesn't export all of the features
// (notably, force feedback). // (notably, force feedback).
#ifndef __FreeBSD__
// We do this by checking for a js# directory inside the sysfs directory. // We do this by checking for a js# directory inside the sysfs directory.
sprintf(path, "/sys/class/input/event%zd/device", ev_index); sprintf(path, "/sys/class/input/event%zd/device", ev_index);
@ -168,6 +169,8 @@ consider_add_evdev_device(size_t ev_index) {
} }
closedir(dir); closedir(dir);
#endif
return nullptr; return nullptr;
} }

View File

@ -962,8 +962,26 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
} else { } else {
gl_format = GL_R16F; gl_format = GL_R16F;
} }
} else if (_fb_properties.get_color_bits() > 8 * 3) { } else if (_fb_properties.get_color_bits() > 10 * 3 ||
gl_format = GL_RGB16_EXT; _fb_properties.get_red_bits() > 10 ||
_fb_properties.get_green_bits() > 10 ||
_fb_properties.get_blue_bits() > 10) {
// 16-bit normalized.
if (_fb_properties.get_blue_bits() > 0 ||
_fb_properties.get_color_bits() == 1 ||
_fb_properties.get_color_bits() > 16 * 2) {
gl_format = GL_RGBA16;
} else if (_fb_properties.get_green_bits() > 0 ||
_fb_properties.get_color_bits() > 16) {
gl_format = GL_RG16;
} else {
gl_format = GL_R16;
}
} else if (_fb_properties.get_color_bits() > 8 * 3 ||
_fb_properties.get_red_bits() > 8 ||
_fb_properties.get_green_bits() > 8 ||
_fb_properties.get_blue_bits() > 8) {
gl_format = GL_RGB10_A2;
} else { } else {
gl_format = GL_RGB; gl_format = GL_RGB;
} }
@ -980,7 +998,7 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
if (_fb_properties.get_color_bits() > 16 * 3) { if (_fb_properties.get_color_bits() > 16 * 3) {
gl_format = GL_RGBA32F_ARB; gl_format = GL_RGBA32F_ARB;
} else if (_fb_properties.get_color_bits() > 8 * 3) { } else if (_fb_properties.get_color_bits() > 8 * 3) {
gl_format = GL_RGBA16_EXT; gl_format = GL_RGBA16;
} else { } else {
gl_format = GL_RGBA; gl_format = GL_RGBA;
} }

View File

@ -56,6 +56,13 @@ upcall() {
} }
} }
// Now traverse below. // Now visit all the node's children.
_trav->traverse_below(_data); PandaNodePipelineReader *node_reader = _data.node_reader();
PandaNode::Children children = node_reader->get_children();
node_reader->release();
int num_children = children.get_num_children();
for (int i = 0; i < num_children; ++i) {
CullTraverserData next_data(_data, children.get_child(i));
_trav->traverse(next_data);
}
} }

View File

@ -108,12 +108,14 @@ load_font(const Filename &font_filename, int face_index) {
vfs->resolve_filename(path, get_model_path()); vfs->resolve_filename(path, get_model_path());
exists = vfs->read_file(path, _face->_font_data, true); exists = vfs->read_file(path, _face->_font_data, true);
if (exists) { if (exists) {
FT_Face face; FT_Face face = 0;
error = FT_New_Memory_Face(_face->_ft_library, error = FT_New_Memory_Face(_face->_ft_library,
(const FT_Byte *)_face->_font_data.data(), (const FT_Byte *)_face->_font_data.data(),
_face->_font_data.length(), _face->_font_data.length(),
face_index, &face); face_index, &face);
_face->set_face(face); if (face) {
_face->set_face(face);
}
} }
bool okflag = false; bool okflag = false;