Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: gpu/command_buffer/service/shader_translator.cc

Issue 11884007: Enable array index clamping in shader translator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/shader_translator.cc
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc
index c58d19820eba892366cac8b4ca4412988bdea0a9..c086df9a858e8ec63584b7d6dd2abf7662834f4f 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -127,7 +127,8 @@ bool ShaderTranslator::Translate(const char* shader) {
bool success = false;
int compile_options =
- SH_OBJECT_CODE | SH_ATTRIBUTES_UNIFORMS | SH_MAP_LONG_VARIABLE_NAMES;
+ SH_OBJECT_CODE | SH_ATTRIBUTES_UNIFORMS |
+ SH_MAP_LONG_VARIABLE_NAMES | SH_CLAMP_INDIRECT_ARRAY_BOUNDS;
greggman 2013/01/12 01:31:37 Do you want | SH_ENFORCE_PACKING_RESTRICTIONS or n
if (needs_built_in_function_emulation_)
compile_options |= SH_EMULATE_BUILT_IN_FUNCTIONS;
if (ShCompile(compiler_, &shader, 1, compile_options)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698