Skip to content

Commit

Permalink
Fixed osl.imageio to override base class methods and accept ustringhash
Browse files Browse the repository at this point in the history
Signed-off-by: Steena Monteiro <[email protected]>
  • Loading branch information
steenax86 authored and lgritz committed Aug 17, 2023
1 parent 63002f3 commit a706107
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
45 changes: 20 additions & 25 deletions src/osl.imageio/oslinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,56 +136,51 @@ class OIIO_RendererServices final : public RendererServices {
: RendererServices(texsys)
{
}
virtual ~OIIO_RendererServices() {}
~OIIO_RendererServices() {}

virtual int supports(string_view /*feature*/) const { return false; }
int supports(string_view /*feature*/) const override { return false; }

virtual bool get_matrix(ShaderGlobals* /*sg*/, Matrix44& /*result*/,
TransformationPtr /*xform*/, float /*time*/)
bool get_matrix(ShaderGlobals* /*sg*/, Matrix44& /*result*/,
TransformationPtr /*xform*/, float /*time*/) override
{
return false; // FIXME?
}
virtual bool get_matrix(ShaderGlobals* /*sg*/, Matrix44& /*result*/,
TransformationPtr /*xform*/)
bool get_matrix(ShaderGlobals* /*sg*/, Matrix44& /*result*/,
TransformationPtr /*xform*/) override
{
return false; // FIXME?
}
virtual bool get_matrix(ShaderGlobals* /*sg*/, Matrix44& /*result*/,
ustring /*from*/, float /*time*/)
bool get_matrix(ShaderGlobals* /*sg*/, Matrix44& /*result*/,
ustringhash /*from*/, float /*time*/) override
{
return false; // FIXME?
}
virtual bool get_matrix(ShaderGlobals* /*sg*/, Matrix44& /*result*/,
ustring /*from*/)
bool get_matrix(ShaderGlobals* /*sg*/, Matrix44& /*result*/,
ustringhash /*from*/) override
{
return false; // FIXME?
}

virtual bool get_attribute(ShaderGlobals* /*sg*/, bool /*derivatives*/,
ustring /*object*/, TypeDesc /*type*/,
ustring /*name*/, void* /*val*/)
bool get_attribute(ShaderGlobals* /*sg*/, bool /*derivatives*/,
ustringhash /*object*/, TypeDesc /*type*/,
ustringhash /*name*/, void* /*val*/) override
{
return false; // FIXME?
}
virtual bool get_array_attribute(ShaderGlobals* /*sg*/,
bool /*derivatives*/, ustring /*object*/,
TypeDesc /*type*/, ustring /*name*/,
int /*index*/, void* /*val*/)
bool get_array_attribute(ShaderGlobals* /*sg*/, bool /*derivatives*/,
ustringhash /*object*/, TypeDesc /*type*/,
ustringhash /*name*/, int /*index*/,
void* /*val*/) override
{
return false; // FIXME?
}

virtual bool get_userdata(bool /*derivatives*/, ustring /*name*/,
TypeDesc /*type*/, ShaderGlobals* /*sg*/,
void* /*val*/)
bool get_userdata(bool /*derivatives*/, ustringhash /*name*/,
TypeDesc /*type*/, ShaderGlobals* /*sg*/,
void* /*val*/) override
{
return false; // FIXME?
}

void errorfmt(OSL::ShaderGlobals* sg, OSL::ustringhash fmt_specification,
int32_t count, const EncodedType* argTypes,
uint32_t argValuesSize,
uint8_t* argValues); //override;
};


Expand Down
4 changes: 2 additions & 2 deletions src/testshade/testshade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2103,8 +2103,8 @@ test_shade(int argc, const char* argv[])
}

//Initialize a Journal Buffer for all threads to use for journaling fmt specification calls.
const size_t jbuffer_bytes = jbufferMB * 1024 * 1024;
std::unique_ptr<uint8_t[]> jbuffer (new uint8_t[jbuffer_bytes]);
const size_t jbuffer_bytes = jbufferMB * 1024 * 1024;
std::unique_ptr<uint8_t[]> jbuffer(new uint8_t[jbuffer_bytes]);
constexpr int jbuffer_pagesize = 1024;
bool init_buffer_success
= OSL::journal::initialize_buffer(jbuffer.get(), jbuffer_bytes,
Expand Down

0 comments on commit a706107

Please sign in to comment.