Questions tagged [directcompute]

Microsoft DirectCompute is an application programming interface (API) that supports general-purpose computing on graphics processing units on Microsoft's Windows Vista, Windows 7 and Windows 8.

DirectCompute is part of the Microsoft DirectX collection of APIs, and was initially released with the DirectX 11 API but runs on graphics processing units that use either DirectX 10 or DirectX 11.

The DirectCompute architecture shares a range of computational interfaces with its competitors: OpenCL and CUDA.

79 questions
1
vote
2 answers

Can DirectCompute really be used on a DX10.1 GPU?

Are there any limitations with using DirectCompute on DX10.1 GPUs? I will do most of my development on a DX11 desktop, but I'd like to demo code on a DX10.1 laptop. It'll be a Macbook Pro running Win7 in Bootcamp. The GPU is an Nvidia 330M. What…
royco
  • 5,409
  • 13
  • 60
  • 84
1
vote
1 answer

DirectCompute shader data input/output

I am learning DirectCompute and I am stuck with StructuredBufferes. The thing is I learned that to supply data to shader I need to use a View - SRV or UAV, depending on what I am trying to achieve. But code examples from Microsoft site do not…
Ilia
  • 331
  • 5
  • 12
1
vote
1 answer

DX11 Compute Shader writes only to one index

I really can't figure out what's going on here. I have a compute shader that takes in an FFT result (from real input) and computes the powers of each bin, storing them in a different buffer (UAV). The FFT implementation is that of the D3DCSX…
NmdMystery
  • 2,778
  • 3
  • 32
  • 60
1
vote
2 answers

DirectX on WPF Geometry

I just have a question: I need to draw some WPF geometries in a canvas, and each geometry's surface is a complicate Texture2D in Direct3D 11. I'm using SharpDX and just convert the Texture2D into a MemoryStream then Convert to a WPF ImageSource,…
1
vote
2 answers

Threads on the GPU

I'm using DirectCompute to do general computing on the GPU. Currently, I'm trying to operate on a texture with resolution 1920x1080. I have a Dispatch(2, 1080, 1) and numthreads(960, 1, 1) which according to my calculations exactly covers my image…
l3utterfly
  • 2,106
  • 4
  • 32
  • 58
1
vote
1 answer

using HLSL to invisibly stress a graphics card - How to stress the memory?

I've been developing for a bit an invisible (read: doesn't produce any visual output) stressor to test the capabilities of my graphics card (and as a exploration of DirectCompute in general, with which I'm pretty new). I've got the following code…
Zach H
  • 469
  • 5
  • 18
1
vote
0 answers

DirectCompute and Multiple Devices?

Is it possible to split work up between multiple devices (GPUs), like you can with CUDA? How does this look in code? Hard to find proper documentation for DirectCompute, and the SDK doesn't show any examples of this.
user1043761
  • 696
  • 6
  • 22
0
votes
0 answers

How to get correct output of compute shader in dx11,I use SharpDx

float[] buffer = new float[]{1,2,3,4,5,6,7,8,9}; var vertexArray = MemoryMarshal.Cast(buffer).ToArray(); var device = new Device(DriverType.Hardware, DeviceCreationFlags.Debug); var…
0
votes
1 answer

Num Threads trade-off in non-parallelizable work

I've been a good boy and parallelized my compute shader to execute 955 threads for 20 iterations [numthreads(955, 1, 1)] void main( uint3 pos : SV_DispatchThreadID ) { ... for (uint i = 0; i < 20; i++) { …
Tom Huntington
  • 2,260
  • 10
  • 20
0
votes
1 answer

Dispatching more than 65535 threads

I'm attempting to skin vertices using DirectCompute. The method of skinning employed is such that you can have a variable amount of weights influencing each vertex (e.g. Md5 meshes are defined this way). Basically inputs to the compute shader…
user515136
0
votes
1 answer

There can be at most 65535 Thread Groups in each dimension of a Dispatch call

I have a DirectCompute application making computation on images (Like computing average pixel value, applying a filter and much more). For some computation, I simply treat the image as an array of integer and dispatch a computer shader like…
fpiette
  • 11,983
  • 1
  • 24
  • 46
0
votes
1 answer

DirectCompute shader (HLSL) has strange array size

I'm struggling by the way a compute shader store an array of uint. I have the following shader code (A simple minimalist example to reproduce the problem): cbuffer TCstParams : register(b0) { int IntValue1; uint UIntArray[10]; // <==…
fpiette
  • 11,983
  • 1
  • 24
  • 46
0
votes
0 answers

DirectCompute D3DReflect GetConstantBufferByIndex always return null pointer

I'm trying to get reflection information for a compute shader compiled by my program by calling D3DCompile() or D3DCompile2(). Compilation is OK, confimed by code executing correctly. Then I call D3DReflect to get a reflector against the compiled…
fpiette
  • 11,983
  • 1
  • 24
  • 46
0
votes
1 answer

DirectCompute multithreading performance (threads and thread groups) for multidimensional array processing

I understand that Disptach(x, y, z) will defines how many groups of threads are instanciated and numthreads(n, m, p) gives the size of each group. Combined together, Dispatch and numthreads give the total number of threads. I also understood that…
fpiette
  • 11,983
  • 1
  • 24
  • 46
0
votes
1 answer

DirectCompute shader: how to get rid of warning X3205: 'round'

In a compute shader model 5, I have the result of some computation in a double precision floting point value. I have to assign the value to an integer variable and I get the warning: warning X3205: 'round': conversion from larger type to smaller,…
fpiette
  • 11,983
  • 1
  • 24
  • 46