-
Notifications
You must be signed in to change notification settings - Fork 139
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
XAML textures sampling support #41
base: master
Are you sure you want to change the base?
XAML textures sampling support #41
Conversation
@@ -424,11 +424,147 @@ class D3DDefaultTexture | |||
std::shared_ptr<D3DDevice> m_pDevice; | |||
}; | |||
|
|||
char *DXGIFormatToString(DXGI_FORMAT format) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const char *
} | ||
break; | ||
|
||
default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the desired behavior for all other formats, or catch-all for 'not-implemented' formats? If not implemented, please add assertions or throw exception.
Use highest warning level in UMD and enable precompiled headers
Enable WPP logging in RosUmd
- Remove Vc4Asm - Remove Vc4_Test
All, Cheers, Marek |
|
||
case(DXGI_FORMAT_R8G8_UNORM) : | ||
{ | ||
BYTE *colorConvertedBuffer = (BYTE*)malloc(texWidth * texHeight * sizeof(WORD) * 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always use RAII types in a codebase with exceptions, since the scope may be exited at any time by an exception. A raw owning pointer or resource handle in a codebase where exceptions are allowed is always a bug, or can easily become one if someone inserts a codepath that can throw an exception in a subsequent change.
std::unique_ptr<BYTE[]> ConvertTextureFromRGBA(...)
{
...
std::unique_ptr<BYTE[]> colorConvertedBuffer(new BYTE[texWidth * texHeight * sizeof(UINT16) * 2]);
...
return colorConvertedBuffer;
}
call site:
std::unique_ptr<BYTE[]> buf = ConvertTextureFromRGBA(...); // explicitly specify the type
auto buf = ConvertTextureFromRGBA(...); // or let the compiler figure it out
Create XAML test skeleton, clean up tracing
- Disable tiled texture until Issue microsoft#48 is fixed. - Add iadd support to shader compiler. (Issue microsoft#38). - Fix assertion at SetScissorRects. (Issue microsoft#36).
- Add some comments for Issue 37. - Fix when resource index is not declared sequentially incremented.
…added to CubeTest app.
What is the status of this PR? Can we hope that an updated driver (with better HW acceleration) will be included in Windows IoT Core? |
Any status update on this? |
All,
This pull request is related to issue #25 - Texture formats needed for Direct2D/XAML.
The basic support for the (new) texture modes is provided:
DXGI_FORMAT_R8G8_UNORM,
DXGI_FORMAT_R8_UNORM
DXGI_FORMAT_A8_UNORM
Those modes are emulated with RGBA mode.
Textures can be used in both linear and tiled mode.
Driver is able to sample from those types of textures. Textures can't be used as render targets yet.
Now tiled mode can be also used with 8/16 bpp.
I hope those changes make sense. Thoughts/suggestions are welcome!
Thanks!
Marek
PS Worth to mention, that DXGI_FORMAT_A8_UNORM is mapped to HW format VC4_TEX_RGBX8888 but I think VC4_TEX_RGBA8888 should be used instead. I wasn't sure so I left it as it is.