diff options
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_texture.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_pipe.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_shader.c | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_texture.c b/src/gallium/drivers/radeonsi/r600_texture.c index 69ca892b5f8..aa307fb1a22 100644 --- a/src/gallium/drivers/radeonsi/r600_texture.c +++ b/src/gallium/drivers/radeonsi/r600_texture.c @@ -291,8 +291,6 @@ static void r600_texture_destroy(struct pipe_screen *screen, static const struct u_resource_vtbl r600_texture_vtbl; -DEBUG_GET_ONCE_BOOL_OPTION(print_texdepth, "RADEON_PRINT_TEXDEPTH", FALSE); - /* The number of samples can be specified independently of the texture. */ static void r600_texture_get_fmask_info(struct r600_screen *rscreen, struct r600_texture *rtex, @@ -468,7 +466,7 @@ r600_texture_create_object(struct pipe_screen *screen, memset(map + rtex->cmask.offset, 0xCC, rtex->cmask.size); } - if (debug_get_option_print_texdepth() && rtex->is_depth) { + if (rscreen->b.debug_flags & DBG_TEX_DEPTH && rtex->is_depth) { printf("Texture: npix_x=%u, npix_y=%u, npix_z=%u, blk_w=%u, " "blk_h=%u, blk_d=%u, array_size=%u, last_level=%u, " "bpe=%u, nsamples=%u, flags=%u\n", diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index 5275c6f41e9..5528e1968a3 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c @@ -825,6 +825,11 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) r600_common_screen_init(&rscreen->b, ws); + if (debug_get_bool_option("RADEON_PRINT_TEXDEPTH", FALSE)) + rscreen->b.debug_flags |= DBG_TEX_DEPTH; + if (debug_get_bool_option("RADEON_DUMP_SHADERS", FALSE)) + rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS; + if (r600_init_tiling(rscreen)) { FREE(rscreen); return NULL; diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index 8d8cc4da8ec..7ed3d2634c9 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -1758,10 +1758,8 @@ int si_compile_llvm(struct r600_context *rctx, struct si_pipe_shader *shader, { unsigned i; uint32_t *ptr; - bool dump; struct radeon_llvm_binary binary; - - dump = debug_get_bool_option("RADEON_DUMP_SHADERS", FALSE); + bool dump = r600_can_dump_shader(&rctx->screen->b, shader->selector->tokens); memset(&binary, 0, sizeof(binary)); radeon_llvm_compile(mod, &binary, @@ -1839,10 +1837,8 @@ int si_pipe_shader_create( struct tgsi_shader_info shader_info; struct lp_build_tgsi_context * bld_base; LLVMModuleRef mod; - bool dump; int r = 0; - - dump = debug_get_bool_option("RADEON_DUMP_SHADERS", FALSE); + bool dump = r600_can_dump_shader(&rctx->screen->b, shader->selector->tokens); assert(shader->shader.noutput == 0); assert(shader->shader.ninterp == 0); |