Revert "Rename texture.createTextureView to createView to match WebGPU"

This reverts commit 6f0b021dbf.

Reason for revert: breaks compilation on https://ci.chromium.org/p/chromium/builders/ci/GPU%20FYI%20Linux%20Builder%20%28dbg%29/62003

Original change's description:
> Rename texture.createTextureView to createView to match WebGPU
> 
> Bug: chromium:877147
> Change-Id: I186fc26054cc6729c859a4161c755a1133dc0bca
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6360
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>

TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org

Change-Id: I2d337881fc05cf8128ae7ab268514ea7ef462123
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:877147
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@google.com>
This commit is contained in:
Yuly Novikov 2019-04-09 15:28:01 +00:00 committed by Commit Bot service account
parent fbe6cfdb16
commit 2d4c66d2b8
29 changed files with 106 additions and 106 deletions

View File

@ -934,11 +934,11 @@
"category": "object", "category": "object",
"methods": [ "methods": [
{ {
"name": "create default view", "name": "create default texture view",
"returns": "texture view" "returns": "texture view"
}, },
{ {
"name": "create view", "name": "create texture view",
"returns": "texture view", "returns": "texture view",
"args": [ "args": [
{"name": "descriptor", "type": "texture view descriptor", "annotation": "const*"} {"name": "descriptor", "type": "texture view descriptor", "annotation": "const*"}

View File

@ -138,7 +138,7 @@ void frame() {
size_t i = 0; size_t i = 0;
utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultView()}, utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultTextureView()},
depthStencilView); depthStencilView);
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();
{ {

View File

@ -117,7 +117,7 @@ void frame() {
DawnTexture backbuffer = dawnSwapChainGetNextTexture(swapchain); DawnTexture backbuffer = dawnSwapChainGetNextTexture(swapchain);
DawnTextureView backbufferView; DawnTextureView backbufferView;
{ {
backbufferView = dawnTextureCreateDefaultView(backbuffer); backbufferView = dawnTextureCreateDefaultTextureView(backbuffer);
} }
DawnRenderPassDescriptor renderpassInfo; DawnRenderPassDescriptor renderpassInfo;
DawnRenderPassColorAttachmentDescriptor colorAttachment; DawnRenderPassColorAttachmentDescriptor colorAttachment;

View File

@ -273,7 +273,7 @@ dawn::CommandBuffer createCommandBuffer(const dawn::Texture backbuffer, size_t i
} }
{ {
utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultView()}, utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultTextureView()},
depthStencilView); depthStencilView);
dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass); dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass);
pass.SetPipeline(renderPipeline); pass.SetPipeline(renderPipeline);

View File

@ -135,7 +135,7 @@ void init() {
pipeline = device.CreateRenderPipeline(&descriptor); pipeline = device.CreateRenderPipeline(&descriptor);
dawn::TextureView view = texture.CreateDefaultView(); dawn::TextureView view = texture.CreateDefaultTextureView();
bindGroup = utils::MakeBindGroup(device, bgl, { bindGroup = utils::MakeBindGroup(device, bgl, {
{0, sampler}, {0, sampler},
@ -150,7 +150,7 @@ void frame() {
if (s.b >= 1.0f) {s.b = 0.0f;} if (s.b >= 1.0f) {s.b = 0.0f;}
dawn::Texture backbuffer = swapchain.GetNextTexture(); dawn::Texture backbuffer = swapchain.GetNextTexture();
utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultView()}, utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultTextureView()},
depthStencilView); depthStencilView);
static const uint64_t vertexBufferOffsets[1] = {0}; static const uint64_t vertexBufferOffsets[1] = {0};

View File

@ -260,7 +260,7 @@ void frame() {
cameraBuffer.SetSubData(0, sizeof(CameraData), reinterpret_cast<uint8_t*>(&cameraData)); cameraBuffer.SetSubData(0, sizeof(CameraData), reinterpret_cast<uint8_t*>(&cameraData));
dawn::Texture backbuffer = swapchain.GetNextTexture(); dawn::Texture backbuffer = swapchain.GetNextTexture();
utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultView()}, utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultTextureView()},
depthStencilView); depthStencilView);
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();

View File

@ -167,7 +167,7 @@ dawn::TextureView CreateDefaultDepthStencilView(const dawn::Device& device) {
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
descriptor.usage = dawn::TextureUsageBit::OutputAttachment; descriptor.usage = dawn::TextureUsageBit::OutputAttachment;
auto depthStencilTexture = device.CreateTexture(&descriptor); auto depthStencilTexture = device.CreateTexture(&descriptor);
return depthStencilTexture.CreateDefaultView(); return depthStencilTexture.CreateDefaultTextureView();
} }
bool InitSample(int argc, const char** argv) { bool InitSample(int argc, const char** argv) {

View File

@ -466,7 +466,7 @@ namespace {
dawn::CommandBuffer cmdbuf = encoder.Finish(); dawn::CommandBuffer cmdbuf = encoder.Finish();
queue.Submit(1, &cmdbuf); queue.Submit(1, &cmdbuf);
textures[iTextureID] = oTexture.CreateDefaultView(); textures[iTextureID] = oTexture.CreateDefaultTextureView();
} }
} }
@ -593,7 +593,7 @@ namespace {
const auto& defaultSceneNodes = scene.scenes.at(scene.defaultScene); const auto& defaultSceneNodes = scene.scenes.at(scene.defaultScene);
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();
{ {
utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultView()}, utils::ComboRenderPassDescriptor renderPass({backbuffer.CreateDefaultTextureView()},
depthStencilView); depthStencilView);
dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass); dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass);
for (const auto& n : defaultSceneNodes) { for (const auto& n : defaultSceneNodes) {

View File

@ -381,7 +381,7 @@ namespace dawn_native {
return mSampleCount > 1; return mSampleCount > 1;
} }
TextureViewBase* TextureBase::CreateDefaultView() { TextureViewBase* TextureBase::CreateDefaultTextureView() {
TextureViewDescriptor descriptor = {}; TextureViewDescriptor descriptor = {};
if (!IsError()) { if (!IsError()) {
@ -391,7 +391,7 @@ namespace dawn_native {
return GetDevice()->CreateTextureView(this, &descriptor); return GetDevice()->CreateTextureView(this, &descriptor);
} }
TextureViewBase* TextureBase::CreateView(const TextureViewDescriptor* descriptor) { TextureViewBase* TextureBase::CreateTextureView(const TextureViewDescriptor* descriptor) {
return GetDevice()->CreateTextureView(this, descriptor); return GetDevice()->CreateTextureView(this, descriptor);
} }

View File

@ -65,8 +65,8 @@ namespace dawn_native {
bool IsMultisampledTexture() const; bool IsMultisampledTexture() const;
// Dawn API // Dawn API
TextureViewBase* CreateDefaultView(); TextureViewBase* CreateDefaultTextureView();
TextureViewBase* CreateView(const TextureViewDescriptor* descriptor); TextureViewBase* CreateTextureView(const TextureViewDescriptor* descriptor);
void Destroy(); void Destroy();
protected: protected:

View File

@ -251,7 +251,7 @@ TEST_P(BindGroupTests, UBOSamplerAndTexture) {
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
descriptor.usage = dawn::TextureUsageBit::TransferDst | dawn::TextureUsageBit::Sampled; descriptor.usage = dawn::TextureUsageBit::TransferDst | dawn::TextureUsageBit::Sampled;
dawn::Texture texture = device.CreateTexture(&descriptor); dawn::Texture texture = device.CreateTexture(&descriptor);
dawn::TextureView textureView = texture.CreateDefaultView(); dawn::TextureView textureView = texture.CreateDefaultTextureView();
int width = kRTSize, height = kRTSize; int width = kRTSize, height = kRTSize;
int widthInBytes = width * sizeof(RGBA8); int widthInBytes = width * sizeof(RGBA8);

View File

@ -76,7 +76,7 @@ TEST_P(ClipSpaceTest, ClipSpace) {
dawn::Texture depthStencilTexture = Create2DTextureForTest(dawn::TextureFormat::D32FloatS8Uint); dawn::Texture depthStencilTexture = Create2DTextureForTest(dawn::TextureFormat::D32FloatS8Uint);
utils::ComboRenderPassDescriptor renderPassDescriptor( utils::ComboRenderPassDescriptor renderPassDescriptor(
{colorTexture.CreateDefaultView()}, depthStencilTexture.CreateDefaultView()); {colorTexture.CreateDefaultTextureView()}, depthStencilTexture.CreateDefaultTextureView());
renderPassDescriptor.cColorAttachmentsInfoPtr[0]->clearColor = {0.0, 1.0, 0.0, 1.0}; renderPassDescriptor.cColorAttachmentsInfoPtr[0]->clearColor = {0.0, 1.0, 0.0, 1.0};
renderPassDescriptor.cColorAttachmentsInfoPtr[0]->loadOp = dawn::LoadOp::Clear; renderPassDescriptor.cColorAttachmentsInfoPtr[0]->loadOp = dawn::LoadOp::Clear;

View File

@ -766,7 +766,7 @@ TEST_P(ColorStateTest, IndependentColorState) {
for (uint32_t i = 0; i < 4; ++i) { for (uint32_t i = 0; i < 4; ++i) {
renderTargets[i] = device.CreateTexture(&descriptor); renderTargets[i] = device.CreateTexture(&descriptor);
renderTargetViews[i] = renderTargets[i].CreateDefaultView(); renderTargetViews[i] = renderTargets[i].CreateDefaultTextureView();
} }
utils::ComboRenderPassDescriptor renderPass({renderTargetViews[0], renderTargetViews[1], utils::ComboRenderPassDescriptor renderPass({renderTargetViews[0], renderTargetViews[1],

View File

@ -37,7 +37,7 @@ class DepthStencilStateTest : public DawnTest {
renderTargetDescriptor.usage = dawn::TextureUsageBit::OutputAttachment | dawn::TextureUsageBit::TransferSrc; renderTargetDescriptor.usage = dawn::TextureUsageBit::OutputAttachment | dawn::TextureUsageBit::TransferSrc;
renderTarget = device.CreateTexture(&renderTargetDescriptor); renderTarget = device.CreateTexture(&renderTargetDescriptor);
renderTargetView = renderTarget.CreateDefaultView(); renderTargetView = renderTarget.CreateDefaultTextureView();
dawn::TextureDescriptor depthDescriptor; dawn::TextureDescriptor depthDescriptor;
depthDescriptor.dimension = dawn::TextureDimension::e2D; depthDescriptor.dimension = dawn::TextureDimension::e2D;
@ -51,7 +51,7 @@ class DepthStencilStateTest : public DawnTest {
depthDescriptor.usage = dawn::TextureUsageBit::OutputAttachment; depthDescriptor.usage = dawn::TextureUsageBit::OutputAttachment;
depthTexture = device.CreateTexture(&depthDescriptor); depthTexture = device.CreateTexture(&depthDescriptor);
depthTextureView = depthTexture.CreateDefaultView(); depthTextureView = depthTexture.CreateDefaultTextureView();
vsModule = utils::CreateShaderModule(device, dawn::ShaderStage::Vertex, R"( vsModule = utils::CreateShaderModule(device, dawn::ShaderStage::Vertex, R"(
#version 450 #version 450

View File

@ -239,7 +239,7 @@ class IOSurfaceUsageTests : public IOSurfaceTestBase {
textureDescriptor.usage = dawn::TextureUsageBit::Sampled; textureDescriptor.usage = dawn::TextureUsageBit::Sampled;
dawn::Texture wrappingTexture = WrapIOSurface(&textureDescriptor, ioSurface, 0); dawn::Texture wrappingTexture = WrapIOSurface(&textureDescriptor, ioSurface, 0);
dawn::TextureView textureView = wrappingTexture.CreateDefaultView(); dawn::TextureView textureView = wrappingTexture.CreateDefaultTextureView();
dawn::SamplerDescriptor samplerDescriptor = utils::GetDefaultSamplerDescriptor(); dawn::SamplerDescriptor samplerDescriptor = utils::GetDefaultSamplerDescriptor();
dawn::Sampler sampler = device.CreateSampler(&samplerDescriptor); dawn::Sampler sampler = device.CreateSampler(&samplerDescriptor);
@ -331,7 +331,7 @@ class IOSurfaceUsageTests : public IOSurfaceTestBase {
textureDescriptor.usage = dawn::TextureUsageBit::OutputAttachment; textureDescriptor.usage = dawn::TextureUsageBit::OutputAttachment;
dawn::Texture ioSurfaceTexture = WrapIOSurface(&textureDescriptor, ioSurface, 0); dawn::Texture ioSurfaceTexture = WrapIOSurface(&textureDescriptor, ioSurface, 0);
dawn::TextureView ioSurfaceView = ioSurfaceTexture.CreateDefaultView(); dawn::TextureView ioSurfaceView = ioSurfaceTexture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPassDescriptor({ioSurfaceView}, {}); utils::ComboRenderPassDescriptor renderPassDescriptor({ioSurfaceView}, {});
renderPassDescriptor.cColorAttachmentsInfoPtr[0]->clearColor = {1 / 255.0f, 2 / 255.0f, renderPassDescriptor.cColorAttachmentsInfoPtr[0]->clearColor = {1 / 255.0f, 2 / 255.0f,

View File

@ -28,9 +28,9 @@ class MultisampledRenderingTest : public DawnTest {
void InitTexturesForTest() { void InitTexturesForTest() {
mMultisampledColorView = mMultisampledColorView =
CreateTextureForOutputAttachment(kColorFormat, kSampleCount).CreateDefaultView(); CreateTextureForOutputAttachment(kColorFormat, kSampleCount).CreateDefaultTextureView();
mResolveTexture = CreateTextureForOutputAttachment(kColorFormat, 1); mResolveTexture = CreateTextureForOutputAttachment(kColorFormat, 1);
mResolveView = mResolveTexture.CreateDefaultView(); mResolveView = mResolveTexture.CreateDefaultTextureView();
} }
dawn::RenderPipeline CreateRenderPipelineWithOneOutputForTest(bool testDepth) { dawn::RenderPipeline CreateRenderPipelineWithOneOutputForTest(bool testDepth) {
@ -143,7 +143,7 @@ class MultisampledRenderingTest : public DawnTest {
dawn::Texture depthStencilTexture = dawn::Texture depthStencilTexture =
CreateTextureForOutputAttachment(kDepthStencilFormat, kSampleCount); CreateTextureForOutputAttachment(kDepthStencilFormat, kSampleCount);
renderPass.cDepthStencilAttachmentInfo.attachment = renderPass.cDepthStencilAttachmentInfo.attachment =
depthStencilTexture.CreateDefaultView(); depthStencilTexture.CreateDefaultTextureView();
renderPass.depthStencilAttachment = &renderPass.cDepthStencilAttachmentInfo; renderPass.depthStencilAttachment = &renderPass.cDepthStencilAttachmentInfo;
} }
@ -338,9 +338,9 @@ TEST_P(MultisampledRenderingTest, ResolveInAnotherRenderPass) {
// Test doing MSAA resolve into multiple resolve targets works correctly. // Test doing MSAA resolve into multiple resolve targets works correctly.
TEST_P(MultisampledRenderingTest, ResolveIntoMultipleResolveTargets) { TEST_P(MultisampledRenderingTest, ResolveIntoMultipleResolveTargets) {
dawn::TextureView multisampledColorView2 = dawn::TextureView multisampledColorView2 =
CreateTextureForOutputAttachment(kColorFormat, kSampleCount).CreateDefaultView(); CreateTextureForOutputAttachment(kColorFormat, kSampleCount).CreateDefaultTextureView();
dawn::Texture resolveTexture2 = CreateTextureForOutputAttachment(kColorFormat, 1); dawn::Texture resolveTexture2 = CreateTextureForOutputAttachment(kColorFormat, 1);
dawn::TextureView resolveView2 = resolveTexture2.CreateDefaultView(); dawn::TextureView resolveView2 = resolveTexture2.CreateDefaultTextureView();
dawn::CommandEncoder commandEncoder = device.CreateCommandEncoder(); dawn::CommandEncoder commandEncoder = device.CreateCommandEncoder();
dawn::RenderPipeline pipeline = CreateRenderPipelineWithTwoOutputsForTest(); dawn::RenderPipeline pipeline = CreateRenderPipelineWithTwoOutputsForTest();
@ -425,7 +425,7 @@ TEST_P(MultisampledRenderingTest, ResolveIntoOneMipmapLevelOf2DTexture) {
dawn::Texture resolveTexture = dawn::Texture resolveTexture =
CreateTextureForOutputAttachment(kColorFormat, 1, kBaseMipLevel + 1, 1); CreateTextureForOutputAttachment(kColorFormat, 1, kBaseMipLevel + 1, 1);
dawn::TextureView resolveView = resolveTexture.CreateView(&textureViewDescriptor); dawn::TextureView resolveView = resolveTexture.CreateTextureView(&textureViewDescriptor);
dawn::CommandEncoder commandEncoder = device.CreateCommandEncoder(); dawn::CommandEncoder commandEncoder = device.CreateCommandEncoder();
constexpr dawn::Color kGreen = {0.0f, 0.8f, 0.0f, 0.8f}; constexpr dawn::Color kGreen = {0.0f, 0.8f, 0.0f, 0.8f};
@ -454,7 +454,7 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DArrayTexture) {
// TODO(jiawei.shao@intel.com): investigate why this case fails on Intel and Nvidia. // TODO(jiawei.shao@intel.com): investigate why this case fails on Intel and Nvidia.
DAWN_SKIP_TEST_IF(IsMetal() && (IsIntel() || IsNvidia())); DAWN_SKIP_TEST_IF(IsMetal() && (IsIntel() || IsNvidia()));
dawn::TextureView multisampledColorView2 = dawn::TextureView multisampledColorView2 =
CreateTextureForOutputAttachment(kColorFormat, kSampleCount).CreateDefaultView(); CreateTextureForOutputAttachment(kColorFormat, kSampleCount).CreateDefaultTextureView();
dawn::TextureViewDescriptor baseTextureViewDescriptor; dawn::TextureViewDescriptor baseTextureViewDescriptor;
baseTextureViewDescriptor.dimension = dawn::TextureViewDimension::e2D; baseTextureViewDescriptor.dimension = dawn::TextureViewDimension::e2D;
@ -470,7 +470,7 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DArrayTexture) {
dawn::TextureViewDescriptor resolveViewDescriptor1 = baseTextureViewDescriptor; dawn::TextureViewDescriptor resolveViewDescriptor1 = baseTextureViewDescriptor;
resolveViewDescriptor1.baseArrayLayer = kBaseArrayLayer1; resolveViewDescriptor1.baseArrayLayer = kBaseArrayLayer1;
resolveViewDescriptor1.baseMipLevel = kBaseMipLevel1; resolveViewDescriptor1.baseMipLevel = kBaseMipLevel1;
dawn::TextureView resolveView1 = resolveTexture1.CreateView(&resolveViewDescriptor1); dawn::TextureView resolveView1 = resolveTexture1.CreateTextureView(&resolveViewDescriptor1);
// Create resolveTexture2 with (kBaseMipLevel2 + 1) mipmap levels and resolve into its last // Create resolveTexture2 with (kBaseMipLevel2 + 1) mipmap levels and resolve into its last
// mipmap level. // mipmap level.
@ -481,7 +481,7 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DArrayTexture) {
dawn::TextureViewDescriptor resolveViewDescriptor2 = baseTextureViewDescriptor; dawn::TextureViewDescriptor resolveViewDescriptor2 = baseTextureViewDescriptor;
resolveViewDescriptor2.baseArrayLayer = kBaseArrayLayer2; resolveViewDescriptor2.baseArrayLayer = kBaseArrayLayer2;
resolveViewDescriptor2.baseMipLevel = kBaseMipLevel2; resolveViewDescriptor2.baseMipLevel = kBaseMipLevel2;
dawn::TextureView resolveView2 = resolveTexture2.CreateView(&resolveViewDescriptor2); dawn::TextureView resolveView2 = resolveTexture2.CreateTextureView(&resolveViewDescriptor2);
dawn::CommandEncoder commandEncoder = device.CreateCommandEncoder(); dawn::CommandEncoder commandEncoder = device.CreateCommandEncoder();
dawn::RenderPipeline pipeline = CreateRenderPipelineWithTwoOutputsForTest(); dawn::RenderPipeline pipeline = CreateRenderPipelineWithTwoOutputsForTest();

View File

@ -69,7 +69,7 @@ class RenderPassLoadOpTests : public DawnTest {
descriptor.usage = dawn::TextureUsageBit::OutputAttachment | dawn::TextureUsageBit::TransferSrc; descriptor.usage = dawn::TextureUsageBit::OutputAttachment | dawn::TextureUsageBit::TransferSrc;
renderTarget = device.CreateTexture(&descriptor); renderTarget = device.CreateTexture(&descriptor);
renderTargetView = renderTarget.CreateDefaultView(); renderTargetView = renderTarget.CreateDefaultTextureView();
RGBA8 zero(0, 0, 0, 0); RGBA8 zero(0, 0, 0, 0);
std::fill(expectZero.begin(), expectZero.end(), zero); std::fill(expectZero.begin(), expectZero.end(), zero);

View File

@ -84,7 +84,7 @@ TEST_P(RenderPassTest, TwoRenderPassesInOneCommandBuffer) {
{ {
// In the first render pass we clear renderTarget1 to red and draw a blue triangle in the // In the first render pass we clear renderTarget1 to red and draw a blue triangle in the
// bottom left of renderTarget1. // bottom left of renderTarget1.
utils::ComboRenderPassDescriptor renderPass({renderTarget1.CreateDefaultView()}); utils::ComboRenderPassDescriptor renderPass({renderTarget1.CreateDefaultTextureView()});
renderPass.cColorAttachmentsInfoPtr[0]->clearColor = {1.0f, 0.0f, 0.0f, 1.0f}; renderPass.cColorAttachmentsInfoPtr[0]->clearColor = {1.0f, 0.0f, 0.0f, 1.0f};
dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass); dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass);
@ -96,7 +96,7 @@ TEST_P(RenderPassTest, TwoRenderPassesInOneCommandBuffer) {
{ {
// In the second render pass we clear renderTarget2 to green and draw a blue triangle in the // In the second render pass we clear renderTarget2 to green and draw a blue triangle in the
// bottom left of renderTarget2. // bottom left of renderTarget2.
utils::ComboRenderPassDescriptor renderPass({renderTarget2.CreateDefaultView()}); utils::ComboRenderPassDescriptor renderPass({renderTarget2.CreateDefaultTextureView()});
renderPass.cColorAttachmentsInfoPtr[0]->clearColor = {0.0f, 1.0f, 0.0f, 1.0f}; renderPass.cColorAttachmentsInfoPtr[0]->clearColor = {0.0f, 1.0f, 0.0f, 1.0f};
dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass); dawn::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass);

View File

@ -113,7 +113,7 @@ protected:
dawn::CommandBuffer copy = encoder.Finish(); dawn::CommandBuffer copy = encoder.Finish();
queue.Submit(1, &copy); queue.Submit(1, &copy);
mTextureView = texture.CreateDefaultView(); mTextureView = texture.CreateDefaultTextureView();
} }
void TestAddressModes(AddressModeTestCase u, AddressModeTestCase v, AddressModeTestCase w) { void TestAddressModes(AddressModeTestCase u, AddressModeTestCase v, AddressModeTestCase w) {

View File

@ -209,7 +209,7 @@ protected:
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
descriptor.baseMipLevel = textureViewBaseMipLevel; descriptor.baseMipLevel = textureViewBaseMipLevel;
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
dawn::TextureView textureView = mTexture.CreateView(&descriptor); dawn::TextureView textureView = mTexture.CreateTextureView(&descriptor);
const char* fragmentShader = R"( const char* fragmentShader = R"(
#version 450 #version 450
@ -248,7 +248,7 @@ protected:
descriptor.arrayLayerCount = kTextureViewLayerCount; descriptor.arrayLayerCount = kTextureViewLayerCount;
descriptor.baseMipLevel = textureViewBaseMipLevel; descriptor.baseMipLevel = textureViewBaseMipLevel;
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
dawn::TextureView textureView = mTexture.CreateView(&descriptor); dawn::TextureView textureView = mTexture.CreateTextureView(&descriptor);
const char* fragmentShader = R"( const char* fragmentShader = R"(
#version 450 #version 450
@ -328,7 +328,7 @@ protected:
descriptor.baseArrayLayer = textureViewBaseLayer; descriptor.baseArrayLayer = textureViewBaseLayer;
descriptor.arrayLayerCount = textureViewLayerCount; descriptor.arrayLayerCount = textureViewLayerCount;
dawn::TextureView cubeMapTextureView = mTexture.CreateView(&descriptor); dawn::TextureView cubeMapTextureView = mTexture.CreateTextureView(&descriptor);
// Check the data in the every face of the cube map (array) texture view. // Check the data in the every face of the cube map (array) texture view.
for (uint32_t layer = 0; layer < textureViewLayerCount; ++layer) { for (uint32_t layer = 0; layer < textureViewLayerCount; ++layer) {
@ -358,7 +358,7 @@ TEST_P(TextureViewSamplingTest, Default2DArrayTexture) {
constexpr uint32_t kMipLevels = 1; constexpr uint32_t kMipLevels = 1;
initTexture(kLayers, kMipLevels); initTexture(kLayers, kMipLevels);
dawn::TextureView textureView = mTexture.CreateDefaultView(); dawn::TextureView textureView = mTexture.CreateDefaultTextureView();
const char* fragmentShader = R"( const char* fragmentShader = R"(
#version 450 #version 450
@ -486,7 +486,7 @@ class TextureViewRenderingTest : public DawnTest {
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
descriptor.baseMipLevel = textureViewBaseLevel; descriptor.baseMipLevel = textureViewBaseLevel;
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
dawn::TextureView textureView = texture.CreateView(&descriptor); dawn::TextureView textureView = texture.CreateTextureView(&descriptor);
dawn::ShaderModule vsModule = CreateDefaultVertexShaderModule(device); dawn::ShaderModule vsModule = CreateDefaultVertexShaderModule(device);

View File

@ -47,7 +47,7 @@ class BindGroupValidationTest : public ValidationTest {
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
descriptor.usage = dawn::TextureUsageBit::Sampled; descriptor.usage = dawn::TextureUsageBit::Sampled;
mSampledTexture = device.CreateTexture(&descriptor); mSampledTexture = device.CreateTexture(&descriptor);
mSampledTextureView = mSampledTexture.CreateDefaultView(); mSampledTextureView = mSampledTexture.CreateDefaultTextureView();
} }
} }
@ -223,7 +223,7 @@ TEST_F(BindGroupValidationTest, TextureBindingType) {
viewDesc.arrayLayerCount = 0; viewDesc.arrayLayerCount = 0;
dawn::TextureView errorView; dawn::TextureView errorView;
ASSERT_DEVICE_ERROR(errorView = mSampledTexture.CreateView(&viewDesc)); ASSERT_DEVICE_ERROR(errorView = mSampledTexture.CreateTextureView(&viewDesc));
binding.textureView = errorView; binding.textureView = errorView;
ASSERT_DEVICE_ERROR(device.CreateBindGroup(&descriptor)); ASSERT_DEVICE_ERROR(device.CreateBindGroup(&descriptor));
@ -301,7 +301,7 @@ TEST_F(BindGroupValidationTest, TextureUsage) {
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
descriptor.usage = dawn::TextureUsageBit::OutputAttachment; descriptor.usage = dawn::TextureUsageBit::OutputAttachment;
dawn::Texture outputTexture = device.CreateTexture(&descriptor); dawn::Texture outputTexture = device.CreateTexture(&descriptor);
dawn::TextureView outputTextureView = outputTexture.CreateDefaultView(); dawn::TextureView outputTextureView = outputTexture.CreateDefaultTextureView();
ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, outputTextureView}})); ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, outputTextureView}}));
} }

View File

@ -226,7 +226,7 @@ TEST_F(CommandBufferValidationTest, TextureWithReadAndWriteUsage) {
textureDescriptor.sampleCount = 1; textureDescriptor.sampleCount = 1;
textureDescriptor.mipLevelCount = 1; textureDescriptor.mipLevelCount = 1;
dawn::Texture texture = device.CreateTexture(&textureDescriptor); dawn::Texture texture = device.CreateTexture(&textureDescriptor);
dawn::TextureView view = texture.CreateDefaultView(); dawn::TextureView view = texture.CreateDefaultTextureView();
// Create the bind group to use the texture as sampled // Create the bind group to use the texture as sampled
dawn::BindGroupLayout bgl = utils::MakeBindGroupLayout(device, {{ dawn::BindGroupLayout bgl = utils::MakeBindGroupLayout(device, {{

View File

@ -69,7 +69,7 @@ dawn::TextureView Create2DAttachment(dawn::Device& device,
dawn::TextureFormat format) { dawn::TextureFormat format) {
dawn::Texture texture = CreateTexture( dawn::Texture texture = CreateTexture(
device, dawn::TextureDimension::e2D, format, width, height, 1, 1); device, dawn::TextureDimension::e2D, format, width, height, 1, 1);
return texture.CreateDefaultView(); return texture.CreateDefaultTextureView();
} }
// Using BeginRenderPass with no attachments isn't valid // Using BeginRenderPass with no attachments isn't valid
@ -222,7 +222,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLayerCountForColorAndDepth
descriptor.format = kColorFormat; descriptor.format = kColorFormat;
descriptor.arrayLayerCount = 5; descriptor.arrayLayerCount = 5;
dawn::TextureView colorTextureView = colorTexture.CreateView(&descriptor); dawn::TextureView colorTextureView = colorTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({colorTextureView}); utils::ComboRenderPassDescriptor renderPass({colorTextureView});
AssertBeginRenderPassError(&renderPass); AssertBeginRenderPassError(&renderPass);
} }
@ -233,7 +233,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLayerCountForColorAndDepth
descriptor.format = kDepthStencilFormat; descriptor.format = kDepthStencilFormat;
descriptor.arrayLayerCount = 5; descriptor.arrayLayerCount = 5;
dawn::TextureView depthStencilView = depthStencilTexture.CreateView(&descriptor); dawn::TextureView depthStencilView = depthStencilTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({}, depthStencilView); utils::ComboRenderPassDescriptor renderPass({}, depthStencilView);
AssertBeginRenderPassError(&renderPass); AssertBeginRenderPassError(&renderPass);
} }
@ -245,7 +245,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLayerCountForColorAndDepth
descriptor.baseArrayLayer = 0; descriptor.baseArrayLayer = 0;
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
dawn::TextureView colorTextureView = colorTexture.CreateView(&descriptor); dawn::TextureView colorTextureView = colorTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({colorTextureView}); utils::ComboRenderPassDescriptor renderPass({colorTextureView});
AssertBeginRenderPassSuccess(&renderPass); AssertBeginRenderPassSuccess(&renderPass);
} }
@ -257,7 +257,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLayerCountForColorAndDepth
descriptor.baseArrayLayer = 0; descriptor.baseArrayLayer = 0;
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
dawn::TextureView depthStencilView = depthStencilTexture.CreateView(&descriptor); dawn::TextureView depthStencilView = depthStencilTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({}, depthStencilView); utils::ComboRenderPassDescriptor renderPass({}, depthStencilView);
AssertBeginRenderPassSuccess(&renderPass); AssertBeginRenderPassSuccess(&renderPass);
} }
@ -269,7 +269,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLayerCountForColorAndDepth
descriptor.baseArrayLayer = kArrayLayers - 1; descriptor.baseArrayLayer = kArrayLayers - 1;
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
dawn::TextureView colorTextureView = colorTexture.CreateView(&descriptor); dawn::TextureView colorTextureView = colorTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({colorTextureView}); utils::ComboRenderPassDescriptor renderPass({colorTextureView});
AssertBeginRenderPassSuccess(&renderPass); AssertBeginRenderPassSuccess(&renderPass);
} }
@ -281,7 +281,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLayerCountForColorAndDepth
descriptor.baseArrayLayer = kArrayLayers - 1; descriptor.baseArrayLayer = kArrayLayers - 1;
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
dawn::TextureView depthStencilView = depthStencilTexture.CreateView(&descriptor); dawn::TextureView depthStencilView = depthStencilTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({}, depthStencilView); utils::ComboRenderPassDescriptor renderPass({}, depthStencilView);
AssertBeginRenderPassSuccess(&renderPass); AssertBeginRenderPassSuccess(&renderPass);
} }
@ -315,7 +315,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLevelCountForColorAndDepth
descriptor.format = kColorFormat; descriptor.format = kColorFormat;
descriptor.mipLevelCount = 2; descriptor.mipLevelCount = 2;
dawn::TextureView colorTextureView = colorTexture.CreateView(&descriptor); dawn::TextureView colorTextureView = colorTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({colorTextureView}); utils::ComboRenderPassDescriptor renderPass({colorTextureView});
AssertBeginRenderPassError(&renderPass); AssertBeginRenderPassError(&renderPass);
} }
@ -326,7 +326,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLevelCountForColorAndDepth
descriptor.format = kDepthStencilFormat; descriptor.format = kDepthStencilFormat;
descriptor.mipLevelCount = 2; descriptor.mipLevelCount = 2;
dawn::TextureView depthStencilView = depthStencilTexture.CreateView(&descriptor); dawn::TextureView depthStencilView = depthStencilTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({}, depthStencilView); utils::ComboRenderPassDescriptor renderPass({}, depthStencilView);
AssertBeginRenderPassError(&renderPass); AssertBeginRenderPassError(&renderPass);
} }
@ -338,7 +338,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLevelCountForColorAndDepth
descriptor.baseMipLevel = 0; descriptor.baseMipLevel = 0;
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
dawn::TextureView colorTextureView = colorTexture.CreateView(&descriptor); dawn::TextureView colorTextureView = colorTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({colorTextureView}); utils::ComboRenderPassDescriptor renderPass({colorTextureView});
AssertBeginRenderPassSuccess(&renderPass); AssertBeginRenderPassSuccess(&renderPass);
} }
@ -350,7 +350,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLevelCountForColorAndDepth
descriptor.baseMipLevel = 0; descriptor.baseMipLevel = 0;
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
dawn::TextureView depthStencilView = depthStencilTexture.CreateView(&descriptor); dawn::TextureView depthStencilView = depthStencilTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({}, depthStencilView); utils::ComboRenderPassDescriptor renderPass({}, depthStencilView);
AssertBeginRenderPassSuccess(&renderPass); AssertBeginRenderPassSuccess(&renderPass);
} }
@ -362,7 +362,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLevelCountForColorAndDepth
descriptor.baseMipLevel = kLevelCount - 1; descriptor.baseMipLevel = kLevelCount - 1;
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
dawn::TextureView colorTextureView = colorTexture.CreateView(&descriptor); dawn::TextureView colorTextureView = colorTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({colorTextureView}); utils::ComboRenderPassDescriptor renderPass({colorTextureView});
AssertBeginRenderPassSuccess(&renderPass); AssertBeginRenderPassSuccess(&renderPass);
} }
@ -374,7 +374,7 @@ TEST_F(RenderPassDescriptorValidationTest, TextureViewLevelCountForColorAndDepth
descriptor.baseMipLevel = kLevelCount - 1; descriptor.baseMipLevel = kLevelCount - 1;
descriptor.mipLevelCount = 1; descriptor.mipLevelCount = 1;
dawn::TextureView depthStencilView = depthStencilTexture.CreateView(&descriptor); dawn::TextureView depthStencilView = depthStencilTexture.CreateTextureView(&descriptor);
utils::ComboRenderPassDescriptor renderPass({}, depthStencilView); utils::ComboRenderPassDescriptor renderPass({}, depthStencilView);
AssertBeginRenderPassSuccess(&renderPass); AssertBeginRenderPassSuccess(&renderPass);
} }
@ -394,8 +394,8 @@ TEST_F(RenderPassDescriptorValidationTest, NonMultisampledColorWithResolveTarget
dawn::Texture resolveTargetTexture = CreateTexture( dawn::Texture resolveTargetTexture = CreateTexture(
device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers, device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers,
kLevelCount, kSampleCount); kLevelCount, kSampleCount);
dawn::TextureView colorTextureView = colorTexture.CreateDefaultView(); dawn::TextureView colorTextureView = colorTexture.CreateDefaultTextureView();
dawn::TextureView resolveTargetTextureView = resolveTargetTexture.CreateDefaultView(); dawn::TextureView resolveTargetTextureView = resolveTargetTexture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPass({colorTextureView}); utils::ComboRenderPassDescriptor renderPass({colorTextureView});
renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTargetTextureView; renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTargetTextureView;
@ -428,7 +428,7 @@ class MultisampledRenderPassDescriptorValidationTest : public RenderPassDescript
device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers, device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers,
kLevelCount, sampleCount); kLevelCount, sampleCount);
return colorTexture.CreateDefaultView(); return colorTexture.CreateDefaultTextureView();
} }
}; };
@ -467,7 +467,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, ResolveTargetArrayLayerMo
dawn::Texture resolveTexture = CreateTexture( dawn::Texture resolveTexture = CreateTexture(
device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers2, device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers2,
kLevelCount); kLevelCount);
dawn::TextureView resolveTextureView = resolveTexture.CreateDefaultView(); dawn::TextureView resolveTextureView = resolveTexture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass(); utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass();
renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView; renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView;
@ -480,7 +480,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, ResolveTargetMipmapLevelM
dawn::Texture resolveTexture = CreateTexture( dawn::Texture resolveTexture = CreateTexture(
device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers, device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers,
kLevelCount2); kLevelCount2);
dawn::TextureView resolveTextureView = resolveTexture.CreateDefaultView(); dawn::TextureView resolveTextureView = resolveTexture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass(); utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass();
renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView; renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView;
@ -496,7 +496,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, ResolveTargetUsageNoOutpu
device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers, device, dawn::TextureDimension::e2D, kColorFormat, kSize, kSize, kArrayLayers,
kLevelCount, 1, kUsage); kLevelCount, 1, kUsage);
dawn::TextureView nonColorUsageResolveTextureView = dawn::TextureView nonColorUsageResolveTextureView =
nonColorUsageResolveTexture.CreateDefaultView(); nonColorUsageResolveTexture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass(); utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass();
renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = nonColorUsageResolveTextureView; renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = nonColorUsageResolveTextureView;
@ -514,7 +514,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, ResolveTargetInErrorState
errorTextureView.baseArrayLayer = kArrayLayers + 1; errorTextureView.baseArrayLayer = kArrayLayers + 1;
ASSERT_DEVICE_ERROR( ASSERT_DEVICE_ERROR(
dawn::TextureView errorResolveTarget = dawn::TextureView errorResolveTarget =
resolveTexture.CreateView(&errorTextureView)); resolveTexture.CreateTextureView(&errorTextureView));
utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass(); utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass();
renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = errorResolveTarget; renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = errorResolveTarget;
@ -536,7 +536,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, ResolveTargetDifferentFor
dawn::Texture resolveTexture = CreateTexture( dawn::Texture resolveTexture = CreateTexture(
device, dawn::TextureDimension::e2D, kColorFormat2, kSize, kSize, kArrayLayers, device, dawn::TextureDimension::e2D, kColorFormat2, kSize, kSize, kArrayLayers,
kLevelCount); kLevelCount);
dawn::TextureView resolveTextureView = resolveTexture.CreateDefaultView(); dawn::TextureView resolveTextureView = resolveTexture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass(); utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass();
renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView; renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView;
@ -563,7 +563,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, ColorAttachmentResolveTar
firstMipLevelDescriptor.baseMipLevel = 0; firstMipLevelDescriptor.baseMipLevel = 0;
dawn::TextureView resolveTextureView = dawn::TextureView resolveTextureView =
resolveTexture.CreateView(&firstMipLevelDescriptor); resolveTexture.CreateTextureView(&firstMipLevelDescriptor);
utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass(); utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass();
renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView; renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView;
@ -575,7 +575,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, ColorAttachmentResolveTar
secondMipLevelDescriptor.baseMipLevel = 1; secondMipLevelDescriptor.baseMipLevel = 1;
dawn::TextureView resolveTextureView = dawn::TextureView resolveTextureView =
resolveTexture.CreateView(&secondMipLevelDescriptor); resolveTexture.CreateTextureView(&secondMipLevelDescriptor);
utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass(); utils::ComboRenderPassDescriptor renderPass = CreateMultisampledRenderPass();
renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView; renderPass.cColorAttachmentsInfoPtr[0]->resolveTarget = resolveTextureView;
@ -590,7 +590,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, DepthStencilAttachmentSam
device, dawn::TextureDimension::e2D, kDepthStencilFormat, kSize, kSize, kArrayLayers, device, dawn::TextureDimension::e2D, kDepthStencilFormat, kSize, kSize, kArrayLayers,
kLevelCount, kSampleCount); kLevelCount, kSampleCount);
dawn::TextureView multisampledDepthStencilTextureView = dawn::TextureView multisampledDepthStencilTextureView =
multisampledDepthStencilTexture.CreateDefaultView(); multisampledDepthStencilTexture.CreateDefaultTextureView();
// It is not allowed to use a depth stencil attachment whose sample count is different from the // It is not allowed to use a depth stencil attachment whose sample count is different from the
// one of the color attachment. // one of the color attachment.
@ -598,7 +598,7 @@ TEST_F(MultisampledRenderPassDescriptorValidationTest, DepthStencilAttachmentSam
dawn::Texture depthStencilTexture = CreateTexture( dawn::Texture depthStencilTexture = CreateTexture(
device, dawn::TextureDimension::e2D, kDepthStencilFormat, kSize, kSize, kArrayLayers, device, dawn::TextureDimension::e2D, kDepthStencilFormat, kSize, kSize, kArrayLayers,
kLevelCount); kLevelCount);
dawn::TextureView depthStencilTextureView = depthStencilTexture.CreateDefaultView(); dawn::TextureView depthStencilTextureView = depthStencilTexture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPass( utils::ComboRenderPassDescriptor renderPass(
{CreateMultisampledColorTextureView()}, depthStencilTextureView); {CreateMultisampledColorTextureView()}, depthStencilTextureView);

View File

@ -143,7 +143,7 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
textureDescriptor.sampleCount = kMultisampledCount; textureDescriptor.sampleCount = kMultisampledCount;
dawn::Texture multisampledColorTexture = device.CreateTexture(&textureDescriptor); dawn::Texture multisampledColorTexture = device.CreateTexture(&textureDescriptor);
utils::ComboRenderPassDescriptor renderPassDescriptor( utils::ComboRenderPassDescriptor renderPassDescriptor(
{multisampledColorTexture.CreateDefaultView()}); {multisampledColorTexture.CreateDefaultTextureView()});
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();
dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor); dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor);
@ -160,7 +160,7 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
dawn::Texture multisampledDepthStencilTexture = dawn::Texture multisampledDepthStencilTexture =
device.CreateTexture(&textureDescriptor); device.CreateTexture(&textureDescriptor);
utils::ComboRenderPassDescriptor renderPassDescriptor( utils::ComboRenderPassDescriptor renderPassDescriptor(
{}, multisampledDepthStencilTexture.CreateDefaultView()); {}, multisampledDepthStencilTexture.CreateDefaultTextureView());
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();
dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor); dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor);
@ -179,7 +179,7 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
textureDescriptor.sampleCount = kMultisampledCount; textureDescriptor.sampleCount = kMultisampledCount;
dawn::Texture multisampledColorTexture = device.CreateTexture(&textureDescriptor); dawn::Texture multisampledColorTexture = device.CreateTexture(&textureDescriptor);
utils::ComboRenderPassDescriptor renderPassDescriptor( utils::ComboRenderPassDescriptor renderPassDescriptor(
{multisampledColorTexture.CreateDefaultView()}); {multisampledColorTexture.CreateDefaultTextureView()});
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();
dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor); dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor);
@ -196,7 +196,7 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
dawn::Texture multisampledDepthStencilTexture = dawn::Texture multisampledDepthStencilTexture =
device.CreateTexture(&textureDescriptor); device.CreateTexture(&textureDescriptor);
utils::ComboRenderPassDescriptor renderPassDescriptor( utils::ComboRenderPassDescriptor renderPassDescriptor(
{}, multisampledDepthStencilTexture.CreateDefaultView()); {}, multisampledDepthStencilTexture.CreateDefaultTextureView());
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();
dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor); dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor);
@ -215,7 +215,7 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
textureDescriptor.sampleCount = 1; textureDescriptor.sampleCount = 1;
dawn::Texture nonMultisampledColorTexture = device.CreateTexture(&textureDescriptor); dawn::Texture nonMultisampledColorTexture = device.CreateTexture(&textureDescriptor);
utils::ComboRenderPassDescriptor nonMultisampledRenderPassDescriptor( utils::ComboRenderPassDescriptor nonMultisampledRenderPassDescriptor(
{ nonMultisampledColorTexture.CreateDefaultView() }); { nonMultisampledColorTexture.CreateDefaultTextureView() });
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();
dawn::RenderPassEncoder renderPass = dawn::RenderPassEncoder renderPass =
@ -233,7 +233,7 @@ TEST_F(RenderPipelineValidationTest, SampleCountCompatibilityWithRenderPass) {
dawn::Texture multisampledDepthStencilTexture = dawn::Texture multisampledDepthStencilTexture =
device.CreateTexture(&textureDescriptor); device.CreateTexture(&textureDescriptor);
utils::ComboRenderPassDescriptor renderPassDescriptor( utils::ComboRenderPassDescriptor renderPassDescriptor(
{}, multisampledDepthStencilTexture.CreateDefaultView()); {}, multisampledDepthStencilTexture.CreateDefaultTextureView());
dawn::CommandEncoder encoder = device.CreateCommandEncoder(); dawn::CommandEncoder encoder = device.CreateCommandEncoder();
dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor); dawn::RenderPassEncoder renderPass = encoder.BeginRenderPass(&renderPassDescriptor);

View File

@ -115,7 +115,7 @@ TEST_F(TextureValidationTest, DestroyDestroyedTexture) {
TEST_F(TextureValidationTest, DestroyEncodeSubmit) { TEST_F(TextureValidationTest, DestroyEncodeSubmit) {
dawn::TextureDescriptor descriptor = CreateDefaultTextureDescriptor(); dawn::TextureDescriptor descriptor = CreateDefaultTextureDescriptor();
dawn::Texture texture = device.CreateTexture(&descriptor); dawn::Texture texture = device.CreateTexture(&descriptor);
dawn::TextureView textureView = texture.CreateDefaultView(); dawn::TextureView textureView = texture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPass({textureView}); utils::ComboRenderPassDescriptor renderPass({textureView});
@ -138,7 +138,7 @@ TEST_F(TextureValidationTest, DestroyEncodeSubmit) {
TEST_F(TextureValidationTest, EncodeDestroySubmit) { TEST_F(TextureValidationTest, EncodeDestroySubmit) {
dawn::TextureDescriptor descriptor = CreateDefaultTextureDescriptor(); dawn::TextureDescriptor descriptor = CreateDefaultTextureDescriptor();
dawn::Texture texture = device.CreateTexture(&descriptor); dawn::Texture texture = device.CreateTexture(&descriptor);
dawn::TextureView textureView = texture.CreateDefaultView(); dawn::TextureView textureView = texture.CreateDefaultTextureView();
utils::ComboRenderPassDescriptor renderPass({textureView}); utils::ComboRenderPassDescriptor renderPass({textureView});

View File

@ -44,7 +44,7 @@ dawn::Texture Create2DArrayTexture(dawn::Device& device,
return device.CreateTexture(&descriptor); return device.CreateTexture(&descriptor);
} }
dawn::TextureViewDescriptor CreateDefaultViewDescriptor(dawn::TextureViewDimension dimension) { dawn::TextureViewDescriptor CreateDefaultTextureViewDescriptor(dawn::TextureViewDimension dimension) {
dawn::TextureViewDescriptor descriptor; dawn::TextureViewDescriptor descriptor;
descriptor.format = kDefaultTextureFormat; descriptor.format = kDefaultTextureFormat;
descriptor.dimension = dimension; descriptor.dimension = dimension;
@ -60,13 +60,13 @@ TEST_F(TextureViewValidationTest, CreateTextureViewOnTexture2D) {
dawn::Texture texture = Create2DArrayTexture(device, 1); dawn::Texture texture = Create2DArrayTexture(device, 1);
dawn::TextureViewDescriptor base2DTextureViewDescriptor = dawn::TextureViewDescriptor base2DTextureViewDescriptor =
CreateDefaultViewDescriptor(dawn::TextureViewDimension::e2D); CreateDefaultTextureViewDescriptor(dawn::TextureViewDimension::e2D);
// It is OK to create a 2D texture view on a 2D texture. // It is OK to create a 2D texture view on a 2D texture.
{ {
dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor;
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
texture.CreateView(&descriptor); texture.CreateTextureView(&descriptor);
} }
// It is an error to specify the layer count of the texture view > 1 when texture view dimension // It is an error to specify the layer count of the texture view > 1 when texture view dimension
@ -74,7 +74,7 @@ TEST_F(TextureViewValidationTest, CreateTextureViewOnTexture2D) {
{ {
dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor;
descriptor.arrayLayerCount = 2; descriptor.arrayLayerCount = 2;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
// It is OK to create a 1-layer 2D array texture view on a 2D texture. // It is OK to create a 1-layer 2D array texture view on a 2D texture.
@ -82,14 +82,14 @@ TEST_F(TextureViewValidationTest, CreateTextureViewOnTexture2D) {
dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor;
descriptor.dimension = dawn::TextureViewDimension::e2DArray; descriptor.dimension = dawn::TextureViewDimension::e2DArray;
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
texture.CreateView(&descriptor); texture.CreateTextureView(&descriptor);
} }
// It is an error to specify mipLevelCount == 0. // It is an error to specify mipLevelCount == 0.
{ {
dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor;
descriptor.mipLevelCount = 0; descriptor.mipLevelCount = 0;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
// It is an error to make the mip level out of range. // It is an error to make the mip level out of range.
@ -97,7 +97,7 @@ TEST_F(TextureViewValidationTest, CreateTextureViewOnTexture2D) {
dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor;
descriptor.baseMipLevel = kDefaultMipLevels - 1; descriptor.baseMipLevel = kDefaultMipLevels - 1;
descriptor.mipLevelCount = 2; descriptor.mipLevelCount = 2;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
} }
@ -108,35 +108,35 @@ TEST_F(TextureViewValidationTest, CreateTextureViewOnTexture2DArray) {
dawn::Texture texture = Create2DArrayTexture(device, kDefaultArrayLayers); dawn::Texture texture = Create2DArrayTexture(device, kDefaultArrayLayers);
dawn::TextureViewDescriptor base2DArrayTextureViewDescriptor = dawn::TextureViewDescriptor base2DArrayTextureViewDescriptor =
CreateDefaultViewDescriptor(dawn::TextureViewDimension::e2DArray); CreateDefaultTextureViewDescriptor(dawn::TextureViewDimension::e2DArray);
// It is OK to create a 2D texture view on a 2D array texture. // It is OK to create a 2D texture view on a 2D array texture.
{ {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.dimension = dawn::TextureViewDimension::e2D; descriptor.dimension = dawn::TextureViewDimension::e2D;
descriptor.arrayLayerCount = 1; descriptor.arrayLayerCount = 1;
texture.CreateView(&descriptor); texture.CreateTextureView(&descriptor);
} }
// It is OK to create a 2D array texture view on a 2D array texture. // It is OK to create a 2D array texture view on a 2D array texture.
{ {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.arrayLayerCount = kDefaultArrayLayers; descriptor.arrayLayerCount = kDefaultArrayLayers;
texture.CreateView(&descriptor); texture.CreateTextureView(&descriptor);
} }
// It is an error to specify arrayLayerCount == 0. // It is an error to specify arrayLayerCount == 0.
{ {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.arrayLayerCount = 0; descriptor.arrayLayerCount = 0;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
// It is an error to make the array layer out of range. // It is an error to make the array layer out of range.
{ {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.arrayLayerCount = kDefaultArrayLayers + 1; descriptor.arrayLayerCount = kDefaultArrayLayers + 1;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
} }
@ -147,14 +147,14 @@ TEST_F(TextureViewValidationTest, CreateCubeMapTextureView) {
dawn::Texture texture = Create2DArrayTexture(device, kDefaultArrayLayers); dawn::Texture texture = Create2DArrayTexture(device, kDefaultArrayLayers);
dawn::TextureViewDescriptor base2DArrayTextureViewDescriptor = dawn::TextureViewDescriptor base2DArrayTextureViewDescriptor =
CreateDefaultViewDescriptor(dawn::TextureViewDimension::e2DArray); CreateDefaultTextureViewDescriptor(dawn::TextureViewDimension::e2DArray);
// It is OK to create a cube map texture view with arrayLayerCount == 6. // It is OK to create a cube map texture view with arrayLayerCount == 6.
{ {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.dimension = dawn::TextureViewDimension::Cube; descriptor.dimension = dawn::TextureViewDimension::Cube;
descriptor.arrayLayerCount = 6; descriptor.arrayLayerCount = 6;
texture.CreateView(&descriptor); texture.CreateTextureView(&descriptor);
} }
// It is an error to create a cube map texture view with arrayLayerCount != 6. // It is an error to create a cube map texture view with arrayLayerCount != 6.
@ -162,7 +162,7 @@ TEST_F(TextureViewValidationTest, CreateCubeMapTextureView) {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.dimension = dawn::TextureViewDimension::Cube; descriptor.dimension = dawn::TextureViewDimension::Cube;
descriptor.arrayLayerCount = 3; descriptor.arrayLayerCount = 3;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
// It is OK to create a cube map array texture view with arrayLayerCount % 6 == 0. // It is OK to create a cube map array texture view with arrayLayerCount % 6 == 0.
@ -170,7 +170,7 @@ TEST_F(TextureViewValidationTest, CreateCubeMapTextureView) {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.dimension = dawn::TextureViewDimension::CubeArray; descriptor.dimension = dawn::TextureViewDimension::CubeArray;
descriptor.arrayLayerCount = 12; descriptor.arrayLayerCount = 12;
texture.CreateView(&descriptor); texture.CreateTextureView(&descriptor);
} }
// It is an error to create a cube map array texture view with arrayLayerCount % 6 != 0. // It is an error to create a cube map array texture view with arrayLayerCount % 6 != 0.
@ -178,7 +178,7 @@ TEST_F(TextureViewValidationTest, CreateCubeMapTextureView) {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.dimension = dawn::TextureViewDimension::CubeArray; descriptor.dimension = dawn::TextureViewDimension::CubeArray;
descriptor.arrayLayerCount = 11; descriptor.arrayLayerCount = 11;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
// It is an error to create a cube map texture view with width != height. // It is an error to create a cube map texture view with width != height.
@ -188,7 +188,7 @@ TEST_F(TextureViewValidationTest, CreateCubeMapTextureView) {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.dimension = dawn::TextureViewDimension::Cube; descriptor.dimension = dawn::TextureViewDimension::Cube;
descriptor.arrayLayerCount = 6; descriptor.arrayLayerCount = 6;
ASSERT_DEVICE_ERROR(nonSquareTexture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(nonSquareTexture.CreateTextureView(&descriptor));
} }
// It is an error to create a cube map array texture view with width != height. // It is an error to create a cube map array texture view with width != height.
@ -198,7 +198,7 @@ TEST_F(TextureViewValidationTest, CreateCubeMapTextureView) {
dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DArrayTextureViewDescriptor;
descriptor.dimension = dawn::TextureViewDimension::CubeArray; descriptor.dimension = dawn::TextureViewDimension::CubeArray;
descriptor.arrayLayerCount = 12; descriptor.arrayLayerCount = 12;
ASSERT_DEVICE_ERROR(nonSquareTexture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(nonSquareTexture.CreateTextureView(&descriptor));
} }
} }
@ -208,13 +208,13 @@ TEST_F(TextureViewValidationTest, TextureViewFormatCompatibility) {
dawn::Texture texture = Create2DArrayTexture(device, 1); dawn::Texture texture = Create2DArrayTexture(device, 1);
dawn::TextureViewDescriptor base2DTextureViewDescriptor = dawn::TextureViewDescriptor base2DTextureViewDescriptor =
CreateDefaultViewDescriptor(dawn::TextureViewDimension::e2D); CreateDefaultTextureViewDescriptor(dawn::TextureViewDimension::e2D);
// It is an error to create a texture view in depth-stencil format on a RGBA texture. // It is an error to create a texture view in depth-stencil format on a RGBA texture.
{ {
dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor; dawn::TextureViewDescriptor descriptor = base2DTextureViewDescriptor;
descriptor.format = dawn::TextureFormat::D32FloatS8Uint; descriptor.format = dawn::TextureFormat::D32FloatS8Uint;
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
} }
@ -222,8 +222,8 @@ TEST_F(TextureViewValidationTest, TextureViewFormatCompatibility) {
TEST_F(TextureViewValidationTest, DestroyCreateTextureView) { TEST_F(TextureViewValidationTest, DestroyCreateTextureView) {
dawn::Texture texture = Create2DArrayTexture(device, 1); dawn::Texture texture = Create2DArrayTexture(device, 1);
dawn::TextureViewDescriptor descriptor = dawn::TextureViewDescriptor descriptor =
CreateDefaultViewDescriptor(dawn::TextureViewDimension::e2D); CreateDefaultTextureViewDescriptor(dawn::TextureViewDimension::e2D);
texture.Destroy(); texture.Destroy();
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor)); ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
} }
} }

View File

@ -93,7 +93,7 @@ ValidationTest::DummyRenderPass::DummyRenderPass(const dawn::Device& device)
descriptor.usage = dawn::TextureUsageBit::OutputAttachment; descriptor.usage = dawn::TextureUsageBit::OutputAttachment;
attachment = device.CreateTexture(&descriptor); attachment = device.CreateTexture(&descriptor);
dawn::TextureView view = attachment.CreateDefaultView(); dawn::TextureView view = attachment.CreateDefaultTextureView();
mColorAttachment.attachment = view; mColorAttachment.attachment = view;
mColorAttachment.resolveTarget = nullptr; mColorAttachment.resolveTarget = nullptr;
mColorAttachment.clearColor = { 0.0f, 0.0f, 0.0f, 0.0f }; mColorAttachment.clearColor = { 0.0f, 0.0f, 0.0f, 0.0f };

View File

@ -36,9 +36,9 @@ TEST_F(WireInjectTextureTests, CallAfterReserveInject) {
EXPECT_CALL(api, TextureReference(apiTexture)); EXPECT_CALL(api, TextureReference(apiTexture));
ASSERT_TRUE(GetWireServer()->InjectTexture(apiTexture, reservation.id, reservation.generation)); ASSERT_TRUE(GetWireServer()->InjectTexture(apiTexture, reservation.id, reservation.generation));
dawnTextureCreateDefaultView(reservation.texture); dawnTextureCreateDefaultTextureView(reservation.texture);
DawnTextureView apiDummyView = api.GetNewTextureView(); DawnTextureView apiDummyView = api.GetNewTextureView();
EXPECT_CALL(api, TextureCreateDefaultView(apiTexture)).WillOnce(Return(apiDummyView)); EXPECT_CALL(api, TextureCreateDefaultTextureView(apiTexture)).WillOnce(Return(apiDummyView));
FlushClient(); FlushClient();
} }

View File

@ -207,7 +207,7 @@ namespace utils {
height(texHeight), height(texHeight),
color(colorAttachment), color(colorAttachment),
colorFormat(textureFormat), colorFormat(textureFormat),
renderPassInfo({colorAttachment.CreateDefaultView()}) { renderPassInfo({colorAttachment.CreateDefaultTextureView()}) {
} }
BasicRenderPass CreateBasicRenderPass(const dawn::Device& device, BasicRenderPass CreateBasicRenderPass(const dawn::Device& device,