intel/fs: Tweak default case of fs_inst::size_read()
In the default case, there's a special case with a few conditions. Prefer the cheapest conditions first, so we can take advantage of short-circuiting. Effect is a small but still significant reduce in shader compilation times, as can be seen by: - Fossil replay for Rise of the Tomb Raider ``` Difference at 95.0% confidence -0.433333 +/- 0.028609 -1.42556% +/- 0.0941163% (Student's t, pooled s = 0.0337886) ``` - Fossil replay for Batman Arkham City ``` Difference at 95.0% confidence -8.84 +/- 0.146083 -1.65932% +/- 0.0274207% (Student's t, pooled s = 0.125423) ``` Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25549>
This commit is contained in:
@@ -911,7 +911,7 @@ fs_inst::size_read(int arg) const
|
||||
break;
|
||||
|
||||
default:
|
||||
if (is_tex() && arg == 0 && src[0].file == VGRF)
|
||||
if (arg == 0 && src[0].file == VGRF && is_tex())
|
||||
return mlen * REG_SIZE;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user