summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-12-18 10:18:01 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2015-12-22 12:38:48 +0100
commit5f8bb6fbb11f488bb3aa22c8067028fc51b2b9f9 (patch)
tree5f11c5edc0e71dadebe67808e5d3c68ad1d32470 /src/mesa
parent9bbdd0eda47677d27b339095913b7c1ee64b5f07 (diff)
mesa: add SSBOs to the list of fragment shader side effects
The i965 driver uses this function to decide if it can disable the FS unit in the absence of color/depth writes. We don't want to disable the unit in the presence of SSBOs, since the fragment shader could be writing to it. We could go a step further and check not just for the presence of SSBOs but also if the shader code writes to them. Does not look worth the trouble though and we are not doing this for atomic buffers either anyway. v2: put this into a generic _mesa_active_fragment_shader_has_side_effects function instead of having one specific for SSBOs (Jason). Fixes the following CTS test: ES31-CTS.shader_storage_buffer_object.advanced-usage-sync-vsfs Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c57ec0cd0d0..937c8cd7e3a 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4548,7 +4548,9 @@ _mesa_active_fragment_shader_has_side_effects(const struct gl_context *ctx)
return false;
sh = ctx->_Shader->_CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT];
- return sh->NumAtomicBuffers > 0 || sh->NumImages > 0;
+ return sh->NumAtomicBuffers > 0 ||
+ sh->NumImages > 0 ||
+ sh->NumShaderStorageBlocks > 0;
}
#ifdef __cplusplus