mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
i965: Add state dumping for sampler state.
This commit is contained in:
parent
03ff02d08b
commit
95addca019
1 changed files with 39 additions and 2 deletions
|
|
@ -107,14 +107,14 @@ static void dump_wm_surface_state(struct brw_context *brw)
|
|||
char name[20];
|
||||
|
||||
if (surf_bo == NULL) {
|
||||
fprintf(stderr, " WM SS%d: NULL\n", i);
|
||||
fprintf(stderr, "WM SURF%d: NULL\n", i);
|
||||
continue;
|
||||
}
|
||||
drm_intel_bo_map(surf_bo, GL_FALSE);
|
||||
surfoff = surf_bo->offset + brw->wm.surf_offset[i];
|
||||
surf = (struct brw_surface_state *)(surf_bo->virtual + brw->wm.surf_offset[i]);
|
||||
|
||||
sprintf(name, "WM SS%d", i);
|
||||
sprintf(name, "WM SURF%d", i);
|
||||
state_out(name, surf, surfoff, 0, "%s %s\n",
|
||||
get_965_surfacetype(surf->ss0.surface_type),
|
||||
get_965_surface_format(surf->ss0.surface_format));
|
||||
|
|
@ -132,6 +132,42 @@ static void dump_wm_surface_state(struct brw_context *brw)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void dump_wm_sampler_state(struct brw_context *brw)
|
||||
{
|
||||
struct gl_context *ctx = &brw->intel.ctx;
|
||||
int i;
|
||||
|
||||
if (!brw->wm.sampler_bo) {
|
||||
fprintf(stderr, "WM_SAMPLER: NULL\n");
|
||||
return;
|
||||
}
|
||||
|
||||
drm_intel_bo_map(brw->wm.sampler_bo, GL_FALSE);
|
||||
for (i = 0; i < BRW_MAX_TEX_UNIT; i++) {
|
||||
unsigned int offset;
|
||||
struct brw_sampler_state *samp;
|
||||
char name[20];
|
||||
|
||||
if (!ctx->Texture.Unit[i]._ReallyEnabled) {
|
||||
fprintf(stderr, "WM SAMP%d: disabled\n", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
offset = brw->wm.sampler_bo->offset +
|
||||
i * sizeof(struct brw_sampler_state);
|
||||
samp = (struct brw_sampler_state *)(brw->wm.sampler_bo->virtual +
|
||||
i * sizeof(struct brw_sampler_state));
|
||||
|
||||
sprintf(name, "WM SAMP%d", i);
|
||||
state_out(name, samp, offset, 0, "filtering\n");
|
||||
state_out(name, samp, offset, 1, "wrapping, lod\n");
|
||||
state_out(name, samp, offset, 2, "default color pointer\n");
|
||||
state_out(name, samp, offset, 3, "chroma key, aniso\n");
|
||||
}
|
||||
drm_intel_bo_unmap(brw->wm.sampler_bo);
|
||||
}
|
||||
|
||||
static void dump_sf_viewport_state(struct brw_context *brw)
|
||||
{
|
||||
const char *name = "SF VP";
|
||||
|
|
@ -324,6 +360,7 @@ void brw_debug_batch(struct intel_context *intel)
|
|||
|
||||
state_struct_out("WM bind", brw->wm.bind_bo, 4 * brw->wm.nr_surfaces);
|
||||
dump_wm_surface_state(brw);
|
||||
dump_wm_sampler_state(brw);
|
||||
|
||||
if (intel->gen < 6)
|
||||
state_struct_out("VS", brw->vs.state_bo, sizeof(struct brw_vs_unit_state));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue