Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 398694 scalarize_vec_and_mat_constructor_args cause certain valid shaders to fail
Starred by 10 users Project Member Reported by zmo@chromium.org, Jul 30 2014 Back to list
Status: Fixed
Owner:
Closed: Aug 2014
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment
One example:

--original-shader--
precision mediump float;
uniform sampler2D s_texture;
uniform vec4 color_weights;
varying vec2 v_texcoord;
void main() {
  gl_FragColor = color_weights * mat4(
    vec4(texture2D(s_texture, v_texcoord).rgb, 1.0),
    vec4(texture2D(s_texture, v_texcoord).rgb, 1.0),
    vec4(texture2D(s_texture, v_texcoord).rgb, 1.0),
    vec4(texture2D(s_texture, v_texcoord).rgb, 1.0));
}

--translated-shader--
uniform lowp sampler2D s_texture;
uniform mediump vec4 color_weights;
varying mediump vec2 v_texcoord;
void main(){
vec4 _webgl_tmp_vec_0 = vec4(texture2D(s_texture, v_texcoord).xyz, 1.0);
vec4 _webgl_tmp_vec_1 = vec4(texture2D(s_texture, v_texcoord).xyz, 1.0);
vec4 _webgl_tmp_vec_2 = vec4(texture2D(s_texture, v_texcoord).xyz, 1.0);
vec4 _webgl_tmp_vec_3 = vec4(texture2D(s_texture, v_texcoord).xyz, 1.0);
(gl_FragColor = (color_weights * mat4(_webgl_tmp_vec_0[0], _webgl_tmp_vec_0[1], _webgl_tmp_vec_0[2], _webgl_tmp_vec_0[3], _webgl_tmp_vec_1[0], _webgl_tmp_vec_1[1], _webgl_tmp_vec_1[2], _webgl_tmp_vec_1[3], _webgl_tmp_vec_2[0], _webgl_tmp_vec_2[1], _webgl_tmp_vec_2[2], _webgl_tmp_vec_2[3], _webgl_tmp_vec_3[0], _webgl_tmp_vec_3[1], _webgl_tmp_vec_3[2], _webgl_tmp_vec_3[3])));
}

 
Comment 1 by zmo@chromium.org, Jul 30 2014
So the issue is built-functions and variables do not have a precision that the temporary variables can use.  Therefore they are defined with a precision, causing compile failure.
Project Member Comment 2 by bugdroid1@chromium.org, Jul 30 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f53651c879becee19ffe7395cfa717bde1211aa3

commit f53651c879becee19ffe7395cfa717bde1211aa3
Author: zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed Jul 30 03:55:10 2014

Turn off scalarize_vec_and_mat_constructor_args workaround everywhere

There is a bug in the workaround, so we should fix it before turning it on.

This is simply removing a few entries in the json file,
plus surpressing affected WebGL conformance tests.

Very safe CL.

BUG= 398694 
TEST=gpu_unitests, gpu linux bots green
TBR=kbr@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/421413003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286406 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 3 by bugdroid1@chromium.org, Jul 30 2014
------------------------------------------------------------------
r286406 | zmo@chromium.org | 2014-07-30T03:55:10.235995Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/gpu/config/gpu_driver_bug_list_json.cc?r1=286406&r2=286405&pathrev=286406
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/test/gpu/gpu_tests/webgl_conformance_expectations.py?r1=286406&r2=286405&pathrev=286406

Turn off scalarize_vec_and_mat_constructor_args workaround everywhere

There is a bug in the workaround, so we should fix it before turning it on.

This is simply removing a few entries in the json file,
plus surpressing affected WebGL conformance tests.

Very safe CL.

BUG= 398694 
TEST=gpu_unitests, gpu linux bots green
TBR=kbr@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/421413003
-----------------------------------------------------------------
Project Member Comment 4 by bugdroid1@chromium.org, Jul 30 2014
Labels: merge-merged-2104
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/94770b64ab6cea095b6fd95522df311ed863f85b

commit 94770b64ab6cea095b6fd95522df311ed863f85b
Author: zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed Jul 30 18:03:59 2014

Merge 286406 "Turn off scalarize_vec_and_mat_constructor_args wo..."

> Turn off scalarize_vec_and_mat_constructor_args workaround everywhere
> 
> There is a bug in the workaround, so we should fix it before turning it on.
> 
> This is simply removing a few entries in the json file,
> plus surpressing affected WebGL conformance tests.
> 
> Very safe CL.
> 
> BUG= 398694 
> TEST=gpu_unitests, gpu linux bots green
> TBR=kbr@chromium.org
> NOTRY=true
> 
> Review URL: https://codereview.chromium.org/421413003

TBR=zmo@chromium.org

Review URL: https://codereview.chromium.org/423393006

git-svn-id: svn://svn.chromium.org/chrome/branches/2104/src@286560 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 5 by bugdroid1@chromium.org, Jul 30 2014
------------------------------------------------------------------
r286560 | zmo@chromium.org | 2014-07-30T18:03:59.391004Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/2104/src/content/test/gpu/gpu_tests/webgl_conformance_expectations.py?r1=286560&r2=286559&pathrev=286560
   M http://src.chromium.org/viewvc/chrome/branches/2104/src/gpu/config/gpu_driver_bug_list_json.cc?r1=286560&r2=286559&pathrev=286560

Merge 286406 "Turn off scalarize_vec_and_mat_constructor_args wo..."

> Turn off scalarize_vec_and_mat_constructor_args workaround everywhere
> 
> There is a bug in the workaround, so we should fix it before turning it on.
> 
> This is simply removing a few entries in the json file,
> plus surpressing affected WebGL conformance tests.
> 
> Very safe CL.
> 
> BUG= 398694 
> TEST=gpu_unitests, gpu linux bots green
> TBR=kbr@chromium.org
> NOTRY=true
> 
> Review URL: https://codereview.chromium.org/421413003

TBR=zmo@chromium.org

Review URL: https://codereview.chromium.org/423393006
-----------------------------------------------------------------
Project Member Comment 6 by bugdroid1@chromium.org, Aug 18 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fa6d398436096ef8f1e595fad4cd00be3e89a9ff

commit fa6d398436096ef8f1e595fad4cd00be3e89a9ff
Author: zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Mon Aug 18 18:10:27 2014

Hook up two GPU driver bug workarounds.

* scalarize_vec_and_mat_constructor_args
   per discussion with kbr, we decided to turn it on always for
   consistency.
* regenerate_struct_names
   all mac drivers, linux amd drivers

BUG= 398694 , 403957 
TEST=gpu_unittests
R=bajones@chromium.org,kbr@chromium.org

Review URL: https://codereview.chromium.org/474093002

Cr-Commit-Position: refs/heads/master@{#290303}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290303 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 7 by bugdroid1@chromium.org, Aug 18 2014
------------------------------------------------------------------
r290303 | zmo@chromium.org | 2014-08-18T18:10:27.179357Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/gpu/command_buffer/service/gles2_cmd_decoder.cc?r1=290303&r2=290302&pathrev=290303
   M http://src.chromium.org/viewvc/chrome/trunk/src/gpu/config/gpu_driver_bug_list_json.cc?r1=290303&r2=290302&pathrev=290303
   M http://src.chromium.org/viewvc/chrome/trunk/src/gpu/config/gpu_driver_bug_workaround_type.h?r1=290303&r2=290302&pathrev=290303

Hook up two GPU driver bug workarounds.

* scalarize_vec_and_mat_constructor_args
   per discussion with kbr, we decided to turn it on always for
   consistency.
* regenerate_struct_names
   all mac drivers, linux amd drivers

BUG= 398694 , 403957 
TEST=gpu_unittests
R=bajones@chromium.org,kbr@chromium.org

Review URL: https://codereview.chromium.org/474093002
-----------------------------------------------------------------
Comment 8 by zmo@chromium.org, Aug 20 2014
Status: Fixed
Comment 9 by tri...@gmail.com, Jul 8 2016
If this is fixed, should it not appear as a "Problem Detected" on chrome://gpu today? 53.0.2785.x
Comment 10 by zmo@chromium.org, Jul 8 2016
This workaround is still on.  Fixed means the workaround is working as expected.
Sign in to add a comment