Fix metal not getting drawable correctly
This commit is contained in:
parent
9b507aa79a
commit
477ea95905
2 changed files with 3 additions and 6 deletions
|
@ -81,7 +81,7 @@ MTL::SamplerAddressMode toSamplingMode(SamplingMode mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(PLATFORM_IOS) && !defined(PLATFORM_TVOS)
|
#if !defined(PLATFORM_IOS) && !defined(PLATFORM_TVOS)
|
||||||
MTL::SamplerBorderColor toBorderColor(GFXBorderColor color) {
|
inline MTL::SamplerBorderColor toBorderColor(GFXBorderColor color) {
|
||||||
switch(color) {
|
switch(color) {
|
||||||
case GFXBorderColor::OpaqueWhite:
|
case GFXBorderColor::OpaqueWhite:
|
||||||
return MTL::SamplerBorderColorOpaqueWhite;
|
return MTL::SamplerBorderColorOpaqueWhite;
|
||||||
|
@ -720,8 +720,7 @@ void GFXMetal::submit(GFXCommandBuffer* command_buffer, const platform::window_p
|
||||||
|
|
||||||
CA::MetalDrawable* drawable = nullptr;
|
CA::MetalDrawable* drawable = nullptr;
|
||||||
if(native != nullptr) {
|
if(native != nullptr) {
|
||||||
auto next_drawable = (metal_next_image*)platform::get_next_image(window);
|
drawable = (metal_next_image)platform::get_next_image(window);
|
||||||
drawable = next_drawable->next_drawable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MTL::CommandBuffer* commandBuffer = command_queue->commandBuffer();
|
MTL::CommandBuffer* commandBuffer = command_queue->commandBuffer();
|
||||||
|
|
|
@ -111,9 +111,7 @@ struct metal_surface {
|
||||||
MTL::PixelFormat format;
|
MTL::PixelFormat format;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct metal_next_image {
|
using metal_next_image = CA::MetalDrawable*;
|
||||||
CA::MetalDrawable* next_drawable;
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace platform {
|
namespace platform {
|
||||||
|
|
Reference in a new issue