Access Parent Render Pass

I have two render passes, one that is nested within another, and I'd like for the inner pass to have access to the color attachments of the outer pass. Is it possible for render pass 2 to have knowledge of render pass 1's color at any given moment? Here is the logic:

1.) Start render pass 1 with texture 1

2.) Draw objects

3.) Start render pass 2 with texture 2

4.) Draw objects using color from render pass 1

5.) End render pass 2

6.) Draw output of render pass 2 into render pass 1

7.) End render pass 1

Hi, I can think of two ways that our GPUs might support what you are trying to accomplish.

The first approach is for you to use tile shading (see About Tile Shading). This allows you to have a separate compute pass that works on the same tile which is being rendered.

The second approach approach is to use raster order groups (see About Raster Order Groups) which allows you to specify in your shaders the order in which memory can be accessed to help you prevent a data race condition.

Access Parent Render Pass
 
 
Q