diff --git a/samples/desktop/Tiny/Tiny_Mesh.cpp b/samples/desktop/Tiny/Tiny_Mesh.cpp index 57e6d0db7e..7961a62727 100644 --- a/samples/desktop/Tiny/Tiny_Mesh.cpp +++ b/samples/desktop/Tiny/Tiny_Mesh.cpp @@ -532,8 +532,8 @@ static void render(const std::shared_ptr& nativeDrawable, uint32_t fra commands->bindBuffer(0, BindTarget::kVertex, vb0_, 0); commands->bindDepthStencilState(depthStencilState_); commands->bindBuffer(0, BindTarget::kAllGraphics, ubPerFrame_[frameIndex], 0); - commands->bindTexture(0, igl::BindTarget::kFragment, texture0_); - commands->bindTexture(1, igl::BindTarget::kFragment, texture1_); + commands->bindTexture(0, igl::BindTarget::kFragment, texture0_.get()); + commands->bindTexture(1, igl::BindTarget::kFragment, texture1_.get()); commands->bindSamplerState(0, igl::BindTarget::kFragment, sampler_); // Draw 2 cubes: we use uniform buffer to update matrices for (uint32_t i = 0; i != kNumCubes; i++) { diff --git a/samples/desktop/Tiny/Tiny_MeshLarge.cpp b/samples/desktop/Tiny/Tiny_MeshLarge.cpp index 050770e63b..f8dd7560a0 100644 --- a/samples/desktop/Tiny/Tiny_MeshLarge.cpp +++ b/samples/desktop/Tiny/Tiny_MeshLarge.cpp @@ -1968,11 +1968,12 @@ void render(const std::shared_ptr& nativeDrawable, uint32_t frameIndex : textures_[imageIdx].alpha ? textures_[imageIdx].alpha : textureDummyBlack_; - commands->bindTexture(0, igl::BindTarget::kFragment, fbShadowMap_->getDepthAttachment()); - commands->bindTexture(1, igl::BindTarget::kFragment, ambientTextureReference); - commands->bindTexture(2, igl::BindTarget::kFragment, diffuseTextureReference); - commands->bindTexture(3, igl::BindTarget::kFragment, alphaTextureReference); - commands->bindTexture(4, igl::BindTarget::kFragment, skyboxTextureIrradiance_); + commands->bindTexture( + 0, igl::BindTarget::kFragment, fbShadowMap_->getDepthAttachment().get()); + commands->bindTexture(1, igl::BindTarget::kFragment, ambientTextureReference.get()); + commands->bindTexture(2, igl::BindTarget::kFragment, diffuseTextureReference.get()); + commands->bindTexture(3, igl::BindTarget::kFragment, alphaTextureReference.get()); + commands->bindTexture(4, igl::BindTarget::kFragment, skyboxTextureIrradiance_.get()); commands->bindSamplerState(0, igl::BindTarget::kFragment, samplerShadow_); commands->bindSamplerState(1, igl::BindTarget::kFragment, sampler_); commands->bindSamplerState(2, igl::BindTarget::kFragment, sampler_); @@ -1992,8 +1993,8 @@ void render(const std::shared_ptr& nativeDrawable, uint32_t frameIndex shapeStart += numVertices; } #else - commands->bindTexture(0, igl::BindTarget::kFragment, fbShadowMap_->getDepthAttachment()); - commands->bindTexture(1, igl::BindTarget::kFragment, skyboxTextureIrradiance_); + commands->bindTexture(0, igl::BindTarget::kFragment, fbShadowMap_->getDepthAttachment().get()); + commands->bindTexture(1, igl::BindTarget::kFragment, skyboxTextureIrradiance_.get()); commands->bindSamplerState(0, igl::BindTarget::kFragment, sampler_); commands->bindSamplerState(1, igl::BindTarget::kFragment, samplerShadow_); commands->drawIndexed( @@ -2009,10 +2010,10 @@ void render(const std::shared_ptr& nativeDrawable, uint32_t frameIndex // Skybox commands->bindRenderPipelineState(renderPipelineState_Skybox_); #if USE_OPENGL_BACKEND - commands->bindTexture(1, igl::BindTarget::kFragment, skyboxTextureReference_); + commands->bindTexture(1, igl::BindTarget::kFragment, skyboxTextureReference_.get()); commands->bindSamplerState(1, igl::BindTarget::kFragment, sampler_); #else - commands->bindTexture(0, igl::BindTarget::kFragment, skyboxTextureReference_); + commands->bindTexture(0, igl::BindTarget::kFragment, skyboxTextureReference_.get()); #endif commands->pushDebugGroupLabel("Render Skybox", igl::Color(0, 1, 0)); commands->bindDepthStencilState(depthStencilStateLEqual_); @@ -2058,8 +2059,8 @@ void render(const std::shared_ptr& nativeDrawable, uint32_t frameIndex commands->pushDebugGroupLabel("Swapchain Output", igl::Color(1, 0, 0)); commands->bindTexture(0, igl::BindTarget::kFragment, - kNumSamplesMSAA > 1 ? fbOffscreen_->getResolveColorAttachment(0) - : fbOffscreen_->getColorAttachment(0)); + kNumSamplesMSAA > 1 ? fbOffscreen_->getResolveColorAttachment(0).get() + : fbOffscreen_->getColorAttachment(0).get()); #if USE_OPENGL_BACKEND commands->bindSamplerState(0, igl::BindTarget::kFragment, sampler_); #endif diff --git a/samples/ios/snapshot_test_support/TinyRenderable.cpp b/samples/ios/snapshot_test_support/TinyRenderable.cpp index b2363775e5..02a8a23c73 100644 --- a/samples/ios/snapshot_test_support/TinyRenderable.cpp +++ b/samples/ios/snapshot_test_support/TinyRenderable.cpp @@ -244,7 +244,7 @@ void TinyRenderable::submit(igl::IRenderCommandEncoder& cmds) { cmds.bindBuffer(0, igl::BindTarget::kVertex, vertexBuffer_, 0); // cmds.bindBuffer(1, igl::BindTarget::kFragment, uniformBuffer_, 0); cmds.bindRenderPipelineState(pipelineState_); - cmds.bindTexture(kTextureUnit, igl::BindTarget::kFragment, texture_); + cmds.bindTexture(kTextureUnit, igl::BindTarget::kFragment, texture_.get()); cmds.bindSamplerState(kTextureUnit, igl::BindTarget::kFragment, sampler_); cmds.drawIndexed(igl::PrimitiveType::Triangle, 6, igl::IndexFormat::UInt16, *indexBuffer_, 0); // clang-format on diff --git a/samples/wasm/tiny.cpp b/samples/wasm/tiny.cpp index 11d4221656..51eee67e7b 100644 --- a/samples/wasm/tiny.cpp +++ b/samples/wasm/tiny.cpp @@ -403,8 +403,8 @@ void onDraw(void*) { commands->bindBuffer(0, BindTarget::kVertex, vb0_, 0); commands->bindDepthStencilState(depthStencilState_); commands->bindBuffer(0, BindTarget::kAllGraphics, ubPerFrame_[frameIndex], 0); - commands->bindTexture(0, igl::BindTarget::kFragment, texture0_); - commands->bindTexture(1, igl::BindTarget::kFragment, texture1_); + commands->bindTexture(0, igl::BindTarget::kFragment, texture0_.get()); + commands->bindTexture(1, igl::BindTarget::kFragment, texture1_.get()); commands->bindSamplerState(0, igl::BindTarget::kFragment, sampler_); // Draw 2 cubes: we use uniform buffer to update matrices for (uint32_t i = 0; i != kNumCubes; i++) { diff --git a/shell/renderSessions/ColorSession.cpp b/shell/renderSessions/ColorSession.cpp index 59864609d1..6eb9bccebf 100644 --- a/shell/renderSessions/ColorSession.cpp +++ b/shell/renderSessions/ColorSession.cpp @@ -325,7 +325,7 @@ void ColorSession::update(igl::SurfaceTextures surfaceTextures) noexcept { IGL_ASSERT_NOT_REACHED(); } - commands->bindTexture(_textureUnit, BindTarget::kFragment, tex0_); + commands->bindTexture(_textureUnit, BindTarget::kFragment, tex0_.get()); commands->bindSamplerState(_textureUnit, BindTarget::kFragment, samp0_); commands->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib0_, 0); diff --git a/shell/renderSessions/MRTSession.cpp b/shell/renderSessions/MRTSession.cpp index 0e8658efd0..dced6b6087 100644 --- a/shell/renderSessions/MRTSession.cpp +++ b/shell/renderSessions/MRTSession.cpp @@ -399,7 +399,7 @@ void MRTSession::update(const igl::SurfaceTextures surfaceTextures) noexcept { // clang-format off commands->bindBuffer(0, BindTarget::kVertex, vb0_, 0); commands->bindRenderPipelineState(pipelineStateMRT_); - commands->bindTexture(textureUnit, BindTarget::kFragment, tex0_); + commands->bindTexture(textureUnit, BindTarget::kFragment, tex0_.get()); commands->bindSamplerState(textureUnit, BindTarget::kFragment, samp0_); commands->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib0_, 0); // clang-format on @@ -438,10 +438,10 @@ void MRTSession::update(const igl::SurfaceTextures surfaceTextures) noexcept { commands->bindBuffer(0, BindTarget::kVertex, vb0_, 0); commands->bindRenderPipelineState(pipelineStateLastDisplay_); auto green = framebufferMRT_->getColorAttachment(0); - commands->bindTexture(textureUnit, BindTarget::kFragment, green); + commands->bindTexture(textureUnit, BindTarget::kFragment, green.get()); commands->bindSamplerState(textureUnit, BindTarget::kFragment, samp0_); auto red = framebufferMRT_->getColorAttachment(1); - commands->bindTexture(textureUnit+1, BindTarget::kFragment, red); + commands->bindTexture(textureUnit+1, BindTarget::kFragment, red.get()); commands->bindSamplerState(textureUnit+1, BindTarget::kFragment, samp0_); commands->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib0_, 0); diff --git a/shell/renderSessions/ShaderLibraryWithDataSession.cpp b/shell/renderSessions/ShaderLibraryWithDataSession.cpp index 3703a90be4..f8b9324016 100644 --- a/shell/renderSessions/ShaderLibraryWithDataSession.cpp +++ b/shell/renderSessions/ShaderLibraryWithDataSession.cpp @@ -274,7 +274,7 @@ void ShaderLibraryWithDataSession::update(igl::SurfaceTextures surfaceTextures) *static_cast(vertUniformBuffer->getData()) = vertexParameters_; vertUniformBuffer->bind(device, *pipelineState_, *commands); - commands->bindTexture(textureUnit, BindTarget::kFragment, tex0_); + commands->bindTexture(textureUnit, BindTarget::kFragment, tex0_.get()); commands->bindSamplerState(textureUnit, BindTarget::kFragment, samp0_); commands->bindRenderPipelineState(pipelineState_); diff --git a/shell/renderSessions/TQMultiRenderPassSession.cpp b/shell/renderSessions/TQMultiRenderPassSession.cpp index bd5ae7afcc..4d038a4c08 100644 --- a/shell/renderSessions/TQMultiRenderPassSession.cpp +++ b/shell/renderSessions/TQMultiRenderPassSession.cpp @@ -154,7 +154,7 @@ static void render(std::shared_ptr& buffer, commands->bindUniform(uniformDesc, &fragmentParameters); } } - commands->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture); + commands->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture.get()); commands->bindSamplerState(textureUnit_, BindTarget::kFragment, samplerState); commands->bindBuffer(0, BindTarget::kVertex, vertexBuffer, 0); commands->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib, 0); diff --git a/shell/renderSessions/TQSession.cpp b/shell/renderSessions/TQSession.cpp index 1af8c5ead7..df761ee221 100644 --- a/shell/renderSessions/TQSession.cpp +++ b/shell/renderSessions/TQSession.cpp @@ -310,7 +310,7 @@ void TQSession::update(igl::SurfaceTextures surfaceTextures) noexcept { IGL_ASSERT_NOT_REACHED(); } - commands->bindTexture(_textureUnit, BindTarget::kFragment, _tex0); + commands->bindTexture(_textureUnit, BindTarget::kFragment, _tex0.get()); commands->bindSamplerState(_textureUnit, BindTarget::kFragment, _samp0); commands->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *_ib0, 0); diff --git a/shell/renderSessions/Textured3DCubeSession.cpp b/shell/renderSessions/Textured3DCubeSession.cpp index eca047a167..7d52bc2176 100644 --- a/shell/renderSessions/Textured3DCubeSession.cpp +++ b/shell/renderSessions/Textured3DCubeSession.cpp @@ -418,7 +418,7 @@ void Textured3DCubeSession::update(igl::SurfaceTextures surfaceTextures) noexcep *static_cast(vertUniformBuffer->getData()) = vertexParameters_; vertUniformBuffer->bind(device, *pipelineState_, *commands); - commands->bindTexture(textureUnit, BindTarget::kFragment, tex0_); + commands->bindTexture(textureUnit, BindTarget::kFragment, tex0_.get()); commands->bindSamplerState(textureUnit, BindTarget::kFragment, samp0_); commands->bindRenderPipelineState(pipelineState_); diff --git a/src/igl/RenderCommandEncoder.h b/src/igl/RenderCommandEncoder.h index c59116d8bf..5804d321ce 100644 --- a/src/igl/RenderCommandEncoder.h +++ b/src/igl/RenderCommandEncoder.h @@ -70,11 +70,7 @@ class IRenderCommandEncoder : public ICommandEncoder { // For metal, the index parameter is the index in the texture argument table, // by the "texture" attribute specified in the shader. // For OpenGL, 'index' is the texture unit - virtual void bindTexture(size_t index, uint8_t target, ITexture* texture) {} - // TODO: keep it here until all the client apps are migrated to the new syntax - virtual void bindTexture(size_t index, uint8_t target, const std::shared_ptr& texture) { - bindTexture(index, target, texture.get()); - } + virtual void bindTexture(size_t index, uint8_t target, ITexture* texture) = 0; /// Binds an individual uniform. Exclusively for use when uniform blocks are not supported. virtual void bindUniform(const UniformDesc& uniformDesc, const void* data) = 0; diff --git a/src/igl/tests/Backend.cpp b/src/igl/tests/Backend.cpp index c2425a5c09..a068c1835f 100644 --- a/src/igl/tests/Backend.cpp +++ b/src/igl/tests/Backend.cpp @@ -265,7 +265,7 @@ TEST_F(BackendTest, DISABLED_CoordinateSystem) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); diff --git a/src/igl/tests/Blending.cpp b/src/igl/tests/Blending.cpp index cd6a8b62ef..e0a9c0eca2 100644 --- a/src/igl/tests/Blending.cpp +++ b/src/igl/tests/Blending.cpp @@ -239,12 +239,12 @@ TEST_F(BlendingTest, RGBASrcAndDstAddTest) { cmds->bindRenderPipelineState(pipelineState1); // Draw half red texture - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture1_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture1_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); // Draw half blue texture - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture2_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture2_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); diff --git a/src/igl/tests/RenderCommandEncoder.cpp b/src/igl/tests/RenderCommandEncoder.cpp index 81f22525a6..69de6213b9 100644 --- a/src/igl/tests/RenderCommandEncoder.cpp +++ b/src/igl/tests/RenderCommandEncoder.cpp @@ -188,7 +188,7 @@ class RenderCommandEncoderTest : public ::testing::Test { ASSERT_TRUE(cmdBuffer != nullptr); auto encoder = cmdBuffer->createRenderCommandEncoder(renderPass_, framebuffer_); - encoder->bindTexture(textureUnit_, BindTarget::kFragment, texture_); + encoder->bindTexture(textureUnit_, BindTarget::kFragment, texture_.get()); encoder->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); encoder->bindBuffer(data::shader::simplePosIndex, BindTarget::kVertex, vb_, 0); diff --git a/src/igl/tests/Texture.cpp b/src/igl/tests/Texture.cpp index f17490fe97..925460237f 100644 --- a/src/igl/tests/Texture.cpp +++ b/src/igl/tests/Texture.cpp @@ -434,7 +434,7 @@ TEST_F(TextureTest, Passthrough) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); @@ -513,7 +513,7 @@ TEST_F(TextureTest, PassthroughSubTexture) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); @@ -650,7 +650,7 @@ TEST_F(TextureTest, FBCopy) { cmds->bindRenderPipelineState(pipelineState); // Using dstTexture as input here - cmds->bindTexture(textureUnit_, BindTarget::kFragment, dstTexture); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, dstTexture.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); @@ -789,7 +789,7 @@ TEST_F(TextureTest, PIXEL_UPLOAD_ALIGNMENT) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); @@ -890,7 +890,7 @@ TEST_F(TextureTest, Resize) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); @@ -1093,7 +1093,7 @@ TEST_F(TextureTest, RenderToMip) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); diff --git a/src/igl/tests/TextureArray.cpp b/src/igl/tests/TextureArray.cpp index 0eeae36122..6b5fb87616 100644 --- a/src/igl/tests/TextureArray.cpp +++ b/src/igl/tests/TextureArray.cpp @@ -373,7 +373,7 @@ void TextureArrayTest::runPassthroughTest(bool uploadFullArray, bool modifyTextu cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); Result result{}; diff --git a/src/igl/tests/TextureCube.cpp b/src/igl/tests/TextureCube.cpp index b1d9f9ef54..7e3f6791d8 100644 --- a/src/igl/tests/TextureCube.cpp +++ b/src/igl/tests/TextureCube.cpp @@ -293,7 +293,7 @@ TEST_F(TextureCubeTest, Passthrough) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); Result result{}; diff --git a/src/igl/tests/ogl/UniformBuffer.cpp b/src/igl/tests/ogl/UniformBuffer.cpp index 1d1e74d85f..a3d7672c3a 100644 --- a/src/igl/tests/ogl/UniformBuffer.cpp +++ b/src/igl/tests/ogl/UniformBuffer.cpp @@ -752,7 +752,7 @@ TEST_F(UniformBufferTest, UniformBufferBinding) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); @@ -793,7 +793,7 @@ TEST_F(UniformBufferTest, UniformBufferBinding) { cmds->bindUniform(uniformDesc, &fragmentParameters_); } - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); @@ -1153,7 +1153,7 @@ TEST_F(UniformBufferTest, UniformArrayBinding) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); @@ -1194,7 +1194,7 @@ TEST_F(UniformBufferTest, UniformArrayBinding) { cmds->bindUniform(uniformDesc, &fragmentParameters_); } - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); diff --git a/src/igl/tests/sRGB.cpp b/src/igl/tests/sRGB.cpp index da5d9ae89e..67d43181a2 100644 --- a/src/igl/tests/sRGB.cpp +++ b/src/igl/tests/sRGB.cpp @@ -252,7 +252,7 @@ TEST_F(sRGBTest, Passthrough) { cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, inputTexture_.get()); cmds->bindSamplerState(textureUnit_, BindTarget::kFragment, samp_); cmds->drawIndexed(PrimitiveType::Triangle, 6, IndexFormat::UInt16, *ib_, 0); diff --git a/src/igl/tests/util/TextureFormatTestBase.cpp b/src/igl/tests/util/TextureFormatTestBase.cpp index 5c1cc9813c..c7b92e22ea 100644 --- a/src/igl/tests/util/TextureFormatTestBase.cpp +++ b/src/igl/tests/util/TextureFormatTestBase.cpp @@ -203,7 +203,7 @@ void TextureFormatTestBase::render(std::shared_ptr sampledTexture, cmds->bindRenderPipelineState(pipelineState); - cmds->bindTexture(textureUnit_, BindTarget::kFragment, sampledTexture); + cmds->bindTexture(textureUnit_, BindTarget::kFragment, sampledTexture.get()); // Choose appropriate sampler. cmds->bindSamplerState( textureUnit_, BindTarget::kFragment, linearSampling ? linearSampler_ : nearestSampler_);