diff options
author | Eric Anholt <[email protected]> | 2014-05-21 14:09:25 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-07-02 12:45:59 -0700 |
commit | e874274d0847733b2ae6c2efb911145d2da6e6b6 (patch) | |
tree | 8dd3557b8e729a82db4773c6200b9513b0b8c287 /src | |
parent | 489ec685542590c7412db81623952c1aa75d946f (diff) |
i965: Add a comment about null renderbuffer surfaces and why they exist.
I noticed this when trying to find comments about pull constant buffers.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_surface_state.c | 8 |
3 files changed, 22 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index d3bc797de17..c0756ad5690 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -501,6 +501,14 @@ const struct brw_tracked_state brw_wm_pull_constants = { .emit = brw_upload_wm_pull_constants, }; +/** + * Creates a null renderbuffer surface. + * + * This is used when the shader doesn't write to any color output. An FB + * write to target 0 will still be emitted, because that's how the thread is + * terminated (and computed depth is returned), so we need to have the + * hardware discard the target 0 color output.. + */ static void brw_update_null_renderbuffer_surface(struct brw_context *brw, unsigned int unit) { diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c index 60849e0a4e7..01120afefa1 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c @@ -393,6 +393,14 @@ gen7_create_raw_surface(struct brw_context *brw, drm_intel_bo *bo, true /* rw */); } +/** + * Creates a null renderbuffer surface. + * + * This is used when the shader doesn't write to any color output. An FB + * write to target 0 will still be emitted, because that's how the thread is + * terminated (and computed depth is returned), so we need to have the + * hardware discard the target 0 color output.. + */ static void gen7_update_null_renderbuffer_surface(struct brw_context *brw, unsigned unit) { diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c index 87401b7b20f..40eb2eab0ae 100644 --- a/src/mesa/drivers/dri/i965/gen8_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c @@ -266,8 +266,12 @@ gen8_create_raw_surface(struct brw_context *brw, drm_intel_bo *bo, } /** - * Create the constant buffer surface. Vertex/fragment shader constants will be - * read from this buffer with Data Port Read instructions/messages. + * Creates a null renderbuffer surface. + * + * This is used when the shader doesn't write to any color output. An FB + * write to target 0 will still be emitted, because that's how the thread is + * terminated (and computed depth is returned), so we need to have the + * hardware discard the target 0 color output.. */ static void gen8_update_null_renderbuffer_surface(struct brw_context *brw, unsigned unit) |