|
|
Chromium Code Reviews|
Created:
3 years, 7 months ago by jiajia.qin Modified:
3 years, 7 months ago CC:
chromium-reviews, piman+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionDelete useless code in gles2_cmd_copy_texture_chromium
In GetFragmentShaderSource function, when calculate the TextureType,
MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the
dest_format/source_format is unsigned, signed or else to set the
corresponding values for them. However, according to the spec, dest_format
don't support signed integer and signed normalized fixed-point data. And
source_format only support unsigned normalized fixed-point. In that case, we
don't need those unreachable paths.
Beside that, the old code had problems when converted from unsigned
fixed-point to signed integer.
BUG=612542
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Review-Url: https://codereview.chromium.org/2875903002
Cr-Commit-Position: refs/heads/master@{#472382}
Committed: https://chromium.googlesource.com/chromium/src/+/f56cfdfce785ceb79ceb0264a20d0b117c694713
Patch Set 1 #
Total comments: 2
Patch Set 2 : Add DCHECK for non integer format #Messages
Total messages: 25 (17 generated)
Description was changed from ========== Delete useless code in gles2_cmd_copy_texture_chromium In GetFragmentShaderSource, when calculating the TextureType, MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the dest_format/source_format is unsigned, signed or else to set the corresponding values for them. However, according to the spec, dest_format doesn't support signed integer and signed normalized fiexd-point data. And source_format only support unsigned normalized fixed-point. In that case, we don't need those unreachable checkings. Beside that, the old code had problems when converting from unsgined fixed-point to signed integer. ========== to ========== Delete useless code in gles2_cmd_copy_texture_chromium In GetFragmentShaderSource, when calculating the TextureType, MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the dest_format/source_format is unsigned, signed or else to set the corresponding values for them. However, according to the spec, dest_format doesn't support signed integer and signed normalized fiexd-point data. And source_format only support unsigned normalized fixed-point. In that case, we don't need those unreachable checkings. Beside that, the old code had problems when converting from unsgined fixed-point to signed integer. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
The CQ bit was checked by jiajia.qin@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_optional_gpu_tests_rel on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_optional_gpu_...)
Description was changed from ========== Delete useless code in gles2_cmd_copy_texture_chromium In GetFragmentShaderSource, when calculating the TextureType, MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the dest_format/source_format is unsigned, signed or else to set the corresponding values for them. However, according to the spec, dest_format doesn't support signed integer and signed normalized fiexd-point data. And source_format only support unsigned normalized fixed-point. In that case, we don't need those unreachable checkings. Beside that, the old code had problems when converting from unsgined fixed-point to signed integer. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Delete useless code in gles2_cmd_copy_texture_chromium In GetFragmentShaderSource function, when calculate the TextureType, MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the dest_format/source_format is unsigned, signed or else to set the corresponding values for them. However, according to the spec, dest_format don't support signed integer and signed normalized fixed-point data. And source_format only support unsigned normalized fixed-point. In that case, we don't need those unreachable paths. Beside that, the old code had problems when converted from unsigned fixed-point to signed integer. BUG=612542 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Delete useless code in gles2_cmd_copy_texture_chromium In GetFragmentShaderSource function, when calculate the TextureType, MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the dest_format/source_format is unsigned, signed or else to set the corresponding values for them. However, according to the spec, dest_format don't support signed integer and signed normalized fixed-point data. And source_format only support unsigned normalized fixed-point. In that case, we don't need those unreachable paths. Beside that, the old code had problems when converted from unsigned fixed-point to signed integer. BUG=612542 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Delete useless code in gles2_cmd_copy_texture_chromium In GetFragmentShaderSource function, when calculate the TextureType, MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the dest_format/source_format is unsigned, signed or else to set the corresponding values for them. However, according to the spec, dest_format don't support signed integer and signed normalized fixed-point data. And source_format only support unsigned normalized fixed-point. In that case, we don't need those unreachable paths. Beside that, the old code had problems when converted from unsigned fixed-point to signed integer. BUG=612542 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
jiajia.qin@intel.com changed reviewers: + kbr@chromium.org, zmo@chromium.org
Please take a look. Thanks.
https://codereview.chromium.org/2875903002/diff/1/gpu/command_buffer/service/... File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/2875903002/diff/1/gpu/command_buffer/service/... gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:378: } else { Can we add a DCHECK here to make sure we only get float or fixed point formats here?
The CQ bit was checked by jiajia.qin@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
@Mo Please take another look. Thanks. https://codereview.chromium.org/2875903002/diff/1/gpu/command_buffer/service/... File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): https://codereview.chromium.org/2875903002/diff/1/gpu/command_buffer/service/... gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:378: } else { On 2017/05/12 18:00:44, Zhenyao Mo wrote: > Can we add a DCHECK here to make sure we only get float or fixed point formats > here? Done. I use DCHECK(!gpu::gles2::GLES2Util::IsIntegerFormat(dest_format)). I didn't find a function IsFixedPointFormat or similar function. So do we need to add this function and use DCHECK(isFloadFormat || IsUnsignedFixedPointFormat ) here or DCHECK(!IsIntegerFormat) is enough?
On 2017/05/15 01:42:11, jiajia.qin wrote: > @Mo Please take another look. Thanks. > > https://codereview.chromium.org/2875903002/diff/1/gpu/command_buffer/service/... > File gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc (right): > > https://codereview.chromium.org/2875903002/diff/1/gpu/command_buffer/service/... > gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc:378: } else { > On 2017/05/12 18:00:44, Zhenyao Mo wrote: > > Can we add a DCHECK here to make sure we only get float or fixed point formats > > here? > > Done. I use DCHECK(!gpu::gles2::GLES2Util::IsIntegerFormat(dest_format)). I > didn't find a function IsFixedPointFormat or similar function. So do we need to > add this function and use DCHECK(isFloadFormat || IsUnsignedFixedPointFormat ) > here or DCHECK(!IsIntegerFormat) is enough? lgtm Yes, unfortunately we don't have that function, but I think not worth adding a new function just for this DCHECK
The CQ bit was checked by jiajia.qin@intel.com
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by kbr@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1495005627962270,
"parent_rev": "a51e7ff9f868c9bacf22ed50a61e499695c0715a", "commit_rev":
"f56cfdfce785ceb79ceb0264a20d0b117c694713"}
Message was sent while issue was closed.
Description was changed from ========== Delete useless code in gles2_cmd_copy_texture_chromium In GetFragmentShaderSource function, when calculate the TextureType, MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the dest_format/source_format is unsigned, signed or else to set the corresponding values for them. However, according to the spec, dest_format don't support signed integer and signed normalized fixed-point data. And source_format only support unsigned normalized fixed-point. In that case, we don't need those unreachable paths. Beside that, the old code had problems when converted from unsigned fixed-point to signed integer. BUG=612542 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Delete useless code in gles2_cmd_copy_texture_chromium In GetFragmentShaderSource function, when calculate the TextureType, MAX_COLOR, InnerScaleValue and OuterScaleValue, we will check the dest_format/source_format is unsigned, signed or else to set the corresponding values for them. However, according to the spec, dest_format don't support signed integer and signed normalized fixed-point data. And source_format only support unsigned normalized fixed-point. In that case, we don't need those unreachable paths. Beside that, the old code had problems when converted from unsigned fixed-point to signed integer. BUG=612542 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2875903002 Cr-Commit-Position: refs/heads/master@{#472382} Committed: https://chromium.googlesource.com/chromium/src/+/f56cfdfce785ceb79ceb0264a20d... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/f56cfdfce785ceb79ceb0264a20d... |
