}
if (set_layout->num_dynamic_buffers > 0) {
- uint32_t s;
+ VkShaderStage s;
for_each_bit(s, set_layout->shader_stages) {
anv_cmd_buffer_ensure_push_constant_field(cmd_buffer, s,
dynamic_offsets);
VkResult
anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
- unsigned stage, struct anv_state *bt_state)
+ VkShaderStage stage, struct anv_state *bt_state)
{
struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
struct anv_subpass *subpass = cmd_buffer->state.subpass;
VkResult
anv_cmd_buffer_emit_samplers(struct anv_cmd_buffer *cmd_buffer,
- unsigned stage, struct anv_state *state)
+ VkShaderStage stage, struct anv_state *state)
{
struct anv_pipeline_layout *layout;
uint32_t sampler_count;
}
static VkResult
-flush_descriptor_set(struct anv_cmd_buffer *cmd_buffer, uint32_t stage)
+flush_descriptor_set(struct anv_cmd_buffer *cmd_buffer, VkShaderStage stage)
{
struct anv_state surfaces = { 0, }, samplers = { 0, };
VkResult result;
void
anv_flush_descriptor_sets(struct anv_cmd_buffer *cmd_buffer)
{
- uint32_t s, dirty = cmd_buffer->state.descriptors_dirty &
- cmd_buffer->state.pipeline->active_stages;
+ VkShaderStage s;
+ VkShaderStageFlags dirty = cmd_buffer->state.descriptors_dirty &
+ cmd_buffer->state.pipeline->active_stages;
VkResult result = VK_SUCCESS;
for_each_bit(s, dirty) {
const void* values)
{
ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, cmdBuffer);
- uint32_t stage;
+ VkShaderStage stage;
for_each_bit(stage, stageFlags) {
anv_cmd_buffer_ensure_push_constant_field(cmd_buffer, stage, client_data);
uint32_t count;
uint32_t num_dynamic_buffers;
- uint32_t shader_stages;
+ VkShaderStageFlags shader_stages;
struct anv_descriptor_slot entries[0];
};
uint32_t vb_dirty;
uint32_t dirty;
uint32_t compute_dirty;
- uint32_t descriptors_dirty;
- uint32_t push_constants_dirty;
+ VkShaderStageFlags descriptors_dirty;
+ VkShaderStageFlags push_constants_dirty;
uint32_t scratch_size;
struct anv_pipeline * pipeline;
struct anv_pipeline * compute_pipeline;
uint32_t nr_gs_entries;
} urb;
- uint32_t active_stages;
+ VkShaderStageFlags active_stages;
struct anv_state_stream program_stream;
struct anv_state blend_state;
uint32_t vs_simd8;
static void
gen8_cmd_buffer_flush_push_constants(struct anv_cmd_buffer *cmd_buffer)
{
- uint32_t stage;
-
static const uint32_t push_constant_opcodes[] = {
[VK_SHADER_STAGE_VERTEX] = 21,
[VK_SHADER_STAGE_TESS_CONTROL] = 25, /* HS */
[VK_SHADER_STAGE_COMPUTE] = 0,
};
- uint32_t flushed = 0;
+ VkShaderStage stage;
+ VkShaderStageFlags flushed = 0;
for_each_bit(stage, cmd_buffer->state.push_constants_dirty) {
struct anv_state state = anv_cmd_buffer_push_constants(cmd_buffer, stage);