Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

99 Neutral

About _Flame1_

  • Rank
  1. I agree. After i've done this. clGetDeviceInfo(device[0], CL_DEVICE_MAX_WORK_GROUP_SIZE, sizeof(size_t), &work_group, &ret_work_group);local_ws = work_group;global_ws = var_size / work_group; then cpu was faster anyway. But after i've changed function on:c[iGID] = a[iGID] + sqrt(b[iGID] * b[iGID]); then gpu was faster in about 3.5 times. So it works. Thanks for your help guys. But i'm wondering about global and local groups. If i have that right the local group is amount of gpu processors which run kernel function simultaneously. And global is count of such passes. Is it right? How should i calculate global group properly?
  2. Hello. I've created my first program with opencl. __kernel void vector_add_gpu (__global const float* a, __global const float* b, __global float* c, int iNumElements){ // get index into global data array int iGID = get_global_id(0); // bound check (equivalent to the limit on a 'for' loop for standard/serial C code if (iGID < iNumElements) { // add the vector elements c[iGID] = a[iGID] + b[iGID]; }} I have a quite big buffer with numbers(about 240 mbyte). Opencl spends in 5 time more then a cpu loop. Is it ok or something is wrong? If i have more complicated function(c[iGID] = a[iGID] + sqrt(b[iGID] * b[iGID]);) than difference is much bigger(in 150 times) :)Thank you.   P.S. sorry my previous case was wrong i forget to put opencl file to the folder. :)
  3. _Flame1_

    DX11 software mode.

    Turns out that it's impossible to create ref device and after that create a swap chain. Only D3D11CreateDeviceAndSwapChain works properly with ref device. It must be bug of DirectX.
  4. _Flame1_

    DX11 software mode.

    Any ideas? Firstly i invoke D3D11CreateDevice and secondly IDXGIFactory->CreateSwapChain; My SwapChainDescription is quite simple. DXGI_SWAP_CHAIN_DESC sd; ZeroMemory( &sd, sizeof( sd ) ); sd.BufferCount = 1; sd.BufferDesc.Width = 640; sd.BufferDesc.Height = 480; sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; sd.BufferDesc.RefreshRate.Numerator = 60; sd.BufferDesc.RefreshRate.Denominator = 1; sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; sd.OutputWindow = g_hWnd; sd.SampleDesc.Count = 1; sd.SampleDesc.Quality = 0; sd.Windowed = TRUE; I took it from msdn example.
  5. _Flame1_

    DX11 software mode.

    Thanks. D3D_DRIVER_TYPE_REFERENCE is working now with NULL adapter. But i can't create swap chain now. The function CreateSwapChain returns error - 0x887A0001(DXGI_ERROR_INVALID_CALL). Also i can't run my application with WARP. D3D_DRIVER_TYPE driver = D3D_DRIVER_TYPE_WARP; D3D11CreateDevice(0, driver, 0, 0, 0, 0, D3D10_SDK_VERSION, &pDevice, NULL, NULL ); I have an error "The parameter is incorrect" again.
  6. _Flame1_

    DX11 software mode.

    Yes. It's not good if it will be nessesary to install DirectX SDK but it's alright. Ok, here is my code. D3D_DRIVER_TYPE driver = D3D_DRIVER_TYPE_REFERENCE; D3D11CreateDevice(pAdapter, driver, 0, 0, 0, 0, D3D11_SDK_VERSION, &pDevice, NULL, NULL ); Also i've tried D3D_DRIVER_TYPE_WARP. And i have HRESULT - 0x80070057(The parameter is incorrect. ) all time. Yes, i have installed latest DirectX Sdk.
  7. _Flame1_

    DX11 software mode.

    For WARP you just specify D3D_DRIVER_TYPE_WARP in your D3D11CreateDeviceAndSwapChain call. That's all documented in the SDK.[/quote] I use D3D11CreateDevice and this flag doesn't work for me. I've tried all software flags(ref, warp and soft) and no one works. I've got an error "incorrect parameter". As I flagged above, be very very certain that you do in fact need a software device before jumping in and creating one. You indicated that your understanding was that Windows 7 doesn't support D3D11 but that understanding is wrong. Even if you do need to run a program on downlevel (i.e. D3D9 or 10 class) hardware you can still do so via feature levels - check the link I provided above.[/quote] No, you didn't understand me. I wrote that WARP doesn't have DX11 if i correctly understand msdn.
  8. _Flame1_

    DX11 software mode.

    Dear Hodgman i don't know this topic and it's easy for me not to understand correctly. They said that i need to put a handle where driver is. But i thought that it's in my application. Ok. it was a mistake, now i've got it. I've ask some example or maybe small piece of code. Advice about implementing a driver is really joke for me. I didn't ask that at all. All i need is to run my application in software mode. What should i do for that? I don't need abstract advice i need practical. You can either * load a software driver DLL (which you can write yourself, in theory...), * use WARP with it's feature level restrictions, or * use the reference device, although it's supposed to only be used for debugging purposes. [/quote] 1. I can't do the first one. 2. How? 3. How? What the hell should i do for 2 and 3 options?
  9. _Flame1_

    DX11 software mode.

    Guys why are you decreasing my reputation? I just need to use software mode for my application, no more. Is it problem?
  10. _Flame1_

    DX11 software mode.

    Very funny Nik02. I need to implement a software driver for that. A reference driver, which is a software implementation that supports every Direct3D feature. A reference driver is designed for accuracy rather than speed and as a result is slow but accurate. The rasterizer portion of the driver does make use of special CPU instructions whenever it can, but it is not intended for retail applications; use it only for feature testing, demonstration of functionality, debugging, or verifying bugs in other drivers. This driver is installed by the DirectX SDK. This driver may be referred to as a REF driver, a reference driver or a reference rasterizer.[/quote] Where can i get that driver? I see that DX runtime has D3D11Ref.dll. What's that?
  11. _Flame1_

    DX11 software mode.

    It's me again but under abit different nickname coz i don't have pass here from my original nickname I've read about those limitations here - http://msdn.microsof...8(v=vs.85).aspx A WARP driver, which is a high-performance software rasterizer. The rasterizer supports feature levels 9_1 through level 10_1 with a high performance software implementation Note The WARP driver that Windows 8 includes supports feature levels 9_1 through level 11_1.[/quote] But anyway i'm not successfull in the any software modes now. My app is .net. And i do such thing - GetModuleHandle("MayApp.vcshost.exe"); and this function retuns handle which isn't null but i again have error - "Incorrect parameter" in the function [font=monospace]D3D11CreateDivice. [/font]What's wrong?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!