<p>If I understand you correctly, you've added a new compute shader. In DX12, you'll need at least one separate PSO for each shader, since the shader code is part of the PSO.</p>

CC BY-SA 3.0
2017-03-29T17:07:26.910Z
Yes, I have added a new computeshader.hlsl
Madhu
CC BY-SA 3.0
2017-03-29T15:08:09.497Z
2017-03-29T15:08:09.497Z
Nathan Reed
<p>I am new to the DX12 world and I am currently trying to tweak the nbody_gravity DX12 sample, but appending or calling another Compute Shader which is to add 2 buffers to produce an output in a different buffer. </p>

<p>Right now, I have made a call to my ComputeBufferAddition shader and was wondering if I need a separate Compute PSO to do this, or can I reuse the one already present to call the NbodyGravity.hlsl</p>

<directx12>
Compute Shader PSO Dx12
Madhu
# Compute Shader PSO Dx12

(Asked by: username_0 on 2017-03-29)

I am new to the DX12 world and I am currently trying to tweak the nbody\_gravity DX12 sample, but appending or calling another Compute Shader which is to add 2 buffers to produce an output in a different buffer.

Right now, I have made a call to my ComputeBufferAddition shader and was wondering if I need a separate Compute PSO to do this, or can I reuse the one already present to call the NbodyGravity.hlsl

**Tags:** directx12


---

## 1 answers

### Answer by username_1 on 2017-03-29. Score: 2

If I understand you correctly, you've added a new compute shader. In DX12, you'll need at least one separate PSO for each shader, since the shader code is part of the PSO.

> **Comments:**
> **username_0**: Yes, I have added a new computeshader.hlsl  

---

