d3d12: Delete unused local variables
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
This commit is contained in:
@@ -108,8 +108,6 @@ delete_object(set_entry *entry)
|
||||
bool
|
||||
d3d12_reset_batch(struct d3d12_context *ctx, struct d3d12_batch *batch, uint64_t timeout_ns)
|
||||
{
|
||||
struct d3d12_screen *screen = d3d12_screen(ctx->base.screen);
|
||||
|
||||
// batch hasn't been submitted before
|
||||
if (!batch->fence && !batch->has_errors)
|
||||
return true;
|
||||
|
@@ -966,7 +966,6 @@ static void
|
||||
d3d12_destroy_sampler_view(struct pipe_context *pctx,
|
||||
struct pipe_sampler_view *pview)
|
||||
{
|
||||
struct d3d12_context *ctx = d3d12_context(pctx);
|
||||
struct d3d12_sampler_view *view = d3d12_sampler_view(pview);
|
||||
d3d12_descriptor_handle_free(&view->handle);
|
||||
pipe_resource_reference(&view->base.texture, NULL);
|
||||
@@ -1296,8 +1295,6 @@ d3d12_create_stream_output_target(struct pipe_context *pctx,
|
||||
unsigned buffer_offset,
|
||||
unsigned buffer_size)
|
||||
{
|
||||
struct d3d12_context *ctx = d3d12_context(pctx);
|
||||
struct d3d12_screen *screen = d3d12_screen(pctx->screen);
|
||||
struct d3d12_resource *res = d3d12_resource(pres);
|
||||
struct d3d12_stream_output_target *cso = CALLOC_STRUCT(d3d12_stream_output_target);
|
||||
|
||||
@@ -1814,7 +1811,6 @@ static uint64_t
|
||||
d3d12_get_timestamp(struct pipe_context *pctx)
|
||||
{
|
||||
struct d3d12_context *ctx = d3d12_context(pctx);
|
||||
struct d3d12_screen *screen = d3d12_screen(pctx->screen);
|
||||
|
||||
if (!ctx->timestamp_query)
|
||||
ctx->timestamp_query = pctx->create_query(pctx, PIPE_QUERY_TIMESTAMP, 0);
|
||||
|
@@ -197,8 +197,6 @@ d3d12_descriptor_pool_new(pipe_context *pctx,
|
||||
D3D12_DESCRIPTOR_HEAP_TYPE type,
|
||||
uint32_t num_descriptors)
|
||||
{
|
||||
struct d3d12_context *ctx = d3d12_context(pctx);
|
||||
|
||||
struct d3d12_descriptor_pool *pool = CALLOC_STRUCT(d3d12_descriptor_pool);
|
||||
if (!pool)
|
||||
return NULL;
|
||||
|
@@ -59,7 +59,6 @@ d3d12_make_passthrough_gs(struct d3d12_context *ctx, struct d3d12_gs_variant_key
|
||||
struct d3d12_shader_selector *gs;
|
||||
uint64_t varyings = key->varyings.mask;
|
||||
nir_shader *nir;
|
||||
nir_intrinsic_instr *instr;
|
||||
struct pipe_shader_state templ;
|
||||
|
||||
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_GEOMETRY,
|
||||
@@ -145,7 +144,6 @@ d3d12_begin_emit_primitives_gs(struct emit_primitives_context *emit_ctx,
|
||||
unsigned vertices_out)
|
||||
{
|
||||
nir_builder *b = &emit_ctx->b;
|
||||
nir_intrinsic_instr *instr;
|
||||
nir_variable *edgeflag_var = NULL;
|
||||
nir_variable *pos_var = NULL;
|
||||
uint64_t varyings = key->varyings.mask;
|
||||
@@ -281,7 +279,6 @@ d3d12_begin_emit_primitives_gs(struct emit_primitives_context *emit_ctx,
|
||||
static struct d3d12_shader_selector *
|
||||
d3d12_finish_emit_primitives_gs(struct emit_primitives_context *emit_ctx, bool end_primitive)
|
||||
{
|
||||
struct d3d12_shader_selector *gs;
|
||||
struct pipe_shader_state templ;
|
||||
nir_builder *b = &emit_ctx->b;
|
||||
nir_shader *nir = b->shader;
|
||||
@@ -312,7 +309,6 @@ d3d12_emit_points(struct d3d12_context *ctx, struct d3d12_gs_variant_key *key)
|
||||
{
|
||||
struct emit_primitives_context emit_ctx = {0};
|
||||
nir_builder *b = &emit_ctx.b;
|
||||
nir_intrinsic_instr *instr;
|
||||
|
||||
d3d12_begin_emit_primitives_gs(&emit_ctx, ctx, key, GL_POINTS, 3);
|
||||
|
||||
@@ -393,7 +389,6 @@ d3d12_emit_triangles(struct d3d12_context *ctx, struct d3d12_gs_variant_key *key
|
||||
{
|
||||
struct emit_primitives_context emit_ctx = {0};
|
||||
nir_builder *b = &emit_ctx.b;
|
||||
nir_intrinsic_instr *instr;
|
||||
|
||||
d3d12_begin_emit_primitives_gs(&emit_ctx, ctx, key, GL_TRIANGLE_STRIP, 3);
|
||||
|
||||
|
@@ -992,7 +992,6 @@ d3d12_fixup_clipdist_writes(nir_shader *shader)
|
||||
{
|
||||
nir_builder b;
|
||||
nir_function_impl *impl = nir_shader_get_entrypoint(shader);
|
||||
nir_ssa_def *primitive_id;
|
||||
nir_builder_init(&b, impl);
|
||||
|
||||
nir_foreach_block(block, impl) {
|
||||
|
@@ -88,7 +88,6 @@ fill_so_declaration(const struct pipe_stream_output_info *info,
|
||||
for (unsigned i = 0; i < info->num_outputs; i++) {
|
||||
const struct pipe_stream_output *output = &info->output[i];
|
||||
const int buffer = output->output_buffer;
|
||||
const int varying = output->register_index;
|
||||
unsigned index;
|
||||
|
||||
/* Mesa doesn't store entries for gl_SkipComponents in the Outputs[]
|
||||
|
@@ -106,7 +106,6 @@ d3d12_create_query(struct pipe_context *pctx,
|
||||
struct d3d12_screen *screen = d3d12_screen(pctx->screen);
|
||||
struct d3d12_query *query = CALLOC_STRUCT(d3d12_query);
|
||||
D3D12_QUERY_HEAP_DESC desc = {};
|
||||
D3D12_RESOURCE_DESC res_desc = {};
|
||||
|
||||
if (!query)
|
||||
return NULL;
|
||||
|
@@ -251,7 +251,7 @@ d3d12_resource_create(struct pipe_screen *pscreen,
|
||||
templ->usage == PIPE_USAGE_STAGING ? "STAGING " :"",
|
||||
util_format_name(templ->format), templ->nr_samples,
|
||||
templ->width0, templ->height0, templ->depth0,
|
||||
templ->array_size, templ->last_level, templ);
|
||||
templ->array_size, templ->last_level);
|
||||
}
|
||||
|
||||
pipe_reference_init(&res->base.reference, 1);
|
||||
@@ -302,7 +302,6 @@ d3d12_resource_get_handle(struct pipe_screen *pscreen,
|
||||
struct winsys_handle *handle,
|
||||
unsigned usage)
|
||||
{
|
||||
struct d3d12_screen *screen = d3d12_screen(pscreen);
|
||||
struct d3d12_resource *res = d3d12_resource(pres);
|
||||
|
||||
if (handle->type != WINSYS_HANDLE_TYPE_D3D12_RES)
|
||||
|
@@ -220,10 +220,6 @@ d3d12_create_surface(struct pipe_context *pctx,
|
||||
struct pipe_resource *pres,
|
||||
const struct pipe_surface *tpl)
|
||||
{
|
||||
struct d3d12_resource *res = d3d12_resource(pres);
|
||||
struct d3d12_context *ctx = d3d12_context(pctx);
|
||||
struct d3d12_screen *screen = d3d12_screen(pctx->screen);
|
||||
|
||||
bool is_depth_or_stencil = util_format_is_depth_or_stencil(tpl->format);
|
||||
unsigned bind = is_depth_or_stencil ? PIPE_BIND_DEPTH_STENCIL : PIPE_BIND_RENDER_TARGET;
|
||||
|
||||
@@ -259,7 +255,6 @@ static void
|
||||
d3d12_surface_destroy(struct pipe_context *pctx,
|
||||
struct pipe_surface *psurf)
|
||||
{
|
||||
struct d3d12_context *ctx = d3d12_context(pctx);
|
||||
struct d3d12_surface *surface = (struct d3d12_surface*) psurf;
|
||||
|
||||
d3d12_descriptor_handle_free(&surface->desc_handle);
|
||||
|
Reference in New Issue
Block a user