• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
smallGame

Interoperability openCL DirectX11

5 posts in this topic

Hi,

 

My problem is at the compilation stage, or even before :

 

I don't have the functions : clGetDeviceIDsFromD3D11KHR, ...etc in my <CL/cl_d3d11.h>, instead I have this function pointer clGetDeviceIDsFromD3D11KHR_fn.

 

I have the "cl_khr_d3d11_sharing" strng in my platform extension information.

 

I tried to add #pragma OPENCL EXTENSION cl_khr_d3d11_sharing : enable, but doesn't work.

 

So if you have any idea, or if you already used it I am really interested.

 

Thanks,

0

Share this post


Link to post
Share on other sites
Have a look at the OpenCL Programming Guide book samples D3D10 interop (chapter 11) to get the picture. The clGetDeviceIDsFromD3D11KHR_fn is not a function pointer yet, but the type (signature) of your function pointer. Declare one like so
clGetDeviceIDsFromD3D11KHR_fn clGetDeviceIDsFromD3D11KHR = NULL;
To get the function you use clGetExtensionFunctionAddress. The sample uses some macro magic:
#define INITPFN(x) \
    x = (x ## _fn)clGetExtensionFunctionAddress(#x);\
    if(!x) { printf("failed getting %s", #x); }
... to ease the call, so in this case:
INITPFN(clGetDeviceIDsFromD3D11KHR);
1

Share this post


Link to post
Share on other sites

Thanks a lot !!

This stuff is amazing, I was simulating 1 million force field particles at 30 FPS, now at more than 400 FPS :)

I was expecting a big gain because of all return tickets I was paying from CPU to GPU, now there is none !

Edited by smallGame
0

Share this post


Link to post
Share on other sites

Glad to hear. You got some nice screen shots ? 

 

Out of curiosity: Why not use compute shaders ? Limitations because of D3D10 hardware (cs_4_0) ?

1

Share this post


Link to post
Share on other sites

I don't know exactly why I used openCL, I wanted to use this tech like a aim. I was thinking to port my code from openCL to Direct Compute but then I thought it will be easier to integrate the interoperability. And I think there is something really good with openCL, it is scalable even on CPU, so I don't have to do some multi-threading , openCL will do it for me. The other good thing with openCL it is that is portable. I also wanted to integrate my stuff in a friend engine which is in OpenGL on i Platform.

 

So maybe now you d like to know why I used DirectX11 :) I wanted also used this tech because it was used in my job, and I knew some HLSL.

 

I don't have any screen shot but I created a Youtube channel : http://www.youtube.com/user/uuuq78/videos

Galaxy is the one I was talking about. In the video description I put the benchmarks in ms. I will update my videos and benchmarks with the interoperability when I will have integrated it correctly.

1

Share this post


Link to post
Share on other sites
Videos are even better. Quite some nice GPGPU samples you got there. Congrats.

I just wanted to hear if you had any troubles with compute shaders at all. Because I had half a year ago, so be warned: The compiler sometimes took minutes or crashed. If it compiled, the shader sometimes produced silly results. Then again, I probably did something blatantly wrong design-wise and also still used the June 2010 SDK compiler (which also has troubles with tesselation). If you go compute shader make sure to use the newest one (coming with the Windows 8 Kit).

I was so fed up to give OpenCL a shot. Played with Cloo (I'm using C#) and was positively surprised. Compilation took seconds at most (subsequent compilation even seems to be cached by the NVidia driver), and the results were fine.

Edit: That performance number of your particles is quite impressive. Smells like the interop isn't that bad a staller. Or do you have such a beefy hardware ? wink.png. If you do transliterate that sample to a compute shader, don't forget to post a comparison, please. Edited by unbird
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0