Skip to content

Commit

Permalink
igl | Remove the old bindTexture() menthod
Browse files Browse the repository at this point in the history
Summary:
Removed the overloaded member function:

```
virtual void bindTexture(size_t index, uint8_t target, const std::shared_ptr<ITexture>& texture)
```

A proper long-term fix for D47407405.

Reviewed By: MichaelTay

Differential Revision: D47408363

fbshipit-source-id: c6f80a5f4901007340a156f2568840c6763b2c7d
  • Loading branch information
corporateshark authored and facebook-github-bot committed Jul 14, 2023
1 parent 6b13876 commit 16270e5
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 47 deletions.
4 changes: 2 additions & 2 deletions samples/desktop/Tiny/Tiny_Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,8 @@ static void render(const std::shared_ptr<ITexture>& 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++) {
Expand Down
23 changes: 12 additions & 11 deletions samples/desktop/Tiny/Tiny_MeshLarge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1968,11 +1968,12 @@ void render(const std::shared_ptr<ITexture>& 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_);
Expand All @@ -1992,8 +1993,8 @@ void render(const std::shared_ptr<ITexture>& 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(
Expand All @@ -2009,10 +2010,10 @@ void render(const std::shared_ptr<ITexture>& 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_);
Expand Down Expand Up @@ -2058,8 +2059,8 @@ void render(const std::shared_ptr<ITexture>& 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
Expand Down
2 changes: 1 addition & 1 deletion samples/ios/snapshot_test_support/TinyRenderable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions samples/wasm/tiny.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion shell/renderSessions/ColorSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions shell/renderSessions/MRTSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion shell/renderSessions/ShaderLibraryWithDataSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ void ShaderLibraryWithDataSession::update(igl::SurfaceTextures surfaceTextures)
*static_cast<VertexFormat*>(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_);
Expand Down
2 changes: 1 addition & 1 deletion shell/renderSessions/TQMultiRenderPassSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void render(std::shared_ptr<ICommandBuffer>& 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);
Expand Down
2 changes: 1 addition & 1 deletion shell/renderSessions/TQSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion shell/renderSessions/Textured3DCubeSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void Textured3DCubeSession::update(igl::SurfaceTextures surfaceTextures) noexcep
*static_cast<VertexFormat*>(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_);
Expand Down
6 changes: 1 addition & 5 deletions src/igl/RenderCommandEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<ITexture>& 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;
Expand Down
2 changes: 1 addition & 1 deletion src/igl/tests/Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/igl/tests/Blending.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/igl/tests/RenderCommandEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions src/igl/tests/Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/igl/tests/TextureArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand Down
2 changes: 1 addition & 1 deletion src/igl/tests/TextureCube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand Down
8 changes: 4 additions & 4 deletions src/igl/tests/ogl/UniformBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/igl/tests/sRGB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/igl/tests/util/TextureFormatTestBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void TextureFormatTestBase::render(std::shared_ptr<ITexture> 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_);
Expand Down

0 comments on commit 16270e5

Please sign in to comment.