*/
void
brw_upload_pull_constants(struct brw_context *brw,
- GLbitfield brw_new_constbuf,
+ GLbitfield64 brw_new_constbuf,
const struct gl_program *prog,
struct brw_stage_state *stage_state,
- const struct brw_stage_prog_data *prog_data,
- bool dword_pitch)
+ const struct brw_stage_prog_data *prog_data)
{
- int i;
+ unsigned i;
uint32_t surf_index = prog_data->binding_table.pull_constants_start;
if (!prog_data->nr_pull_params) {
if (stage_state->surf_offset[surf_index]) {
stage_state->surf_offset[surf_index] = 0;
- brw->state.dirty.brw |= brw_new_constbuf;
+ brw->ctx.NewDriverState |= brw_new_constbuf;
}
return;
}
*/
_mesa_load_state_parameters(&brw->ctx, prog->Parameters);
- /* CACHE_NEW_*_PROG | _NEW_PROGRAM_CONSTANTS */
+ /* BRW_NEW_*_PROG_DATA | _NEW_PROGRAM_CONSTANTS */
uint32_t size = prog_data->nr_pull_params * 4;
drm_intel_bo *const_bo = NULL;
uint32_t const_offset;
}
brw_create_constant_surface(brw, const_bo, const_offset, size,
- &stage_state->surf_offset[surf_index],
- dword_pitch);
+ &stage_state->surf_offset[surf_index]);
drm_intel_bo_unreference(const_bo);
- brw->state.dirty.brw |= brw_new_constbuf;
+ brw->ctx.NewDriverState |= brw_new_constbuf;
}
struct brw_vertex_program *vp =
(struct brw_vertex_program *) brw->vertex_program;
- /* CACHE_NEW_VS_PROG */
+ /* BRW_NEW_VS_PROG_DATA */
const struct brw_stage_prog_data *prog_data = &brw->vs.prog_data->base.base;
/* _NEW_PROGRAM_CONSTANTS */
brw_upload_pull_constants(brw, BRW_NEW_VS_CONSTBUF, &vp->program.Base,
- stage_state, prog_data, false);
+ stage_state, prog_data);
}
const struct brw_tracked_state brw_vs_pull_constants = {
.dirty = {
.mesa = _NEW_PROGRAM_CONSTANTS,
.brw = BRW_NEW_BATCH |
- BRW_NEW_VERTEX_PROGRAM,
- .cache = CACHE_NEW_VS_PROG,
+ BRW_NEW_BLORP |
+ BRW_NEW_VERTEX_PROGRAM |
+ BRW_NEW_VS_PROG_DATA,
},
.emit = brw_upload_vs_pull_constants,
};
if (!prog)
return;
- /* CACHE_NEW_VS_PROG */
+ /* BRW_NEW_VS_PROG_DATA */
brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_VERTEX],
- &brw->vs.base, &brw->vs.prog_data->base.base);
+ &brw->vs.base, &brw->vs.prog_data->base.base);
}
const struct brw_tracked_state brw_vs_ubo_surfaces = {
.dirty = {
.mesa = _NEW_PROGRAM,
.brw = BRW_NEW_BATCH |
- BRW_NEW_UNIFORM_BUFFER,
- .cache = CACHE_NEW_VS_PROG,
+ BRW_NEW_BLORP |
+ BRW_NEW_UNIFORM_BUFFER |
+ BRW_NEW_VS_PROG_DATA,
},
.emit = brw_upload_vs_ubo_surfaces,
};
ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
if (prog) {
- /* CACHE_NEW_VS_PROG */
- brw_upload_abo_surfaces(brw, prog, &brw->vs.base,
- &brw->vs.prog_data->base.base);
+ /* BRW_NEW_VS_PROG_DATA */
+ brw_upload_abo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_VERTEX],
+ &brw->vs.base, &brw->vs.prog_data->base.base);
}
}
.dirty = {
.mesa = _NEW_PROGRAM,
.brw = BRW_NEW_ATOMIC_BUFFER |
- BRW_NEW_BATCH,
- .cache = CACHE_NEW_VS_PROG,
+ BRW_NEW_BATCH |
+ BRW_NEW_BLORP |
+ BRW_NEW_VS_PROG_DATA,
},
.emit = brw_upload_vs_abo_surfaces,
};
+
+static void
+brw_upload_vs_image_surfaces(struct brw_context *brw)
+{
+ struct gl_context *ctx = &brw->ctx;
+ /* BRW_NEW_VERTEX_PROGRAM */
+ struct gl_shader_program *prog =
+ ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
+
+ if (prog) {
+ /* BRW_NEW_VS_PROG_DATA, BRW_NEW_IMAGE_UNITS, _NEW_TEXTURE */
+ brw_upload_image_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_VERTEX],
+ &brw->vs.base, &brw->vs.prog_data->base.base);
+ }
+}
+
+const struct brw_tracked_state brw_vs_image_surfaces = {
+ .dirty = {
+ .mesa = _NEW_TEXTURE,
+ .brw = BRW_NEW_BATCH |
+ BRW_NEW_BLORP |
+ BRW_NEW_IMAGE_UNITS |
+ BRW_NEW_VERTEX_PROGRAM |
+ BRW_NEW_VS_PROG_DATA,
+ },
+ .emit = brw_upload_vs_image_surfaces,
+};