Just reuse the cs atomics bit and emit the hw atomic state.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
void
st_bind_cs_atomics(struct st_context *st)
{
+ if (st->has_hw_atomics) {
+ st_bind_hw_atomic_buffers(st);
+ return;
+ }
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
/* Shader resources */
f->NewTextureBuffer = ST_NEW_SAMPLER_VIEWS;
if (st->has_hw_atomics)
- f->NewAtomicBuffer = ST_NEW_HW_ATOMICS;
+ f->NewAtomicBuffer = ST_NEW_HW_ATOMICS | ST_NEW_CS_ATOMICS;
else
f->NewAtomicBuffer = ST_NEW_ATOMIC_BUFFER;
f->NewShaderStorageBuffer = ST_NEW_STORAGE_BUFFER;