Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8260931: Implement JEP 382: New macOS Rendering Pipeline #2403

Closed
wants to merge 47 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0b8d96b
Project Lanai Patch
aghaisas Feb 4, 2021
5476874
Merge branch 'master' into 8260931_lanai_JEP_branch
aghaisas Feb 8, 2021
8ed7b5f
Lanai PR#174 - 8261234 - kcr
aghaisas Feb 8, 2021
6044adc
Lanai PR#175 - 8261304 - aghaisas
aghaisas Feb 8, 2021
fdf3be9
Lanai PR#176 - 8261399 - jdv
aghaisas Feb 9, 2021
6417328
Lanai PR#177 - 8261430 - aghaisas
aghaisas Feb 9, 2021
9a72538
Merge branch 'master' into 8260931_lanai_JEP_branch
aghaisas Feb 11, 2021
9c13bb3
Lanai PR#178 - 8261273 - avu
aghaisas Feb 11, 2021
6a3f96e
Lanai PR#179 - 8261402 - avu
aghaisas Feb 11, 2021
102494b
Lanai PR#180 - 8261546 - jdv
aghaisas Feb 11, 2021
7340d06
Lanai PR#181 - 8261143 - aghaisas
aghaisas Feb 11, 2021
a7df89b
Merge branch 'master' into 8260931_lanai_JEP_branch
aghaisas Feb 15, 2021
edf247d
Lanai PR#182 - 8261547 - psadhukhan
aghaisas Feb 15, 2021
8b5bf34
Lanai PR#184 - 8261620 - aghaisas
aghaisas Feb 15, 2021
d2548e0
Lanai PR#185 - 8261632 - jdv
aghaisas Feb 15, 2021
0d8aedc
Lanai PR#186 - 8261638 - avu
aghaisas Feb 15, 2021
3942a5b
Lanai PR#187 - 8261704 - jdv
aghaisas Feb 15, 2021
90af90d
Lanai PR#189 - 8261712 - avu
aghaisas Feb 15, 2021
1c0c0c1
Lanai PR#190 - 8261706 - jdv
aghaisas Feb 15, 2021
7b0b0dc
Lanai PR#191 - 8261705 - jdv
aghaisas Feb 15, 2021
10ebb70
Merge branch 'master' into 8260931_lanai_JEP_branch
aghaisas Feb 21, 2021
9432c5a
Lanai PR#192 - 8261789 - aghaisas
aghaisas Feb 21, 2021
68220fb
Lanai PR#193 - 8261734 - avu
aghaisas Feb 21, 2021
30284b9
Lanai PR#194 - 8261703 - jdv
aghaisas Feb 21, 2021
e2f78dd
Lanai PR#195 - 8261908 - jdv
aghaisas Feb 21, 2021
1e0ff66
Lanai PR#196 - 8260715 - avu
aghaisas Feb 21, 2021
8c598a6
Lanai PR#197 - 8261960 - jdv
aghaisas Feb 21, 2021
a2983f0
Lanai PR#198 - 8261646 - avu
aghaisas Feb 21, 2021
614be05
Lanai PR#199 - 8262091 - aghaisas
aghaisas Feb 21, 2021
30dab8d
Merge branch 'master' into 8260931_lanai_JEP_branch
aghaisas Mar 1, 2021
bf888a2
Lanai PR#200 - 8262115 - aghaisas
aghaisas Mar 1, 2021
6e2e528
Lanai PR#201 - 8261891 - avu
aghaisas Mar 1, 2021
9059255
Lanai PR#202 - 8262293 - avu
aghaisas Mar 1, 2021
e0fbc42
Lanai PR#203 - 8262313 - jdv
aghaisas Mar 1, 2021
c9ebcbc
Lanai PR#205 - 8262496 - avu
aghaisas Mar 1, 2021
5cb1fd9
Lanai PR#206 - 8262729 - aghaisas
aghaisas Mar 1, 2021
09519fd
Merge branch 'master' into 8260931_lanai_JEP_branch
aghaisas Mar 8, 2021
3995be1
Lanai PR#207 - 8262750 - jdv
aghaisas Mar 8, 2021
5660744
Lanai PR#208 - 8262928 - jdv
aghaisas Mar 8, 2021
e459f1a
Lanai PR#209 - 8262936 - jdv
aghaisas Mar 8, 2021
de45693
Lanai PR#210 - 8263159 - jdv
aghaisas Mar 8, 2021
b065a49
Merge branch 'master' into 8260931_lanai_JEP_branch
aghaisas Mar 10, 2021
d27ff90
Lanai PR#211 - 8262882 - aghaisas
aghaisas Mar 10, 2021
9a27831
Lanai PR#212 - 8259825 - aghaisas
aghaisas Mar 10, 2021
3980ecb
Lanai PR#213 - 8263325 - avu
aghaisas Mar 10, 2021
c4309ab
Merge branch 'master' into 8260931_lanai_JEP_branch
aghaisas Mar 11, 2021
369c3d2
Lanai PR#214 - 8263324 - avu
aghaisas Mar 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -93,21 +93,6 @@ static void register() {
MTLSurfaceData.PF_INT_BGR),
new MTLSwToSurfaceBlit(SurfaceType.IntBgrx,
MTLSurfaceData.PF_INT_BGRX),
// TODO: Provide native implementation
// It may not be effective/possible. For example, there is no direct
// support in Metal for SurfaceType.ThreeByteBgr
// new MTLSwToSurfaceBlit(SurfaceType.ThreeByteBgr,
// MTLSurfaceData.PF_3BYTE_BGR),
// new MTLSwToSurfaceBlit(SurfaceType.Ushort565Rgb,
// MTLSurfaceData.PF_USHORT_565_RGB),
// new MTLSwToSurfaceBlit(SurfaceType.Ushort555Rgb,
// MTLSurfaceData.PF_USHORT_555_RGB),
// new MTLSwToSurfaceBlit(SurfaceType.Ushort555Rgbx,
// MTLSurfaceData.PF_USHORT_555_RGBX),
// new MTLSwToSurfaceBlit(SurfaceType.ByteGray,
// MTLSurfaceData.PF_BYTE_GRAY),
// new MTLSwToSurfaceBlit(SurfaceType.UshortGray,
// MTLSurfaceData.PF_USHORT_GRAY),
new MTLGeneralBlit(MTLSurfaceData.MTLSurface,
CompositeType.AnyAlpha,
blitIntArgbPreToSurface),
@@ -129,19 +114,6 @@ static void register() {
MTLSurfaceData.PF_INT_BGR),
new MTLSwToSurfaceScale(SurfaceType.IntBgrx,
MTLSurfaceData.PF_INT_BGRX),
// TODO: Provide native implementation
// new MTLSwToSurfaceScale(SurfaceType.ThreeByteBgr,
// MTLSurfaceData.PF_3BYTE_BGR),
// new MTLSwToSurfaceScale(SurfaceType.Ushort565Rgb,
// MTLSurfaceData.PF_USHORT_565_RGB),
// new MTLSwToSurfaceScale(SurfaceType.Ushort555Rgb,
// MTLSurfaceData.PF_USHORT_555_RGB),
// new MTLSwToSurfaceScale(SurfaceType.Ushort555Rgbx,
// MTLSurfaceData.PF_USHORT_555_RGBX),
// new MTLSwToSurfaceScale(SurfaceType.ByteGray,
// MTLSurfaceData.PF_BYTE_GRAY),
// new MTLSwToSurfaceScale(SurfaceType.UshortGray,
// MTLSurfaceData.PF_USHORT_GRAY),
new MTLSwToSurfaceScale(SurfaceType.IntArgbPre,
MTLSurfaceData.PF_INT_ARGB_PRE),

@@ -153,19 +125,6 @@ static void register() {
MTLSurfaceData.PF_INT_BGR),
new MTLSwToSurfaceTransform(SurfaceType.IntBgrx,
MTLSurfaceData.PF_INT_BGRX),
// TODO: Provide native implementation
// new MTLSwToSurfaceTransform(SurfaceType.ThreeByteBgr,
// MTLSurfaceData.PF_3BYTE_BGR),
// new MTLSwToSurfaceTransform(SurfaceType.Ushort565Rgb,
// MTLSurfaceData.PF_USHORT_565_RGB),
// new MTLSwToSurfaceTransform(SurfaceType.Ushort555Rgb,
// MTLSurfaceData.PF_USHORT_555_RGB),
// new MTLSwToSurfaceTransform(SurfaceType.Ushort555Rgbx,
// MTLSurfaceData.PF_USHORT_555_RGBX),
// new MTLSwToSurfaceTransform(SurfaceType.ByteGray,
// MTLSurfaceData.PF_BYTE_GRAY),
// new MTLSwToSurfaceTransform(SurfaceType.UshortGray,
// MTLSurfaceData.PF_USHORT_GRAY),
transformBlitIntArgbPreToSurface,

new MTLGeneralTransformedBlit(transformBlitIntArgbPreToSurface),
@@ -185,19 +144,6 @@ static void register() {
MTLSurfaceData.PF_INT_BGR),
new MTLSwToTextureBlit(SurfaceType.IntBgrx,
MTLSurfaceData.PF_INT_BGRX),
// TODO: Provide native implementation
// new MTLSwToTextureBlit(SurfaceType.ThreeByteBgr,
// MTLSurfaceData.PF_3BYTE_BGR),
// new MTLSwToTextureBlit(SurfaceType.Ushort565Rgb,
// MTLSurfaceData.PF_USHORT_565_RGB),
// new MTLSwToTextureBlit(SurfaceType.Ushort555Rgb,
// MTLSurfaceData.PF_USHORT_555_RGB),
// new MTLSwToTextureBlit(SurfaceType.Ushort555Rgbx,
// MTLSurfaceData.PF_USHORT_555_RGBX),
// new MTLSwToTextureBlit(SurfaceType.ByteGray,
// MTLSurfaceData.PF_BYTE_GRAY),
// new MTLSwToTextureBlit(SurfaceType.UshortGray,
// MTLSurfaceData.PF_USHORT_GRAY),
new MTLGeneralBlit(MTLSurfaceData.MTLTexture,
CompositeType.SrcNoEa,
blitIntArgbPreToTexture),
@@ -113,20 +113,20 @@
Java_sun_java2d_metal_MTLGraphicsConfig_tryLoadMetalLibrary
(JNIEnv *env, jclass mtlgc, jint displayID, jstring shadersLibName)
{
jboolean ret = JNI_FALSE;
JNI_COCOA_ENTER(env);
NSMutableArray * retArray = [NSMutableArray arrayWithCapacity:3];
[retArray addObject: [NSNumber numberWithInt: (int)displayID]];
[retArray addObject: [NSString stringWithUTF8String: JNU_GetStringPlatformChars(env, shadersLibName, 0)]];
if ([NSThread isMainThread]) {
[MTLGraphicsConfigUtil _tryLoadMetalLibrary: retArray];
} else {
[MTLGraphicsConfigUtil performSelectorOnMainThread: @selector(_tryLoadMetalLibrary:) withObject: retArray waitUntilDone: YES];
}
NSNumber * num = (NSNumber *)[retArray objectAtIndex: 0];
ret = (jboolean)[num boolValue];
JNI_COCOA_EXIT(env);
return ret;
jboolean ret = JNI_FALSE;
JNI_COCOA_ENTER(env);
NSMutableArray * retArray = [NSMutableArray arrayWithCapacity:3];
[retArray addObject: [NSNumber numberWithInt: (int)displayID]];
[retArray addObject: [NSString stringWithUTF8String: JNU_GetStringPlatformChars(env, shadersLibName, 0)]];

[ThreadUtilities performOnMainThreadWaiting:YES block:^() {
[MTLGraphicsConfigUtil _tryLoadMetalLibrary: retArray];
}];

NSNumber * num = (NSNumber *)[retArray objectAtIndex: 0];
ret = (jboolean)[num boolValue];
JNI_COCOA_EXIT(env);
return ret;
}


@@ -144,20 +144,20 @@
Java_sun_java2d_metal_MTLGraphicsConfig_getMTLConfigInfo
(JNIEnv *env, jclass mtlgc, jint displayID, jstring mtlShadersLib)
{
jlong ret = 0L;
JNI_COCOA_ENTER(env);
NSMutableArray * retArray = [NSMutableArray arrayWithCapacity:3];
[retArray addObject: [NSNumber numberWithInt: (int)displayID]];
[retArray addObject: [NSString stringWithUTF8String: JNU_GetStringPlatformChars(env, mtlShadersLib, 0)]];
if ([NSThread isMainThread]) {
[MTLGraphicsConfigUtil _getMTLConfigInfo: retArray];
} else {
[MTLGraphicsConfigUtil performSelectorOnMainThread: @selector(_getMTLConfigInfo:) withObject: retArray waitUntilDone: YES];
}
NSNumber * num = (NSNumber *)[retArray objectAtIndex: 0];
ret = (jlong)[num longValue];
JNI_COCOA_EXIT(env);
return ret;
jlong ret = 0L;
JNI_COCOA_ENTER(env);
NSMutableArray * retArray = [NSMutableArray arrayWithCapacity:3];
[retArray addObject: [NSNumber numberWithInt: (int)displayID]];
[retArray addObject: [NSString stringWithUTF8String: JNU_GetStringPlatformChars(env, mtlShadersLib, 0)]];

[ThreadUtilities performOnMainThreadWaiting:YES block:^() {
[MTLGraphicsConfigUtil _getMTLConfigInfo: retArray];
}];

NSNumber * num = (NSNumber *)[retArray objectAtIndex: 0];
ret = (jlong)[num longValue];
JNI_COCOA_EXIT(env);
return ret;
}