Giter Club home page Giter Club logo

Comments (5)

umar456 avatar umar456 commented on July 24, 2024

The validator is still being actively developed and does not perform validation on the types of the operands. I am currently work on implementing this feature. I will update this issue as we make more progress.

from spirv-tools.

greg-lunarg avatar greg-lunarg commented on July 24, 2024

Would it be possible to post some kind of general status on the spirv-tools
github page? What is working? What is not? What is being worked on actively?

Greg Fischer

Project Manager and Senior Engineer

LunarG, Inc. - 3D Driver Innovations

[email protected] [email protected]

On Fri, Jun 24, 2016 at 3:59 PM, Umar Arshad [email protected]
wrote:

The validator is still being actively developed and does not perform
validation on the types of the operands. I am currently work on
implementing this feature. I will update this issue as we make more
progress.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#244 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHL6q9gApcRL8v4GY2yMFxMWEEorEIY-ks5qPFNQgaJpZM4I-J5i
.

from spirv-tools.

dneto0 avatar dneto0 commented on July 24, 2024

We could have a Validator-README.md in the root dir to describe status, and reference it from the main README.md. It would be good to keep it simple.

from spirv-tools.

dneto0 avatar dneto0 commented on July 24, 2024

I've started using the new "Projects" feature in GitHub. It's a nice and simple kanban board that ties into GitHub issues and uses "notes" for generic tasks not (yet) tied to issues.

This is the "Validator" project:
https://github.com/KhronosGroup/SPIRV-Tools/projects/1

I'm in the middle of populating it with the TODO and WIP list. Once that's set up I'll write up the intended procedures.

from spirv-tools.

antiagainst avatar antiagainst commented on July 24, 2024

@atgoo: I think we now have validation checks for OpImageFetch:

case SpvOpImageFetch: {
if (!_.IsIntVectorType(result_type) &&
!_.IsFloatVectorType(result_type)) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Result Type to be int or float vector type: "
<< spvOpcodeString(opcode);
}
if (_.GetDimension(result_type) != 4) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Result Type to have 4 components: "
<< spvOpcodeString(opcode);
}
const uint32_t image_type = _.GetOperandTypeId(inst, 2);
if (_.GetIdOpcode(image_type) != SpvOpTypeImage) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Image to be of type OpTypeImage: "
<< spvOpcodeString(opcode);
}
ImageTypeInfo info;
if (!GetImageTypeInfo(_, image_type, &info)) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Corrupt image type definition";
}
if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) {
const uint32_t result_component_type = _.GetComponentType(result_type);
if (result_component_type != info.sampled_type) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Image 'Sampled Type' to be the same as Result "
"Type "
<< "components: " << spvOpcodeString(opcode);
}
}
if (info.dim == SpvDimCube) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Image 'Dim' cannot be Cube: " << spvOpcodeString(opcode);
}
if (info.sampled != 1) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Image 'Sampled' parameter to be 1: "
<< spvOpcodeString(opcode);
}
const uint32_t coord_type = _.GetOperandTypeId(inst, 3);
if (!_.IsIntScalarOrVectorType(coord_type)) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Coordinate to be int scalar or vector: "
<< spvOpcodeString(opcode);
}
const uint32_t min_coord_size = GetMinCoordSize(opcode, info);
const uint32_t actual_coord_size = _.GetDimension(coord_type);
if (min_coord_size > actual_coord_size) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Coordinate to have at least " << min_coord_size
<< " components, but given only " << actual_coord_size << ": "
<< spvOpcodeString(opcode);
}
if (inst->num_words <= 5) break;
const uint32_t mask = inst->words[5];
if (spv_result_t result =
ValidateImageOperands(_, *inst, info, mask, /* word_index = */ 6))
return result;
break;
}

from spirv-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.