Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add epub generation #2286

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Add epub generation #2286

merged 2 commits into from
Jan 24, 2024

Conversation

raSTARgfx
Copy link
Contributor

Hey all,

I really wanted the spec for my kindle scribe so I poked a bit at getting asciidoc to generate epub. Not really sure if this is something you are all interested in but I figured the PR wouldn't hurt.

Here is a sample of the output generated by ./makeSpec -spec all epub
vkspec.zip

Let me know if there is anything I can do to improve this. I mostly followed what was already there but I'm not an expert on asciidoc so I left out the bits I didn't know much about. This requires that https://docs.asciidoctor.org/epub3-converter/latest/ be installed but I didn't add any checks for that or anything as that seems to also be the case for pdf.

@CLAassistant
Copy link

CLAassistant commented Dec 28, 2023

CLA assistant check
All committers have signed the CLA.

@oddhack
Copy link
Contributor

oddhack commented Dec 29, 2023

How does this deal with latexmath equations (there are a lot in the texturing / image operations chapter for reference)? ISTR looking at this a few years ago at which time there were some issues.

@raSTARgfx
Copy link
Contributor Author

Thank you for pointing me in that direction. I wasn't aware of it so it was missed.

With some tinkering I was able to get it to look correct (at least to my eye).

There is something weird about generating the svg's locally where it generates a bunch of mojibake. Not sure if it's because I'm missing a font or something. Quickly installing the requirements to the docker container:

gem install asciidoctor-epub3 rouge
./makeSpec -clean -spec core epub

2023-12-28 23_52_26-Vulkan® 1 3 274 - A Specification  EPUB  — E-book viewer

Compared to the PDF
2023-12-29 00_08_50-Vulkan® 1 3 274 - A Specification - Foxit PDF Reader

The only other issue I could spot was some issues with scaling:
2023-12-29 00_24_26-Vulkan® 1 3 274 - A Specification  EPUB  — E-book viewer

@oddhack
Copy link
Contributor

oddhack commented Jan 10, 2024

This is clearly potentially useful for some developers, but at the same time, it's not something we ourselves want to be responsible for - we are publishing way too many Vulkan spec artifacts already.

My inclination is to put the new target into the Makefile, but make clear that this is unsupported by us and community-contributed, such that people would need to build their own EPUBs from the repository. Would that be OK for you?

@oddhack
Copy link
Contributor

oddhack commented Jan 10, 2024

Also, we'd like to be able to point people to you if there are issues. Unfortunately we apparently cannot file issues on a repo fork, but if you open a tracking issue here we can hold it open indefinitely and point people to it.

@raSTARgfx
Copy link
Contributor Author

My inclination is to put the new target into the Makefile, but make clear that this is unsupported by us and community-contributed, such that people would need to build their own EPUBs from the repository.

That sounds good to me.

Let me know if there is anything I can do with this PR to facilitate making that clear.

Also, we'd like to be able to point people to you if there are issues.

Yup that is fine.

you open a tracking issue here we can hold it open indefinitely and point people to it.

Sure thing I'll do that once everything is finalized here and link back to this discussion.

@oddhack oddhack added this to the Signed-off to Merge milestone Jan 17, 2024
@oddhack oddhack merged commit 7abf6f0 into KhronosGroup:main Jan 24, 2024
11 checks passed
oddhack added a commit that referenced this pull request Jan 25, 2024
Github Issues

  * Add missing VUs to structures taking elink:VkFormat parameters where
    formats cannot be ename:VK_FORMAT_UNDEFINED (public issue 2165).
  * Add EPUB generation target to the Makefile. NOTE: the `epub` target is
    not supported by Khronos, but provided in case it is of use to people
    building their own specification outputs. Please see
    #2286 for more about
    this (public PR 2286).

Internal Issues

  * Fix VU 06604 to allow omitting fragment shaders when creating a graphics
    pipeline library (internal issue 3178).
  * Clarify pname:maxCombinedClipAndCullDistances and related VUs (internal
    issue 3325).
  * Refactor apiext:VK_EXT_extended_dynamic_state3 and
    apiext:VK_EXT_shader_object XML to include extension dependencies
    (internal issue 3360).
  * Add <<spirvenv-module-validation-standalone, Standalone SPIR-V
    Validation>> VU banning code:PhysicalStorageBuffer pointers in shader
    interfaces (internal issue 3677).
  * Clarified image requirement for slink:VkSparseImageFormatProperties
    (internal issue 3686).
  * Add slink:VkQueryPoolCreateInfo VU requiring pname:pipelineStatistics
    not be zero for that query type (internal issue 3722).
  * Add slink:VkWriteDescriptorSet and flink:vkGetDescriptorEXT VUs banning
    dlink:VK_NULL_HANDLE YCbCr descriptors (internal issue 3727).
  * Clarify acceleration structure binding requirements in a NOTE for
    flink:vkCreateAccelerationStructureKHR and new VUs for
    flink:vkGetAccelerationStructureDeviceAddressKHR (internal issue 3735).
  * Add `optional` attribute to shader parameter of flink:vkDestroyShaderEXT
    (internal issue 3754).
  * Add flink:vkSetEvent VU for pending command buffers (internal MR 6326).
  * Allow pname:pMessage to be `NULL` in
    slink:VkDebugUtilsMessengerCallbackDataEXT (internal MR 6331).
  * Fix link to the H.265 specification (internal MR 6334).
  * Remove redundant slink:VkDeferredOperationKHR check formerly in VUID
    03677 (internal MR 6374).
  * Add VU requiring pname:commandBuffer to not be protected for
    flink:vkCmdBuildAccelerationStructuresKHR (internal MR 6375).
  * Update `genvk.py` to not load generators when they are not available, as
    may be the case in VulkanSC-Headers or downstream repositories (internal
    MR 6384).
  * Add `returnedonly` attributes to some Properties structs missing them
    (internal MR 6392).
  * Remove redundant slink:VkDebugUtilsMessengerCreateInfoEXT VU 01914
    (internal MR 6404).
  * Clarify the conditions under which <<shaders-helper-invocations, shader
    helper invocations>> may become inactive (internal MR 6405).
  * Fix typo in
    slink:VkPipelineMultisampleStateCreateInfo::pname:sampleShadingEnable
    member name (internal MR 6407).

New Extensions

  * Roadmap 2024 Extensions
  ** VK_KHR_dynamic_rendering_local_read
  ** VK_KHR_index_type_uint8 (promoted from EXT)
  ** VK_KHR_line_rasterization (promoted from EXT)
  ** VK_KHR_load_store_op_none (promoted from EXT)
  ** VK_KHR_shader_expect_assume
  ** VK_KHR_shader_float_controls2
  ** VK_KHR_shader_maximal_reconvergence
  ** VK_KHR_shader_quad_control
  ** VK_KHR_shader_subgroup_rotate
@oddhack
Copy link
Contributor

oddhack commented Jan 25, 2024

you open a tracking issue here we can hold it open indefinitely and point people to it.

Sure thing I'll do that once everything is finalized here and link back to this discussion.

This has been merged and published in the 1.3.276 spec update. If you would like to create a tracking issue for epub related issues, please go ahead, and I will link to that from the BUILD.adoc and a comment in the Makefile for the next update. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants