GLenum depth_mode,
GLenum srgb_decode);
+/* gen7_wm_surface_state.c */
+void gen7_create_constant_surface(struct brw_context *brw,
+ drm_intel_bo *bo,
+ int width,
+ uint32_t *out_offset);
+
/* brw_wm_sampler_state.c */
uint32_t translate_wrap_mode(GLenum wrap, bool using_nearest);
void upload_default_color(struct brw_context *brw,
GLuint surf)
{
struct brw_context *brw = brw_context(ctx);
+ struct intel_context *intel = &brw->intel;
struct brw_vertex_program *vp =
(struct brw_vertex_program *) brw->vertex_program;
const struct gl_program_parameter_list *params = vp->program.Base.Parameters;
return;
}
- brw_create_constant_surface(brw, brw->vs.const_bo, params->NumParameters,
- &brw->vs.surf_offset[surf]);
+ if (intel->gen >= 7) {
+ gen7_create_constant_surface(brw, brw->vs.const_bo, params->NumParameters,
+ &brw->vs.surf_offset[surf]);
+ } else {
+ brw_create_constant_surface(brw, brw->vs.const_bo, params->NumParameters,
+ &brw->vs.surf_offset[surf]);
+ }
}
* Create the constant buffer surface. Vertex/fragment shader constants will
* be read from this buffer with Data Port Read instructions/messages.
*/
-static void
+void
gen7_create_constant_surface(struct brw_context *brw,
drm_intel_bo *bo,
int width,