Update tri and cube with stage

These changes were cherry-picked from nvidia-dev-20150218 and
KhronosGroup/GDC-stable.
This commit is contained in:
Piers Daniell 2015-02-23 16:23:13 -07:00 committed by Courtney Goeltzenleuchter
parent 7787d820c1
commit 96b14142e9
3 changed files with 23 additions and 2 deletions

14
.gitignore vendored
View File

@ -21,3 +21,17 @@ layers/xgl_struct_string_helper.h
layers/xgl_struct_wrappers.cpp
layers/xgl_struct_wrappers.h
_out64
out32/*
out64/*
demos/Debug/*
demos/tri.dir/Debug/*
demos/tri/Debug/*
*.pyc
*.vcproj
*.sln
*.suo
*.vcxproj
*.sdf
*.filters
demos/Win32/Debug/*
demos/xcb_nvidia.dir/*

View File

@ -22,7 +22,7 @@ if (WIN32)
add_library(XGL SHARED loader.c loader.h dirent_on_windows.c dispatch.c table_ops.h XGL.def)
set_target_properties(XGL PROPERTIES LINK_FLAGS "/DEF:${PROJECT_SOURCE_DIR}/loader/XGL.def")
add_library(XGLstatic STATIC loader.c loader.h dirent_on_windows.c dispatch.c table_ops.h)
set_target_properties(XGLstatic PROPERTIES OUTPUT_NAME XGL)
set_target_properties(XGLstatic PROPERTIES OUTPUT_NAME XGLstatic)
target_link_libraries(XGL)
endif()
if (NOT WIN32)

View File

@ -237,11 +237,18 @@ static char * loader_platform_get_proc_address_error(const char *name)
typedef HANDLE loader_platform_thread;
#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var) \
INIT_ONCE var = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK InitFuncWrapper(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
{
void (*func)(void) = (void (*)(void))Parameter;
func();
return TRUE;
}
static void loader_platform_thread_once(void *ctl, void (* func) (void))
{
assert(func != NULL);
assert(ctl != NULL);
InitOnceExecuteOnce((PINIT_ONCE) ctl, (PINIT_ONCE_FN) func, NULL, NULL);
InitOnceExecuteOnce((PINIT_ONCE) ctl, InitFuncWrapper, func, NULL);
}
// Thread IDs: