2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "test-graphics-controller.h"
19 #include "test-graphics-buffer.h"
20 #include "test-graphics-command-buffer.h"
21 #include "test-graphics-sampler.h"
22 #include "test-graphics-texture.h"
24 #include <dali/integration-api/gl-defines.h>
32 T* Uncast(const Graphics::CommandBuffer* object)
34 return const_cast<T*>(static_cast<const T*>(object));
38 T* Uncast(const Graphics::Texture* object)
40 return const_cast<T*>(static_cast<const T*>(object));
44 T* Uncast(const Graphics::Sampler* object)
46 return const_cast<T*>(static_cast<const T*>(object));
50 T* Uncast(const Graphics::Buffer* object)
52 return const_cast<T*>(static_cast<const T*>(object));
55 std::ostream& operator<<(std::ostream& o, const Graphics::BufferCreateInfo& bufferCreateInfo)
57 return o << "usage:" << std::hex << bufferCreateInfo.usage << ", size:" << std::dec << bufferCreateInfo.size;
60 std::ostream& operator<<(std::ostream& o, const Graphics::CommandBufferCreateInfo& commandBufferCreateInfo)
62 return o << "level:" << (commandBufferCreateInfo.level == Graphics::CommandBufferLevel::PRIMARY ? "PRIMARY" : "SECONDARY")
63 << ", fixedCapacity:" << std::dec << commandBufferCreateInfo.fixedCapacity;
66 std::ostream& operator<<(std::ostream& o, const Graphics::TextureType& textureType)
70 case Graphics::TextureType::TEXTURE_2D:
73 case Graphics::TextureType::TEXTURE_3D:
76 case Graphics::TextureType::TEXTURE_CUBEMAP:
77 o << "TEXTURE_CUBEMAP";
83 std::ostream& operator<<(std::ostream& o, const Graphics::Extent2D extent)
85 o << "width:" << extent.width << ", height:" << extent.height;
89 std::ostream& operator<<(std::ostream& o, const Graphics::TextureCreateInfo& createInfo)
91 o << "textureType:" << createInfo.textureType
92 << " size:" << createInfo.size
93 << " format:" << static_cast<uint32_t>(createInfo.format)
94 << " mipMapFlag:" << createInfo.mipMapFlag
95 << " layout:" << (createInfo.layout == Graphics::TextureLayout::LINEAR ? "LINEAR" : "OPTIMAL")
96 << " usageFlags:" << std::hex << createInfo.usageFlags
97 << " data:" << std::hex << createInfo.data
98 << " dataSize:" << std::dec << createInfo.dataSize
99 << " nativeImagePtr:" << std::hex << createInfo.nativeImagePtr;
103 std::ostream& operator<<(std::ostream& o, Graphics::SamplerAddressMode addressMode)
107 case Graphics::SamplerAddressMode::REPEAT:
110 case Graphics::SamplerAddressMode::MIRRORED_REPEAT:
111 o << "MIRRORED_REPEAT";
113 case Graphics::SamplerAddressMode::CLAMP_TO_EDGE:
114 o << "CLAMP_TO_EDGE";
116 case Graphics::SamplerAddressMode::CLAMP_TO_BORDER:
117 o << "CLAMP_TO_BORDER";
119 case Graphics::SamplerAddressMode::MIRROR_CLAMP_TO_EDGE:
120 o << "MIRROR_CLAMP_TO_EDGE";
126 std::ostream& operator<<(std::ostream& o, Graphics::SamplerFilter filterMode)
130 case Graphics::SamplerFilter::LINEAR:
133 case Graphics::SamplerFilter::NEAREST:
140 std::ostream& operator<<(std::ostream& o, Graphics::SamplerMipmapMode mipmapMode)
144 case Graphics::SamplerMipmapMode::NONE:
147 case Graphics::SamplerMipmapMode::LINEAR:
150 case Graphics::SamplerMipmapMode::NEAREST:
157 std::ostream& operator<<(std::ostream& o, const Graphics::SamplerCreateInfo& createInfo)
159 o << "minFilter:" << createInfo.minFilter
160 << " magFilter:" << createInfo.magFilter
161 << " wrapModeU:" << createInfo.addressModeU
162 << " wrapModeV:" << createInfo.addressModeV
163 << " wrapModeW:" << createInfo.addressModeW
164 << " mipMapMode:" << createInfo.mipMapMode;
168 class TestGraphicsMemory : public Graphics::Memory
171 TestGraphicsMemory(TraceCallStack& callStack, TestGraphicsBuffer& buffer, uint32_t mappedOffset, uint32_t mappedSize)
172 : mCallStack(callStack),
174 mMappedOffset(mappedOffset),
175 mMappedSize(mappedSize)
179 void* LockRegion(uint32_t offset, uint32_t size) override
181 std::ostringstream o;
182 o << offset << ", " << size;
183 mCallStack.PushCall("Memory::LockRegion", o.str());
185 if(offset > mMappedOffset + mMappedSize ||
186 size + offset > mMappedOffset + mMappedSize)
188 fprintf(stderr, "TestGraphics.Memory::LockRegion() Out of bounds");
189 mBuffer.memory.resize(mMappedOffset + offset + size); // Grow to prevent memcpy from crashing
191 mLockedOffset = offset;
193 return &mBuffer.memory[mMappedOffset + offset];
196 void Unlock(bool flush) override
198 mCallStack.PushCall("Memory::Unlock", (flush ? "Flush" : "NoFlush"));
205 void Flush() override
207 mCallStack.PushCall("Memory::Flush", "");
209 mBuffer.Upload(mMappedOffset + mLockedOffset, mLockedSize);
213 TraceCallStack& mCallStack;
214 TestGraphicsBuffer& mBuffer;
215 uint32_t mMappedOffset;
216 uint32_t mMappedSize;
217 uint32_t mLockedOffset;
218 uint32_t mLockedSize;
221 TestGraphicsController::TestGraphicsController()
222 : mCallStack(true, "TestGraphicsController."),
223 mCommandBufferCallStack(true, "TestCommandBuffer.")
225 mCallStack.Enable(true);
226 mCommandBufferCallStack.Enable(true);
227 auto& trace = mGl.GetTextureTrace();
229 trace.EnableLogging(true);
232 int GetNumComponents(Graphics::VertexInputFormat vertexFormat)
236 case Graphics::VertexInputFormat::UNDEFINED:
237 case Graphics::VertexInputFormat::FLOAT:
238 case Graphics::VertexInputFormat::INTEGER:
240 case Graphics::VertexInputFormat::IVECTOR2:
241 case Graphics::VertexInputFormat::FVECTOR2:
243 case Graphics::VertexInputFormat::IVECTOR3:
244 case Graphics::VertexInputFormat::FVECTOR3:
246 case Graphics::VertexInputFormat::FVECTOR4:
247 case Graphics::VertexInputFormat::IVECTOR4:
253 GLint GetSize(Graphics::VertexInputFormat vertexFormat)
257 case Graphics::VertexInputFormat::UNDEFINED:
259 case Graphics::VertexInputFormat::INTEGER:
260 case Graphics::VertexInputFormat::IVECTOR2:
261 case Graphics::VertexInputFormat::IVECTOR3:
262 case Graphics::VertexInputFormat::IVECTOR4:
264 case Graphics::VertexInputFormat::FLOAT:
265 case Graphics::VertexInputFormat::FVECTOR2:
266 case Graphics::VertexInputFormat::FVECTOR3:
267 case Graphics::VertexInputFormat::FVECTOR4:
273 GLint GetGlType(Graphics::VertexInputFormat vertexFormat)
277 case Graphics::VertexInputFormat::UNDEFINED:
279 case Graphics::VertexInputFormat::INTEGER:
280 case Graphics::VertexInputFormat::IVECTOR2:
281 case Graphics::VertexInputFormat::IVECTOR3:
282 case Graphics::VertexInputFormat::IVECTOR4:
284 case Graphics::VertexInputFormat::FLOAT:
285 case Graphics::VertexInputFormat::FVECTOR2:
286 case Graphics::VertexInputFormat::FVECTOR3:
287 case Graphics::VertexInputFormat::FVECTOR4:
293 GLenum GetTopology(Graphics::PrimitiveTopology topology)
297 case Graphics::PrimitiveTopology::POINT_LIST:
300 case Graphics::PrimitiveTopology::LINE_LIST:
303 case Graphics::PrimitiveTopology::LINE_LOOP:
306 case Graphics::PrimitiveTopology::LINE_STRIP:
307 return GL_LINE_STRIP;
309 case Graphics::PrimitiveTopology::TRIANGLE_LIST:
312 case Graphics::PrimitiveTopology::TRIANGLE_STRIP:
313 return GL_TRIANGLE_STRIP;
315 case Graphics::PrimitiveTopology::TRIANGLE_FAN:
316 return GL_TRIANGLE_FAN;
321 GLenum GetCullFace(Graphics::CullMode cullMode)
325 case Graphics::CullMode::NONE:
327 case Graphics::CullMode::FRONT:
329 case Graphics::CullMode::BACK:
331 case Graphics::CullMode::FRONT_AND_BACK:
332 return GL_FRONT_AND_BACK;
337 GLenum GetFrontFace(Graphics::FrontFace frontFace)
339 if(frontFace == Graphics::FrontFace::CLOCKWISE)
346 GLenum GetBlendFactor(Graphics::BlendFactor blendFactor)
348 GLenum glFactor = GL_ZERO;
352 case Graphics::BlendFactor::ZERO:
355 case Graphics::BlendFactor::ONE:
358 case Graphics::BlendFactor::SRC_COLOR:
359 glFactor = GL_SRC_COLOR;
361 case Graphics::BlendFactor::ONE_MINUS_SRC_COLOR:
362 glFactor = GL_ONE_MINUS_SRC_COLOR;
364 case Graphics::BlendFactor::DST_COLOR:
365 glFactor = GL_DST_COLOR;
367 case Graphics::BlendFactor::ONE_MINUS_DST_COLOR:
368 glFactor = GL_ONE_MINUS_DST_COLOR;
370 case Graphics::BlendFactor::SRC_ALPHA:
371 glFactor = GL_SRC_ALPHA;
373 case Graphics::BlendFactor::ONE_MINUS_SRC_ALPHA:
374 glFactor = GL_ONE_MINUS_SRC_ALPHA;
376 case Graphics::BlendFactor::DST_ALPHA:
377 glFactor = GL_DST_ALPHA;
379 case Graphics::BlendFactor::ONE_MINUS_DST_ALPHA:
380 glFactor = GL_ONE_MINUS_DST_ALPHA;
382 case Graphics::BlendFactor::CONSTANT_COLOR:
383 glFactor = GL_CONSTANT_COLOR;
385 case Graphics::BlendFactor::ONE_MINUS_CONSTANT_COLOR:
386 glFactor = GL_ONE_MINUS_CONSTANT_COLOR;
388 case Graphics::BlendFactor::CONSTANT_ALPHA:
389 glFactor = GL_CONSTANT_ALPHA;
391 case Graphics::BlendFactor::ONE_MINUS_CONSTANT_ALPHA:
392 glFactor = GL_ONE_MINUS_CONSTANT_ALPHA;
394 case Graphics::BlendFactor::SRC_ALPHA_SATURATE:
395 glFactor = GL_SRC_ALPHA_SATURATE;
397 // GLES doesn't appear to have dual source blending.
398 case Graphics::BlendFactor::SRC1_COLOR:
399 glFactor = GL_SRC_COLOR;
401 case Graphics::BlendFactor::ONE_MINUS_SRC1_COLOR:
402 glFactor = GL_ONE_MINUS_SRC_COLOR;
404 case Graphics::BlendFactor::SRC1_ALPHA:
405 glFactor = GL_SRC_ALPHA;
407 case Graphics::BlendFactor::ONE_MINUS_SRC1_ALPHA:
408 glFactor = GL_ONE_MINUS_SRC_ALPHA;
414 GLenum GetBlendOp(Graphics::BlendOp blendOp)
416 GLenum op = GL_FUNC_ADD;
419 case Graphics::BlendOp::ADD:
422 case Graphics::BlendOp::SUBTRACT:
423 op = GL_FUNC_SUBTRACT;
425 case Graphics::BlendOp::REVERSE_SUBTRACT:
426 op = GL_FUNC_REVERSE_SUBTRACT;
428 case Graphics::BlendOp::MIN:
431 case Graphics::BlendOp::MAX:
435 // @todo Add advanced blend equations
440 void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& submitInfo)
442 TraceCallStack::NamedParams namedParams;
443 namedParams["submitInfo"] << "cmdBuffer[" << submitInfo.cmdBuffer.size()
444 << "], flags:" << std::hex << submitInfo.flags;
446 mCallStack.PushCall("Controller::SubmitCommandBuffers", "", namedParams);
448 for(auto& graphicsCommandBuffer : submitInfo.cmdBuffer)
450 auto commandBuffer = Uncast<TestGraphicsCommandBuffer>(graphicsCommandBuffer);
451 for(auto& binding : commandBuffer->mTextureBindings)
455 auto texture = Uncast<TestGraphicsTexture>(binding.texture);
457 texture->Bind(binding.binding);
461 auto sampler = Uncast<TestGraphicsSampler>(binding.sampler);
464 sampler->Apply(texture->GetTarget());
468 texture->Prepare(); // Ensure native texture is ready
472 // IndexBuffer binding,
473 auto& indexBufferBinding = commandBuffer->mIndexBufferBinding;
474 if(indexBufferBinding.buffer)
476 auto buffer = Uncast<TestGraphicsBuffer>(indexBufferBinding.buffer);
480 // VertexBuffer binding,
481 for(auto graphicsBuffer : commandBuffer->mVertexBufferBindings.buffers)
483 auto vertexBuffer = Uncast<TestGraphicsBuffer>(graphicsBuffer);
484 vertexBuffer->Bind();
487 // Pipeline attribute setup
488 auto& vi = commandBuffer->mPipeline->vertexInputState;
489 for(auto& attribute : vi.attributes)
491 mGl.EnableVertexAttribArray(attribute.location);
492 uint32_t attributeOffset = attribute.offset;
493 GLsizei stride = vi.bufferBindings[attribute.binding].stride;
495 mGl.VertexAttribPointer(attribute.location,
496 GetNumComponents(attribute.format),
497 GetGlType(attribute.format),
498 GL_FALSE, // Not normalized
500 reinterpret_cast<void*>(attributeOffset));
504 auto& rasterizationState = commandBuffer->mPipeline->rasterizationState;
505 if(rasterizationState.cullMode == Graphics::CullMode::NONE)
507 mGl.Disable(GL_CULL_FACE);
511 mGl.Enable(GL_CULL_FACE);
512 mGl.CullFace(GetCullFace(rasterizationState.cullMode));
515 mGl.FrontFace(GetFrontFace(rasterizationState.frontFace));
516 // We don't modify glPolygonMode in our context/abstraction from GL_FILL (the GL default),
517 // so it isn't present in the API (and won't have any tests!)
520 auto& colorBlendState = commandBuffer->mPipeline->colorBlendState;
521 if(colorBlendState.blendEnable)
523 mGl.Enable(GL_BLEND);
525 mGl.BlendFuncSeparate(GetBlendFactor(colorBlendState.srcColorBlendFactor),
526 GetBlendFactor(colorBlendState.dstColorBlendFactor),
527 GetBlendFactor(colorBlendState.srcAlphaBlendFactor),
528 GetBlendFactor(colorBlendState.dstAlphaBlendFactor));
529 if(colorBlendState.colorBlendOp != colorBlendState.alphaBlendOp)
531 mGl.BlendEquationSeparate(GetBlendOp(colorBlendState.colorBlendOp), GetBlendOp(colorBlendState.alphaBlendOp));
535 mGl.BlendEquation(GetBlendOp(colorBlendState.colorBlendOp));
537 mGl.BlendColor(colorBlendState.blendConstants[0],
538 colorBlendState.blendConstants[1],
539 colorBlendState.blendConstants[2],
540 colorBlendState.blendConstants[3]);
544 mGl.Disable(GL_BLEND);
548 auto topology = commandBuffer->mPipeline->inputAssemblyState.topology;
550 if(commandBuffer->drawCommand.drawType == TestGraphicsCommandBuffer::Draw::DrawType::Indexed)
552 mGl.DrawElements(GetTopology(topology),
553 static_cast<GLsizei>(commandBuffer->drawCommand.u.indexedDraw.indexCount),
555 reinterpret_cast<void*>(commandBuffer->drawCommand.u.indexedDraw.firstIndex));
559 mGl.DrawArrays(GetTopology(topology), 0, commandBuffer->drawCommand.u.unindexedDraw.vertexCount);
563 for(auto& attribute : vi.attributes)
565 mGl.DisableVertexAttribArray(attribute.location);
571 * @brief Presents render target
572 * @param renderTarget render target to present
574 void TestGraphicsController::PresentRenderTarget(Graphics::RenderTarget* renderTarget)
576 TraceCallStack::NamedParams namedParams;
577 namedParams["renderTarget"] << std::hex << renderTarget;
578 mCallStack.PushCall("Controller::PresentRenderTarget", "", namedParams);
582 * @brief Waits until the GPU is idle
584 void TestGraphicsController::WaitIdle()
586 mCallStack.PushCall("Controller::WaitIdle", "");
590 * @brief Lifecycle pause event
592 void TestGraphicsController::Pause()
594 mCallStack.PushCall("Controller::Pause", "");
598 * @brief Lifecycle resume event
600 void TestGraphicsController::Resume()
602 mCallStack.PushCall("Controller::Resume", "");
605 void TestGraphicsController::UpdateTextures(const std::vector<Graphics::TextureUpdateInfo>& updateInfoList,
606 const std::vector<Graphics::TextureUpdateSourceInfo>& sourceList)
608 TraceCallStack::NamedParams namedParams;
609 namedParams["updateInfoList"] << "[" << updateInfoList.size() << "]:";
610 namedParams["sourceList"] << "[" << sourceList.size() << "]:";
612 mCallStack.PushCall("Controller::UpdateTextures", "", namedParams);
614 // Call either TexImage2D or TexSubImage2D
615 for(unsigned int i = 0; i < updateInfoList.size(); ++i)
617 auto& updateInfo = updateInfoList[i];
618 auto& source = sourceList[i];
620 auto texture = static_cast<TestGraphicsTexture*>(updateInfo.dstTexture);
621 texture->Bind(0); // Use first texture unit during resource update
622 texture->Update(updateInfo, source);
626 bool TestGraphicsController::EnableDepthStencilBuffer(bool enableDepth, bool enableStencil)
628 TraceCallStack::NamedParams namedParams;
629 namedParams["enableDepth"] << (enableDepth ? "T" : "F");
630 namedParams["enableStencil"] << (enableStencil ? "T" : "F");
631 mCallStack.PushCall("Controller::EnableDepthStencilBuffer", "", namedParams);
635 void TestGraphicsController::RunGarbageCollector(size_t numberOfDiscardedRenderers)
637 TraceCallStack::NamedParams namedParams;
638 namedParams["numberOfDiscardedRenderers"] << numberOfDiscardedRenderers;
639 mCallStack.PushCall("Controller::RunGarbageCollector", "", namedParams);
642 void TestGraphicsController::DiscardUnusedResources()
644 mCallStack.PushCall("Controller::DiscardUnusedResources", "");
647 bool TestGraphicsController::IsDiscardQueueEmpty()
649 mCallStack.PushCall("Controller::IsDiscardQueueEmpty", "");
650 return isDiscardQueueEmptyResult;
654 * @brief Test if the graphics subsystem has resumed & should force a draw
656 * @return true if the graphics subsystem requires a re-draw
658 bool TestGraphicsController::IsDrawOnResumeRequired()
660 mCallStack.PushCall("Controller::IsDrawOnResumeRequired", "");
661 return isDrawOnResumeRequiredResult;
664 Graphics::UniquePtr<Graphics::Buffer> TestGraphicsController::CreateBuffer(const Graphics::BufferCreateInfo& createInfo, Graphics::UniquePtr<Graphics::Buffer>&& oldBuffer)
666 std::ostringstream oss;
667 oss << "bufferCreateInfo:" << createInfo;
668 mCallStack.PushCall("Controller::CreateBuffer", oss.str());
669 return Graphics::MakeUnique<TestGraphicsBuffer>(mCallStack, mGl, createInfo.size, createInfo.usage);
672 Graphics::UniquePtr<Graphics::CommandBuffer> TestGraphicsController::CreateCommandBuffer(const Graphics::CommandBufferCreateInfo& commandBufferCreateInfo, Graphics::UniquePtr<Graphics::CommandBuffer>&& oldCommandBuffer)
674 std::ostringstream oss;
675 oss << "commandBufferCreateInfo:" << commandBufferCreateInfo;
676 mCallStack.PushCall("Controller::CreateCommandBuffer", oss.str());
677 return Graphics::MakeUnique<TestGraphicsCommandBuffer>(mCommandBufferCallStack, mGl);
680 Graphics::UniquePtr<Graphics::RenderPass> TestGraphicsController::CreateRenderPass(const Graphics::RenderPassCreateInfo& renderPassCreateInfo, Graphics::UniquePtr<Graphics::RenderPass>&& oldRenderPass)
682 mCallStack.PushCall("Controller::CreateRenderPass", "");
686 Graphics::UniquePtr<Graphics::Texture> TestGraphicsController::CreateTexture(const Graphics::TextureCreateInfo& textureCreateInfo, Graphics::UniquePtr<Graphics::Texture>&& oldTexture)
688 TraceCallStack::NamedParams namedParams;
689 namedParams["textureCreateInfo"] << textureCreateInfo;
690 mCallStack.PushCall("Controller::CreateTexture", namedParams.str(), namedParams);
692 return Graphics::MakeUnique<TestGraphicsTexture>(mGl, textureCreateInfo);
695 Graphics::UniquePtr<Graphics::Framebuffer> TestGraphicsController::CreateFramebuffer(const Graphics::FramebufferCreateInfo& framebufferCreateInfo, Graphics::UniquePtr<Graphics::Framebuffer>&& oldFramebuffer)
697 mCallStack.PushCall("Controller::CreateFramebuffer", "");
701 Graphics::UniquePtr<Graphics::Pipeline> TestGraphicsController::CreatePipeline(const Graphics::PipelineCreateInfo& pipelineCreateInfo, Graphics::UniquePtr<Graphics::Pipeline>&& oldPipeline)
703 mCallStack.PushCall("Controller::CreatePipeline", "");
704 return std::make_unique<TestGraphicsPipeline>(mGl, pipelineCreateInfo);
707 Graphics::UniquePtr<Graphics::Shader> TestGraphicsController::CreateShader(const Graphics::ShaderCreateInfo& shaderCreateInfo, Graphics::UniquePtr<Graphics::Shader>&& oldShader)
709 mCallStack.PushCall("Controller::CreateShader", "");
713 Graphics::UniquePtr<Graphics::Sampler> TestGraphicsController::CreateSampler(const Graphics::SamplerCreateInfo& samplerCreateInfo, Graphics::UniquePtr<Graphics::Sampler>&& oldSampler)
715 TraceCallStack::NamedParams namedParams;
716 namedParams["samplerCreateInfo"] << samplerCreateInfo;
717 mCallStack.PushCall("Controller::CreateSampler", namedParams.str(), namedParams);
719 return Graphics::MakeUnique<TestGraphicsSampler>(mGl, samplerCreateInfo);
722 Graphics::UniquePtr<Graphics::RenderTarget> TestGraphicsController::CreateRenderTarget(const Graphics::RenderTargetCreateInfo& renderTargetCreateInfo, Graphics::UniquePtr<Graphics::RenderTarget>&& oldRenderTarget)
724 mCallStack.PushCall("Controller::CreateRenderTarget", "");
728 Graphics::UniquePtr<Graphics::Memory> TestGraphicsController::MapBufferRange(const Graphics::MapBufferInfo& mapInfo)
730 mCallStack.PushCall("Controller::MapBufferRange", "");
732 auto buffer = static_cast<TestGraphicsBuffer*>(mapInfo.buffer);
733 buffer->memory.resize(mapInfo.offset + mapInfo.size); // For initial testing, allow writes past capacity
735 return std::make_unique<TestGraphicsMemory>(mCallStack, *buffer, mapInfo.offset, mapInfo.size);
738 Graphics::UniquePtr<Graphics::Memory> TestGraphicsController::MapTextureRange(const Graphics::MapTextureInfo& mapInfo)
740 mCallStack.PushCall("Controller::MapTextureRange", "");
744 void TestGraphicsController::UnmapMemory(Graphics::UniquePtr<Graphics::Memory> memory)
746 mCallStack.PushCall("Controller::UnmapMemory", "");
749 Graphics::MemoryRequirements TestGraphicsController::GetTextureMemoryRequirements(Graphics::Texture& texture) const
751 mCallStack.PushCall("Controller::GetTextureMemoryRequirements", "");
752 return Graphics::MemoryRequirements{};
755 Graphics::MemoryRequirements TestGraphicsController::GetBufferMemoryRequirements(Graphics::Buffer& buffer) const
757 mCallStack.PushCall("Controller::GetBufferMemoryRequirements", "");
758 return Graphics::MemoryRequirements{};
761 const Graphics::TextureProperties& TestGraphicsController::GetTextureProperties(const Graphics::Texture& texture)
763 static Graphics::TextureProperties textureProperties{};
764 mCallStack.PushCall("Controller::GetTextureProperties", "");
766 return textureProperties;
769 bool TestGraphicsController::PipelineEquals(const Graphics::Pipeline& pipeline0, const Graphics::Pipeline& pipeline1) const
771 mCallStack.PushCall("Controller::PipelineEquals", "");