static void
iris_update_compiled_vs(struct iris_context *ice)
{
+ struct iris_shader_state *shs = &ice->state.shaders[MESA_SHADER_VERTEX];
struct iris_uncompiled_shader *ish =
ice->shaders.uncompiled[MESA_SHADER_VERTEX];
struct iris_screen *screen = (struct iris_screen *)ice->ctx.screen;
IRIS_DIRTY_BINDINGS_VS |
IRIS_DIRTY_CONSTANTS_VS |
IRIS_DIRTY_VF_SGVS;
+ shs->cbuf0_needs_upload = true;
+
const struct brw_vs_prog_data *vs_prog_data =
(void *) shader->prog_data;
const bool uses_draw_params = vs_prog_data->uses_firstvertex ||
static void
iris_update_compiled_tcs(struct iris_context *ice)
{
+ struct iris_shader_state *shs = &ice->state.shaders[MESA_SHADER_TESS_CTRL];
struct iris_uncompiled_shader *tcs =
ice->shaders.uncompiled[MESA_SHADER_TESS_CTRL];
struct iris_screen *screen = (struct iris_screen *)ice->ctx.screen;
ice->state.dirty |= IRIS_DIRTY_TCS |
IRIS_DIRTY_BINDINGS_TCS |
IRIS_DIRTY_CONSTANTS_TCS;
+ shs->cbuf0_needs_upload = true;
if (!tcs) {
/* We're binding a passthrough TCS, which doesn't have uniforms.
* data and try and read a dangling cbuf0->user_buffer pointer.
* Just zero out the stale constants to avoid the upload.
*/
- struct iris_shader_state *shs =
- &ice->state.shaders[MESA_SHADER_TESS_CTRL];
-
memset(&shs->cbuf0, 0, sizeof(shs->cbuf0));
}
}
static void
iris_update_compiled_tes(struct iris_context *ice)
{
+ struct iris_shader_state *shs = &ice->state.shaders[MESA_SHADER_TESS_EVAL];
struct iris_uncompiled_shader *ish =
ice->shaders.uncompiled[MESA_SHADER_TESS_EVAL];
struct iris_screen *screen = (struct iris_screen *)ice->ctx.screen;
ice->state.dirty |= IRIS_DIRTY_TES |
IRIS_DIRTY_BINDINGS_TES |
IRIS_DIRTY_CONSTANTS_TES;
+ shs->cbuf0_needs_upload = true;
}
/* TODO: Could compare and avoid flagging this. */
static void
iris_update_compiled_gs(struct iris_context *ice)
{
+ struct iris_shader_state *shs = &ice->state.shaders[MESA_SHADER_GEOMETRY];
struct iris_uncompiled_shader *ish =
ice->shaders.uncompiled[MESA_SHADER_GEOMETRY];
struct iris_compiled_shader *old = ice->shaders.prog[IRIS_CACHE_GS];
ice->state.dirty |= IRIS_DIRTY_GS |
IRIS_DIRTY_BINDINGS_GS |
IRIS_DIRTY_CONSTANTS_GS;
+ shs->cbuf0_needs_upload = true;
}
}
static void
iris_update_compiled_fs(struct iris_context *ice)
{
+ struct iris_shader_state *shs = &ice->state.shaders[MESA_SHADER_FRAGMENT];
struct iris_uncompiled_shader *ish =
ice->shaders.uncompiled[MESA_SHADER_FRAGMENT];
struct iris_screen *screen = (struct iris_screen *)ice->ctx.screen;
IRIS_DIRTY_WM |
IRIS_DIRTY_CLIP |
IRIS_DIRTY_SBE;
+ shs->cbuf0_needs_upload = true;
}
}
void
iris_update_compiled_compute_shader(struct iris_context *ice)
{
+ struct iris_shader_state *shs = &ice->state.shaders[MESA_SHADER_COMPUTE];
struct iris_uncompiled_shader *ish =
ice->shaders.uncompiled[MESA_SHADER_COMPUTE];
ice->state.dirty |= IRIS_DIRTY_CS |
IRIS_DIRTY_BINDINGS_CS |
IRIS_DIRTY_CONSTANTS_CS;
+ shs->cbuf0_needs_upload = true;
}
}