nvmcjohn / apitest Goto Github PK
View Code? Open in Web Editor NEWSimple comparison framework for APIs
License: Other
Simple comparison framework for APIs
License: Other
CMake Error at thirdparty/SDL2-2.0.1/CMakeLists.txt:2 (message):
Prevented in-tree built. Please create a build directory outside of the
SDL source code and call cmake from there
Hello!
Can you explain please why you didn't use MAP_COHERENT_BIT here:
https://github.com/nvMcJohn/apitest/blob/master/src/solutions/untexturedobjects/gl/bufferstorage.cpp#L139
Sorry in case I missed it...
Does anyone else see this in the example?? i changed the FOV so i could see the small rectangles zoomed in, and noticed that the texture looks incorrectly applied to the quad. I verified this in my own code. I'm on ubuntu so maybe it is a linux issue.
I got some undefined references errors for SDL symbols while linking:
https://gist.github.com/cguentherTUChemnitz/6b0889a46bd562d4147a
The related cmake output:
https://gist.github.com/cguentherTUChemnitz/95419f2b6648f8841974
best,
CG
I believe there is a bug in bufferstorage.cpp when rendering using the circular buffers.
The buffers are updated in the right order (Range1->Range2->Range3->Range1->...) but for drawing it seems to me as if always Range1 (for both buffers) is used.
So I think you are missing a call to glBindBufferRange for mTransformBuffer (with mHead * sizeof(Atom) and xformCount * sizeof(Atom)) and an offset into mCommands, something like
glMultiDrawElementsIndirect(GL_TRIANGLES, GL_UNSIGNED_SHORT, static_cast<char *>(nullptr) + mCommands.mHead * sizeof(DrawElementsIndirectCommand), xformCount, 0);
It looks like doing unnecessary locks.. The procedure looks like this:
Lets say we have 2 ranges.
Range1 and Range2.
Starting:
Check for Range1, not in the locked list, so continue.
Make DrawCall and Add Range1 to lock list.
Check for Range2, not in the locked list, so continue. (Range1's operation on GPU is done here)
Make DrawCall and Add Range2 to lock list.
Check for Range1, it is in the list. So Call glClientWaitSync() and wait for GPU to finish since it is working for Range2. (Unnecessary wait since Range1's operation is done and is not in use)
Make DrawCall and Add Range1 to lock list.
.
.
.
And it will repeat for other ranges too.. and make unnecessary waits. If I'm mistaken,
can someone please explain and help me understand how the procedure actually work.
Various "solutions" use clientspace data instead of buffers for glDraw*Indirect.
The latest spec revision states that these calls are wrong without a buffer. The extension spec also states the same. There's a minor statement that these functions "may" be used with a buffer, but the error-codes are clear.
Furthermore, it's somewhat funny to use clientspace data with a function designed specifically for buffers.
Ubuntu 14.04 LTS
OpenGL renderer string: AMD Radeon R9 200 Series
OpenGL version string: 4.4.12874 Compatibility Profile Context 14.10.1006
The multidraw examples do not work on my linux config. Examples that use Shader Draw Params hang my config. Requiring a kill -9 on the process
GLMultiDraw-NoSDP only renders one of the cubes.
GLMultiDraw-SDP hangs the driver
If you replace gl_DrawIDARB with gl_BaseInstanceARB for GLMultiDraw-SDP, the driver does not hang. The output then matches GLMultiDraw-NoSDP. But note that output is still incorrect.
In the UntexturedObjectsGLMapUnsynchronized
in the init()
you map and create a 3 times bigger buffer
glGenBuffers(1, &m_transform_buffer);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, m_transform_buffer);
mTransformBufferSize = kTripleBuffer * sizeof(Matrix) * _objectCount;
glBufferData(GL_SHADER_STORAGE_BUFFER, mTransformBufferSize, nullptr, GL_DYNAMIC_DRAW);
But then in the render you update each frame a different part leaving always the whole 3-times-big buffer mapped.
And indeed you can see the cubes rotating only once every ~3s (since 1.2 fps)
I guess you may want to add a
glBindBufferRange(GL_SHADER_STORAGE_BUFFER, 0, m_transform_buffer, mStartDestOffset, count * sizeof(Matrix));
Hello!
In apitest main loop looks like this:
while(1)
{
render();
SwapBuffers();
}
Why would we ever need a synchronization (triple buffer + fence) while SwapBuffers is equivalent to glFinish thus on next render() call GPU will be free of work?
The make command for *nix fails at the end due to undefined references.
Steps to reproduce:
[100%] Linking CXX executable ../../bin/apitest
../thirdparty/SDL2-2.0.1//libSDL2.a(SDL_sysjoystick.c.o): In function `JoystickInitWithUdev':
/home/beau/Code/Misc/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:331: undefined reference to `SDL_UDEV_Init'
/home/beau/Code/Misc/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:336: undefined reference to `SDL_UDEV_AddCallback'
/home/beau/Code/Misc/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:342: undefined reference to `SDL_UDEV_Scan'
/home/beau/Code/Misc/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:337: undefined reference to `SDL_UDEV_Quit'
../thirdparty/SDL2-2.0.1//libSDL2.a(SDL_sysjoystick.c.o): In function `SDL_SYS_JoystickQuit':
/home/beau/Code/Misc/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:860: undefined reference to `SDL_UDEV_DelCallback'
../thirdparty/SDL2-2.0.1//libSDL2.a(SDL_sysjoystick.c.o): In function `SDL_SYS_JoystickDetect':
/home/beau/Code/Misc/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:382: undefined reference to `SDL_UDEV_Poll'
../thirdparty/SDL2-2.0.1//libSDL2.a(SDL_sysjoystick.c.o): In function `SDL_SYS_JoystickQuit':
/home/beau/Code/Misc/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:861: undefined reference to `SDL_UDEV_Quit'
collect2: error: ld returned 1 exit status
src/CMakeFiles/apitest.dir/build.make:1344: recipe for target '../bin/apitest' failed
make[2]: *** [../bin/apitest] Error 1
CMakeFiles/Makefile2:253: recipe for target 'src/CMakeFiles/apitest.dir/all' failed
make[1]: *** [src/CMakeFiles/apitest.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
*-display
description: VGA compatible controller
product: GK104 [GeForce GTX 760]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:31 memory:f6000000-f6ffffff memory:e8000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff
filename: /lib/modules/4.13.0-46-generic/updates/dkms/nvidia_384.ko
alias: char-major-195-*
version: 384.130
supported: external
license: NVIDIA
srcversion: 586B4E0CF4083A6BC41A33B
alias: pci:v000010DEd00000E00svsdbc04sc80i00*
alias: pci:v000010DEdsvsdbc03sc02i00
alias: pci:v000010DEdsvsdbc03sc00i00
depends:
name: nvidia
vermagic: 4.13.0-46-generic SMP mod_unload
parm: NVreg_Mobile:int
parm: NVreg_ResmanDebugLevel:int
parm: NVreg_RmLogonRC:int
parm: NVreg_ModifyDeviceFiles:int
parm: NVreg_DeviceFileUID:int
parm: NVreg_DeviceFileGID:int
parm: NVreg_DeviceFileMode:int
parm: NVreg_UpdateMemoryTypes:int
parm: NVreg_InitializeSystemMemoryAllocations:int
parm: NVreg_UsePageAttributeTable:int
parm: NVreg_MapRegistersEarly:int
parm: NVreg_RegisterForACPIEvents:int
parm: NVreg_CheckPCIConfigSpace:int
parm: NVreg_EnablePCIeGen3:int
parm: NVreg_EnableMSI:int
parm: NVreg_TCEBypassMode:int
parm: NVreg_UseThreadedInterrupts:int
parm: NVreg_EnableStreamMemOPs:int
parm: NVreg_MemoryPoolSize:int
parm: NVreg_RegistryDwords:charp
parm: NVreg_RegistryDwordsPerDevice:charp
parm: NVreg_RmMsg:charp
parm: NVreg_AssignGpus:charp
Hi,
I tried to build it on Win10 and VS 15 2017 but I get the following error:
2>LINK : fatal error LNK1104: cannot open file 'dxerr.lib'
2>Done building project "SDL2.vcxproj" -- FAILED.
How may I solve it?
윈도우10 32비트 - VS2015 Community - Release 모드로 컴파일에 성공했다.
Debug 모드는 컴파일이 잘 안된다.
http://cfile212.uf.daum.net/image/26128F4E57E640C71C61FC
apitest.sln 프로젝트가 생성됐다.
http://cfile232.uf.daum.net/image/2246A04A57E641C13076F8
그냥. 같이 컴파일 하면 될거 같았는데. 잘 안되니까.
SDL프로젝트를 별도로 컴파일 해두자.
http://cfile203.uf.daum.net/image/2365BD4F57E642480C9333
SDL SDLmain SDLtest tests 폴더를 보면. 각각에 실행되는 테스트 예제가 생성된다.
음악. 조이스틱. 다양한 예제가 있다.
http://cfile232.uf.daum.net/image/2601654A57E64A411DAF47
http://cfile204.uf.daum.net/image/2411A44A57E64A410FDAC8
http://cfile222.uf.daum.net/image/23147B4A57E64A430C9979
http://cfile226.uf.daum.net/image/2567E54A57E64A43326DC4
http://cfile216.uf.daum.net/image/2766FC4A57E64A44333502
http://cfile229.uf.daum.net/image/255B554C57E644B6053D63
오류가 나는데.
HLSL 속성에서 셰이더의 메인함수 이름을 같게 맞춰줘야 한다.
여기서는 psMain 이니. psMain 으로 해준다.
셰이더 형식도 픽셀 셰이더'로 적어야 한다.
http://cfile228.uf.daum.net/image/25640C4C57E645C5012AF5
http://cfile226.uf.daum.net/image/21486F4A57E646433FB78F
http://cfile208.uf.daum.net/image/214AC24857E646940C6A1F
C:\apitest-master\bin 폴더에서 apitest.exe 프로그램을 실행해보면. 이와같이 실행된다.
이건 엉터리지만. 컴파일에 성공한 실행파일이다.
apitest execute.zip
http://cfile213.uf.daum.net/attach/2148DB4957E648BB155F90
방향키 왼쪽. 오른쪽
영문키 A 를 누르면. 여러가지 모드를 확인해볼 수 있다.
이건 엉터리지만. 컴파일이 된 프로젝트 파일이다.
build.zip
http://cfile224.uf.daum.net/attach/231B064A57E64B330AC4B5
http://cfile209.uf.daum.net/image/2611E25057E6484231972B
I see a lot of messages like this on OS X:
Warning: Unable to initialize solution 'GLMultiDrawBuffer-NoSDP', shader compilation/linking failed.
SDL and cmake are from the latest homebrew. OS X 10.9.5 on a Macbook Pro Retina.
I also see a bunch of SDL messages like this:
opengl/apitest/thirdparty/SDL2-2.0.1/src/haptic/darwin/SDL_syshaptic.c:130:10: warning: overflow converting case value to switch condition type (2147746313 to -2147220983) [-Wswitch]
case FFERR_UNPLUGGED:
Thanks.
Need to (better) support OSX.
../thirdparty/SDL2-2.0.1//libSDL2.a(SDL_sysjoystick.c.o): In function JoystickInitWithUdev': /home/joessu/Clionprojects/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:330: undefined reference to
SDL_UDEV_Init'
/home/joessu/Clionprojects/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:335: undefined reference to SDL_UDEV_AddCallback' /home/joessu/Clionprojects/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:341: undefined reference to
SDL_UDEV_Scan'
/home/joessu/Clionprojects/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:336: undefined reference to SDL_UDEV_Quit' ../thirdparty/SDL2-2.0.1//libSDL2.a(SDL_sysjoystick.c.o): In function
SDL_SYS_JoystickQuit':
/home/joessu/Clionprojects/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:859: undefined reference to SDL_UDEV_DelCallback' ../thirdparty/SDL2-2.0.1//libSDL2.a(SDL_sysjoystick.c.o): In function
SDL_SYS_JoystickDetect':
/home/joessu/Clionprojects/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:381: undefined reference to SDL_UDEV_Poll' ../thirdparty/SDL2-2.0.1//libSDL2.a(SDL_sysjoystick.c.o): In function
SDL_SYS_JoystickQuit':
/home/joessu/Clionprojects/apitest/thirdparty/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c:860: undefined reference to `SDL_UDEV_Quit'
collect2: error: ld returned 1 exit status
make[3]: *** [/home/joessu/Clionprojects/apitest/bin/apitest_d] Error 1
make[2]: *** [src/CMakeFiles/apitest.dir/all] Error 2
make[1]: *** [src/CMakeFiles/apitest.dir/rule] Error 2
make: *** [apitest] Error 2
tried to install different debians but still the same result. Any ideas how to fix?
Line 162:
mCmdBufferLock.LockRange(0, sizeof(DrawElementsIndirectCommand) * objCount);
I'd have expected mCmdOffset instead of 0. It this intentional?
Also, I noticed that everything works even if I remove GL_DYNAMIC_STORAGE_BIT from the create flags. Reading the documentation on the OpenGL website, it says the flag is required if glBufferSubData() updates are to be used, but it doesn't mention anything about updates through mapping.
In the same file, I noticed that instead of a coherent mapping, glMemoryBarrier(GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT) is used. I understand that, and makes sense as multiple buffers are updated, but what is not clear is the ordering of the draw command with respect to the locks. In the other solutions, where coherent mapping was used, the draw command came before the lock. How is it that in this file it's different? Does it only apply to indirect draws?
The GLBindless & GLBindlessIndirect solutions to the UntexturedObjects fail to render on my Ubuntu 14.04 LTS system running the 331.79 drivers on an Nvidia 750. Watching available VRAM, these solutions appear to blow video memory. VRAM raises rapidly, appears to crash down to initial VRAM usage, then increase again.
Rendering 32x32x32 cubes works fine.
Whether the Nvidia driver should use that much VRAM is a question I didn't research.
I can't compile this under visual studios for some reason. It's giving me a no main entry point error. Project apitest, file FXC
In the examples, persistently mapped buffers without the coherent bit set use a barrier of GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT before the drawing command. However, I didn't see an example of streaming texture data from system RAM. How can that be best done using a persistent mapped PBO (but not coherent)? I tried previously using two PBOs in a ping-pong fashion with persistent and coherent mapping, and the performance was worse than the older pattern of orphan and map with unsynchronized bit set on the PBOs (noticeable stuttering when streaming HD resolution textures from a system RAM buffer holding decoded video frames on GTX 680), so I want to see if avoiding the coherent bit will be better. Would the best method be write to a persistent PBO(s) then use a barrier of GL_PIXEL_BUFFER_BARRIER_BIT before the glTexSubimage2D()?
I'm experiencing issues on nvidia linux driver when allocating storage for sparse texture, using the sparse texture bindless approach.
I'm using the GL_RGBA8 texture format and the call to glTexStorage3D of the sparse texture lasts too much (even 20 seconds) increasing width, height and slices parameters.
Using compressed format of the example there are no issues.
On Windows platfrom there are no issues at all even using width, height and slices set to 2048.
Test Hardware: Nvidia GTX 750M (Optimus)
Linux Platform: Arch Linux Kernel 4.1.6, Nvidia Driver 352.41
Windows Platform: Windows 8.1, Nvidia Driver 355.60
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.