From 93ceef3808bb3f9fa2bf9ad0df576be1e2f9cf2e Mon Sep 17 00:00:00 2001 From: quou Date: Wed, 8 Jan 2025 19:00:33 +1100 Subject: automagic texture transitions --- c2.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'c2.cpp') diff --git a/c2.cpp b/c2.cpp index 5268117..e4834ad 100644 --- a/c2.cpp +++ b/c2.cpp @@ -236,6 +236,7 @@ struct Sky { cb->iview = cam.get_view().inverse(); cb->iprojection = cam.get_proj().inverse(); config.unmap(d); + config.update(d->get_ctx()); render_imp( d, a, @@ -284,7 +285,6 @@ struct Sky { draw.verts = vbb; draw.vertex_count = 3; draw.instance_count = 1; - config.update(ctx); ctx.submit(draw, pip, pass); } }; @@ -407,7 +407,6 @@ struct Env_Probe { Context& ctx = dev->get_ctx(); update_cbuffer(dev); for (i = 0; i < 6; i++) { - ctx.transition(faces[i], Resource_State::render_target); pb.begin_rp(); pb.rp_target(faces[i], Clear_Mode::discard); pb.rp_depth_target(cubemap_depth, 1.0f); @@ -421,7 +420,6 @@ struct Env_Probe { cubemap_res, cubemap_res ); - ctx.transition(faces[i], Resource_State::shader_read); } } }; -- cgit v1.2.3-54-g00ecf