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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_renderer.cc

Issue 2833823002: WebVR: Add explicit precision to all shaders to avoid Mali GPU crash (Closed)
Patch Set: Created 3 years, 8 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 | « chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell_renderer.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell_renderer.cc b/chrome/browser/android/vr_shell/vr_shell_renderer.cc
index 7951074d0453fedd5f9c2eba49fefdeb4030a37e..262116cbe18d893a865bae3a4eed645e12ac81c5 100644
--- a/chrome/browser/android/vr_shell/vr_shell_renderer.cc
+++ b/chrome/browser/android/vr_shell/vr_shell_renderer.cc
@@ -77,6 +77,7 @@ const char* GetShaderSource(vr_shell::ShaderID shader) {
case vr_shell::ShaderID::CONTROLLER_VERTEX_SHADER:
return SHADER(
/* clang-format off */
+ precision mediump float;
uniform mat4 u_ModelViewProjMatrix;
attribute vec4 a_Position;
attribute vec2 a_TexCoordinate;
@@ -91,6 +92,7 @@ const char* GetShaderSource(vr_shell::ShaderID shader) {
case vr_shell::ShaderID::GRADIENT_GRID_VERTEX_SHADER:
return SHADER(
/* clang-format off */
+ precision mediump float;
uniform mat4 u_ModelViewProjMatrix;
uniform float u_SceneRadius;
attribute vec4 a_Position;
@@ -122,9 +124,10 @@ const char* GetShaderSource(vr_shell::ShaderID shader) {
case vr_shell::ShaderID::WEBVR_VERTEX_SHADER:
return SHADER(
/* clang-format off */
+ precision mediump float;
attribute vec3 a_Position;
attribute vec2 a_TexCoordinate;
- varying vec2 v_TexCoordinate;
+ varying highp vec2 v_TexCoordinate;
void main() {
v_TexCoordinate = a_TexCoordinate;
@@ -145,6 +148,7 @@ const char* GetShaderSource(vr_shell::ShaderID shader) {
case vr_shell::ShaderID::RETICLE_FRAGMENT_SHADER:
return SHADER(
/* clang-format off */
+ precision mediump float;
varying mediump vec2 v_TexCoordinate;
uniform lowp vec4 color;
uniform mediump float ring_diameter;
@@ -218,6 +222,7 @@ const char* GetShaderSource(vr_shell::ShaderID shader) {
case vr_shell::ShaderID::CONTROLLER_FRAGMENT_SHADER:
return SHADER(
/* clang-format off */
+ precision mediump float;
uniform sampler2D u_texture;
varying vec2 v_TexCoordinate;
« no previous file with comments | « chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698