--
You received this message because you are subscribed to the Google Groups "swiftshader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swiftshader+unsubscribe@googlegroups.com.
To post to this group, send email to swift...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swiftshader/9293b943-e491-44e8-9035-e689ff456612%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Chih-Wei,SwiftShader tries to get information on the pixel format from the fb0 device's VSCREENINFO (see src/OpenGL/libEGL/Display.cpp), but if unsuccessful it assumes an X8B8G8R8 format (red in the least significant byte). The logcat output is very useful; it tells us that "FBIOPUT_VSCREENINFO failed", and also that "r = 16:8" meaning it's putting the red component in the third byte (and blue in the first). Hence we're seeing everything swapped. :-)I'm not sure why the FBIOPUT_VSCREENINFO would fail. Perhaps it's not supported by bochsdrmfb?
--
You received this message because you are subscribed to the Google Groups "swiftshader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swiftshader+unsubscribe@googlegroups.com.
To post to this group, send email to swift...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swiftshader/9631c4de-fd56-47e9-b03c-92a5d5f918ae%40googlegroups.com.
Could you try replacing the X8B8G8R8 at this line with X8R8G8B8?Let me know if that fixes it and then we can try to find the root cause. Thanks
Nicolas Capens於 2017年7月20日星期四 UTC+8上午12時55分43秒寫道:Could you try replacing the X8B8G8R8 at this line with X8R8G8B8?Let me know if that fixes it and then we can try to find the root cause. Thanks
Thanks for the suggestion.
I tested but no effect.
So I added mode debug messages.
Then I found the ioctl FBIOGET_VSCREENINFO is OK
(note in my previous logcat the failed ioctl is
FBIOPUT_VSCREENINFO instead of FBIOGET_VSCREENINFO)
so it get the fb info correct. info.transp.length is 0
so it chose sw::FORMAT_X8R8G8B8.
Isn't it correct?
Then I tried sw::FORMAT_X8B8G8R8.
But the colors are still swapped.
I lost
Nicolas Capens於 2017年7月20日星期四 UTC+8上午12時55分43秒寫道:Could you try replacing the X8B8G8R8 at this line with X8R8G8B8?Let me know if that fixes it and then we can try to find the root cause. Thanks
Thanks for the suggestion.
I tested but no effect.
So I added mode debug messages.
Then I found the ioctl FBIOGET_VSCREENINFO is OK
(note in my previous logcat the failed ioctl is
FBIOPUT_VSCREENINFO instead of FBIOGET_VSCREENINFO)
so it get the fb info correct. info.transp.length is 0
so it chose sw::FORMAT_X8R8G8B8.
Isn't it correct?
Then I tried sw::FORMAT_X8B8G8R8.
But the colors are still swapped.
I lost.
Reading the code,
Am I correct that it just returns if a known format
is found without closing the fd?
(in Display::getDisplayFormat())
It's a fd leak. Isn't it?
--
You received this message because you are subscribed to the Google Groups "swiftshader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swiftshader+unsubscribe@googlegroups.com.
To post to this group, send email to swift...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swiftshader/295258d1-d0aa-4b20-ad47-486d2fd10c80%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "swiftshader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swiftshader+unsubscribe@googlegroups.com.
To post to this group, send email to swift...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swiftshader/e6ff935f-6775-43ee-a709-57cddc3e2bb4%40googlegroups.com.
https://swiftshader-review.googlesource.com/11209: does this fix the issue for you?
Nicolas Capens於 2017年8月3日星期四 UTC+8上午3時45分03秒寫道:https://swiftshader-review.googlesource.com/11209: does this fix the issue for you?
I just made the test.
The color is correct now. Thanks a lot!
But honestly speaking, I also have some changes
that may affect the result in my android side.
So I'm not very sure if it really fixes my issue.
I tried to recall the environment I tested
two weeks ago but not succeeded.
Anyway, I think it's perfect now.
BTW, what's the purpose the the different branches?
* android-emulator-current-release
* cloud-android-current-release
Which branch should I use?
The master branch seems also fine for me.
--
You received this message because you are subscribed to the Google Groups "swiftshader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swiftshader+unsubscribe@googlegroups.com.
To post to this group, send email to swift...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swiftshader/c00aa483-02c6-4000-8d08-ebaac4dd0658%40googlegroups.com.
On Fri, Aug 4, 2017 at 5:24 AM, Chih-Wei Huang <cwh...@android-x86.org> wrote:Nicolas Capens於 2017年8月3日星期四 UTC+8上午3時45分03秒寫道:https://swiftshader-review.googlesource.com/11209: does this fix the issue for you?
I just made the test.
The color is correct now. Thanks a lot!
But honestly speaking, I also have some changes
that may affect the result in my android side.
So I'm not very sure if it really fixes my issue.
I tried to recall the environment I tested
two weeks ago but not succeeded.
Anyway, I think it's perfect now.I actually noticed that we're only handling FORMAT_R8G8B8 in FrameBuffer::copyRoutine, not FORMAT_B8G8R8. So the patch couldn't have been the proper fix.While that's still a bug, I vaguely recall that 24-bit color formats are not even supposed to be used by any Android devices, mainly because many ARM processors demand power-of-two data alignment. So this code path might not be used at all (by Android).
If you get the chance could you check if any of your other changes fixed the root cause?
BTW, what's the purpose the the different branches?
* android-emulator-current-release
* cloud-android-current-release
Which branch should I use?
The master branch seems also fine for me.These are the branches used by the Android Emulator and Cloud Android projects, respectively. The master branch often contains newer features and bug fixes though. But sometimes we're working on things for Chrome and we might inadvertently regress Android. That hasn't happened often though. For us it's also more useful if people report issues with builds from the master branch, since it excludes things we've already fixed, and it's useful to know early on if something broke. So the short answer is use the master branch if that works for you. :-)
Nicolas Capens於 2017年8月4日星期五 UTC+8下午10時57分37秒寫道:On Fri, Aug 4, 2017 at 5:24 AM, Chih-Wei Huang <cwh...@android-x86.org> wrote:Nicolas Capens於 2017年8月3日星期四 UTC+8上午3時45分03秒寫道:https://swiftshader-review.googlesource.com/11209: does this fix the issue for you?
I just made the test.
The color is correct now. Thanks a lot!
But honestly speaking, I also have some changes
that may affect the result in my android side.
So I'm not very sure if it really fixes my issue.
I tried to recall the environment I tested
two weeks ago but not succeeded.
Anyway, I think it's perfect now.I actually noticed that we're only handling FORMAT_R8G8B8 in FrameBuffer::copyRoutine, not FORMAT_B8G8R8. So the patch couldn't have been the proper fix.While that's still a bug, I vaguely recall that 24-bit color formats are not even supposed to be used by any Android devices, mainly because many ARM processors demand power-of-two data alignment. So this code path might not be used at all (by Android).
I agree. I didn't see explicit clues that RGB_888 is used.
If you get the chance could you check if any of your other changes fixed the root cause?
OK. I made more tests.
I found my fb device and the requested format in eglCreateWindowSurface affect the result.
By default AOSP requests HAL_PIXEL_FORMAT_RGBA_8888 explicitly[1].
I tested QEMU with different fb devices: bochsdrmfb, uvesafb and virtiodrmfb.
The first two have r-b swapped issue, but the color of virtiodrmfb is correct (I'm surprised)
We have a patch in eglCreateWindowSurface[2] that would select HAL_PIXEL_FORMAT_BGRA_8888 finally.
With the patch I got correct colors in the 3 fb devices.