Fix bug in texture usage mask.
This commit is contained in:
@@ -162,8 +162,7 @@ bool Playground::OpenPlaygroundHere(Renderer::RenderCallback render_callback) {
|
||||
stencil0_tex.format = PixelFormat::kD32FloatS8UNormInt;
|
||||
stencil0_tex.size = color0_tex.size;
|
||||
stencil0_tex.usage =
|
||||
static_cast<TextureUsageMask>(TextureUsage::kShaderRead) |
|
||||
static_cast<TextureUsageMask>(TextureUsage::kShaderWrite);
|
||||
static_cast<TextureUsageMask>(TextureUsage::kRenderTarget);
|
||||
auto stencil_texture =
|
||||
renderer_.GetContext()->GetPermanentsAllocator()->CreateTexture(
|
||||
StorageMode::kDeviceTransient, stencil0_tex);
|
||||
|
||||
@@ -94,10 +94,10 @@ enum class StoreAction {
|
||||
using TextureUsageMask = uint64_t;
|
||||
|
||||
enum class TextureUsage : TextureUsageMask {
|
||||
kUnknown,
|
||||
kShaderRead,
|
||||
kShaderWrite,
|
||||
kRenderTarget,
|
||||
kUnknown = 0,
|
||||
kShaderRead = 1 << 0,
|
||||
kShaderWrite = 1 << 1,
|
||||
kRenderTarget = 1 << 2,
|
||||
};
|
||||
|
||||
enum class WindingOrder {
|
||||
|
||||
@@ -84,8 +84,7 @@ RenderTarget RenderTarget::CreateOffscreen(const Context& context,
|
||||
stencil_tex0.format = PixelFormat::kD32FloatS8UNormInt;
|
||||
stencil_tex0.size = size;
|
||||
stencil_tex0.usage =
|
||||
static_cast<TextureUsageMask>(TextureUsage::kShaderRead) |
|
||||
static_cast<TextureUsageMask>(TextureUsage::kShaderWrite);
|
||||
static_cast<TextureUsageMask>(TextureUsage::kRenderTarget);
|
||||
|
||||
ColorAttachment color0;
|
||||
color0.clear_color = Color::BlackTransparent();
|
||||
|
||||
Reference in New Issue
Block a user